Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GitHub repository bootstrap #31

Merged
merged 11 commits into from
Jun 9, 2020
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Jun 5, 2020

Fix: #30

Install:

go run ./cmd/tk/ bootstrap github --owner=gitopsrun --repository=cluster-infra
► connecting to github.com
✔ repository created
✔ repository cloned
✚ generating manifests
✔ components manifests pushed
► installing components in gitops-system namespace
namespace/gitops-system created
customresourcedefinition.apiextensions.k8s.io/gitrepositories.source.fluxcd.io created
customresourcedefinition.apiextensions.k8s.io/helmcharts.source.fluxcd.io created
customresourcedefinition.apiextensions.k8s.io/helmrepositories.source.fluxcd.io created
customresourcedefinition.apiextensions.k8s.io/kustomizations.kustomize.fluxcd.io created
customresourcedefinition.apiextensions.k8s.io/profiles.kustomize.fluxcd.io created
role.rbac.authorization.k8s.io/crd-controller-gitops-system created
rolebinding.rbac.authorization.k8s.io/crd-controller-gitops-system created
clusterrolebinding.rbac.authorization.k8s.io/cluster-reconciler-gitops-system created
service/source-controller created
deployment.apps/kustomize-controller created
deployment.apps/source-controller created
networkpolicy.networking.k8s.io/deny-ingress created
✔ install completed
◎ verifying installation
Waiting for deployment "source-controller" rollout to finish: 0 of 1 updated replicas are available...
deployment "source-controller" successfully rolled out
✔ source-controller ready
deployment "kustomize-controller" successfully rolled out
✔ kustomize-controller ready
► configuring deploy key
✔ deploy key configured
► generating sync manifests
✔ sync manifests pushed
► applying sync manifests
◎ waiting for cluster sync
✔ bootstrap finished

No-op upgrade:

go run ./cmd/tk/ bootstrap github --owner=gitopsrun --repository=cluster-infra
► connecting to GitHub
✔ repository cloned
✚ generating manifests
✔ components are up to date
✔ bootstrap finished

@stefanprodan stefanprodan marked this pull request as ready for review June 6, 2020 10:35
@stefanprodan stefanprodan requested a review from hiddeco June 6, 2020 10:35
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick comment, I had a couple more of them but I think we have a mutual understanding that we will improve those things once we start drafting solid packages. LGTM 🥇

},
}

if sourceGitSemver != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NI / nitpick: I would have made this a switch.

@@ -287,7 +291,7 @@ func upsertSecret(ctx context.Context, kubeClient client.Client, secret corev1.S
err := kubeClient.Get(ctx, namespacedName, &existing)
if err != nil {
if errors.IsNotFound(err) {
if err := kubeClient.Create(ctx, &existing); err != nil {
if err := kubeClient.Create(ctx, &secret); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎣 💯

@stefanprodan stefanprodan merged commit dc7c2ce into master Jun 9, 2020
@stefanprodan stefanprodan deleted the bootstrap-github branch June 9, 2020 14:00
ybelleguic pushed a commit to ybelleguic/flux2 that referenced this pull request Jan 9, 2023
docs: Sync specification with API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitOps bootstrap
2 participants