4.2. GitHub からソフトウェアカタログへのユーザーのプロビジョニング
ユーザーを認証する場合、Red Hat Developer Hub ではソフトウェアカタログにユーザーが登録されていることが必要です。ユーザーを手動でプロビジョニングするのではなく、スケジュールに従って GitHub からソフトウェアカタログにユーザーをプロビジョニングするように Developer Hub を設定することを検討してください。
前提条件
次のシークレットを含む GitHub での認証が有効化されている。
-
GITHUB_HOST_DOMAIN -
GITHUB_ORGANIZATION
-
手順
GitHub メンバー検出を有効にするには、
app-config-rhdhなどのカスタム Developer Hub ConfigMap を編集し、app-config.yamlコンテンツに次の行を追加します。必須の
githubフィールドを含むapp-config.yamlフラグメントCopy to Clipboard Copied! Toggle word wrap Toggle overflow organization、githubUrl、orgs- GitHub で作成し、OpenShift でシークレットとして設定した Developer Hub アプリケーション情報を使用します。
schedule.frequency- カスタムスケジュールの頻度を指定します。コード内で使用される cron、ISO 期間、および "人間が判読可能な期間" をサポートします。
schedule.timeout- カスタムタイムアウトを指定します。コード内で使用される ISO 期間と "人間が判読可能な期間" をサポートします。
schedule.initialDelay- カスタム初期遅延を指定します。コード内で使用される ISO 期間と "人間が判読可能な期間" をサポートします。
検証
コンソールログをチェックして、同期が完了したことを確認します。
同期が成功した例:
{"class":"GithubMultiOrgEntityProvider","level":"info","message":"Reading GitHub users and teams for org: rhdh-dast","plugin":"catalog","service":"backstage","target":"https://github.com","taskId":"GithubMultiOrgEntityProvider:production:refresh","taskInstanceId":"801b3c6c-167f-473b-b43e-e0b4b780c384","timestamp":"2024-09-09 23:55:58"} {"class":"GithubMultiOrgEntityProvider","level":"info","message":"Read 7 GitHub users and 2 GitHub groups in 0.4 seconds. Committing...","plugin":"catalog","service":"backstage","target":"https://github.com","taskId":"GithubMultiOrgEntityProvider:production:refresh","taskInstanceId":"801b3c6c-167f-473b-b43e-e0b4b780c384","timestamp":"2024-09-09 23:55:59"}{"class":"GithubMultiOrgEntityProvider","level":"info","message":"Reading GitHub users and teams for org: rhdh-dast","plugin":"catalog","service":"backstage","target":"https://github.com","taskId":"GithubMultiOrgEntityProvider:production:refresh","taskInstanceId":"801b3c6c-167f-473b-b43e-e0b4b780c384","timestamp":"2024-09-09 23:55:58"} {"class":"GithubMultiOrgEntityProvider","level":"info","message":"Read 7 GitHub users and 2 GitHub groups in 0.4 seconds. Committing...","plugin":"catalog","service":"backstage","target":"https://github.com","taskId":"GithubMultiOrgEntityProvider:production:refresh","taskInstanceId":"801b3c6c-167f-473b-b43e-e0b4b780c384","timestamp":"2024-09-09 23:55:59"}Copy to Clipboard Copied! Toggle word wrap Toggle overflow - GitHub アカウントでログインします。