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

Bootstrap the new clusters in k8s-infra-prow project. #7127

Merged
merged 12 commits into from
Aug 15, 2024

Conversation

upodroid
Copy link
Member

@upodroid upodroid commented Aug 5, 2024

I have been working on this for a while but I will have this shipped this week.

This has already been deployed but I'll be adding a few things incrementally.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 5, 2024
@k8s-ci-robot k8s-ci-robot added sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 5, 2024
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

I did the initial review, it looks great overall, but I have some questions

project: default
source:
path: kubernetes/gke-utility/argocd
repoURL: https://github.com/borg-land/k8s.io
Copy link
Member

Choose a reason for hiding this comment

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

I assume we have to get this PR merged, then update this to k/k8s.io, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it will the final commit on this PR.

namespace: argocd

resources:
- github.com/argoproj/argo-cd/manifests/ha/cluster-install?ref=v2.11.2
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we should keep the source manifests committed to this repo. That way we're sure we're always going to have access to the manifest we deployed. Also, we can easier track what's changed in the manifest and if there's anything that we need to pay attention to.

Copy link
Contributor

Choose a reason for hiding this comment

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

Another comment: v2.11.2 is not too old, but v2.12.0 has just been released.

labels:
argocd.argoproj.io/secret-type: repository
stringData:
url: https://github.com/kubernetes
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the ArgoCD docs, it appears that this should be the full repository URL, not the organization URL. How do we exactly use this Secret?

Copy link
Member Author

Choose a reason for hiding this comment

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

Look at the third example called private-repo-creds and the paragraph below it.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I fully understand why do we need this, because the document is describing this in the context of private repositories, but all repositories in k-org that we use are public. Does this repository configure Argo to connect to k-org without authentication or there's something else to it?

targetRevision: utility-dev
syncPolicy:
automated:
prune: false
Copy link
Member

Choose a reason for hiding this comment

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

I see prune: false used in a couple of places, but we have to be careful with it because it can leak resources and folks might not expect that. I think we should have a note in the README file describing that some resources are not pruned and that it must be done manually.

Copy link
Member Author

Choose a reason for hiding this comment

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

ArgoCD will be the one service where pruning is disabled. All other deployments will be automated with pruning enabled.

kubernetes/gke-utility/argocd/argocd-sa.yaml Show resolved Hide resolved
data:
policy.default: role:readonly
policy.csv: |
g, kubernetes:sig-k8s-infra-leads, role:admin
Copy link
Member

Choose a reason for hiding this comment

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

We should think about having a way to grant other folks access to Argo, e.g. @koksay and I will need it once we extend it to the EKS cluster.

spec:
goTemplate: true
generators:
# targets all clusters
Copy link
Member

Choose a reason for hiding this comment

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

How are clusters defined? I see that we have the gke-prow cluster defined, but I don't see the gke-utility cluster defined and labeled. Is it done manually/via click-ops?

Copy link
Member Author

@upodroid upodroid Aug 8, 2024

Choose a reason for hiding this comment

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

gke-utility is the default cluster. it was missing labels so I renamed it in the Argo Console and added the labels you see on gke-prow

Copy link
Member

Choose a reason for hiding this comment

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

Okay, thanks for the clarification! I think we should document this as part of the README.

- name: serviceAccount.name
value: external-secrets
valueFiles:
- $values/kubernetes/{{ .name }}/helm/external-secrets.yaml
Copy link
Member

Choose a reason for hiding this comment

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

How does this $values resolve? Is it resolving to the source defined below?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's resolved from the values defined below.

kind: ConfigMap
metadata:
name: argocd-cm
data:
Copy link
Member

Choose a reason for hiding this comment

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

We should include some comments what are different options doing and why did we enable/disable these options.

@upodroid upodroid changed the title [WIP] Bootstrap the new clusters in k8s-infra-prow project. Bootstrap the new clusters in k8s-infra-prow project. Aug 15, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 15, 2024
@upodroid upodroid added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 15, 2024
@k8s-ci-robot k8s-ci-robot added area/infra Infrastructure management, infrastructure design, code in infra/ area/infra/gcp Issues or PRs related to Kubernetes GCP infrastructure area/terraform Terraform modules, testing them, writing more of them, code in infra/gcp/clusters/ labels Aug 15, 2024
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 15, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: upodroid, xmudrii

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit e9d1a5a into kubernetes:main Aug 15, 2024
4 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.32 milestone Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/infra/gcp Issues or PRs related to Kubernetes GCP infrastructure area/infra Infrastructure management, infrastructure design, code in infra/ area/terraform Terraform modules, testing them, writing more of them, code in infra/gcp/clusters/ cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants