You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2025. It is now read-only.
Generate [SSH key pair](https://cloud.google.com/anthos-config-management/docs/how-to/installing-config-sync#ssh-key-pair) in order to get a read access to the private Git repository:
75
+
```Bash
76
+
mkdir tmp
77
+
ssh-keygen -t rsa -b 4096 \
78
+
-C "${ORG_REPO_NAME_WITH_OWNER}@github" \
79
+
-N '' \
80
+
-f ./tmp/github-org-repo
81
+
kubectl create ns config-management-system && \
82
+
kubectl create secret generic git-creds \
83
+
--namespace=config-management-system \
84
+
--from-file=ssh=./tmp/github-org-repo
85
+
gh repo deploy-key add ./tmp/github-org-repo.pub
86
+
rm -r tmp
71
87
```
72
88
73
89
Deploy a `RootSync` linking this GitHub repository to the Config Controller instance as the main/root GitOps configuration:
@@ -85,13 +101,17 @@ spec:
85
101
revision: HEAD
86
102
branch: main
87
103
dir: config-sync
88
-
auth: none
104
+
auth: ssh
105
+
secretRef:
106
+
name: git-creds
89
107
EOF
90
108
```
91
-
{{% notice info %}}
92
-
Since you started this workshop, you just ran 4 `kubectl` commands. For your information, moving forward you won't run any other `kubectl` commands because the design and intent of this workshop is to only deploy any Kubernetes resources via GitOps with Config Sync. You will also use some handy `gcloud` commands when appropriate.
109
+
{{% notice tips %}}
110
+
The GitHub repository is private in order to demonstrate how to allow read access to Config Sync when you use a restricted Git repository.
93
111
{{% /notice %}}
94
112
113
+
Since you started this workshop, you just ran 6 `kubectl` commands. For your information, moving forward you won't run any other `kubectl` commands because the design and intent of this workshop is to only deploy any Kubernetes resources via GitOps with Config Sync. You will also use some handy `gcloud` commands when appropriate.
114
+
95
115
## Define Cloud Billing API
96
116
97
117
In order to have Config Controller's Config Sync linking a Billing Account to GCP projects later in this workshop, we need to define the Cloud Billing API [`Service`](https://cloud.google.com/config-connector/docs/reference/resource-docs/serviceusage/service) resource for Config Controller's GCP project:
0 commit comments