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

Kubernetes clusters: define infraciadmin SVC account as code #3679

Closed
1 task
dduportal opened this issue Jul 25, 2023 · 4 comments
Closed
1 task

Kubernetes clusters: define infraciadmin SVC account as code #3679

dduportal opened this issue Jul 25, 2023 · 4 comments

Comments

@dduportal
Copy link
Contributor

The goal of this issue is to set up the service account infraciadmin as code to allow the builds of jenkins-infra/kubernetes-management to administrate chart installations in the clusters.

Todo list (TBD)


  • Postmortem: put "as code" the setup of the infraciadmin service account used to administrate clusters (instead of a hidden script on my laptop...)

Originally posted by @dduportal in #3582 (comment)

@dduportal
Copy link
Contributor Author

Next steps:

  • Try the resulting kubeconfig in infra.ci
  • Azure (WiP)
  • AWS

@dduportal
Copy link
Contributor Author

Update:

  • Tested with success the 2 DigitalOcean new kubeconfig with a manual credential import in infra.ci
    • For each cluster :
      • terraform output kubeconfig_<clustername> => copy and paste into a file named <clustername>/kubeconfig
      • Checked it works with these commands: kubectl --kubeconfig=./<clustername>/kubeconfig cluster-info (compare with and without the --kubeconfig flag that it changes) and kubectl --kubeconfig=./<clustername>/kubeconfig get ns (check the expecte namespaces for each cluster)
      • Update the existing credential in the kubernetes-jobs job on infra.ci by uploading the <clustername>/kubeconfig
    • Build https://infra.ci.jenkins.io/job/kubernetes-jobs/job/kubernetes-management/job/main/20950/ with sucess
    • Updated the SOPS secrets with the 2 kubeconfig
  • Azure wip: refactor(publick8s,privatek8s) define infraciadmin SA with a terraform module azure#448
    • Imported existintg resources
    • Gotta merge anc check if it creates resources as expected

dduportal added a commit to jenkins-infra/azure that referenced this issue Aug 9, 2023
…m module (#448)

Ref. jenkins-infra/helpdesk#3679

Same as jenkins-infra/digitalocean#134 +
jenkins-infra/digitalocean#136 but for Azure

Please note that the `privatek8s` SA can be used directly by the pod of
jenkins-infra/kubernetes-management by mounting the token in the pod
directly.

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal
Copy link
Contributor Author

Update:

@dduportal
Copy link
Contributor Author

dduportal commented Aug 9, 2023

Update:

  • AWS clusters done ✅
  • All credentials in jenkins-infra/kubernetes-management are up to date with the SA from the config as code

Next steps: cleaning up former unused elements:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant