From fc9c07f51b6e573671e8d20c0e7c186341930581 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 15 Oct 2024 15:44:05 -0500 Subject: [PATCH] chore: rename secrets to manifests A lot of the things we are storing now days are just Kubernetes manifests and not just secrets so rename this path to make it more clear what belongs here. --- apps/appsets/argocd/appset-argocd.yaml | 2 +- apps/appsets/components.yaml | 10 +++++----- apps/appsets/infra.yaml | 6 +++--- apps/appsets/openstack.yaml | 4 ++-- docs/deploy-guide/add-remove-app.md | 2 +- docs/deploy-guide/auth.md | 2 +- docs/deploy-guide/gitops-install.md | 4 ++-- scripts/gitops-secrets-gen.sh | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/appsets/argocd/appset-argocd.yaml b/apps/appsets/argocd/appset-argocd.yaml index 9f54f4fc..e9cd16d2 100644 --- a/apps/appsets/argocd/appset-argocd.yaml +++ b/apps/appsets/argocd/appset-argocd.yaml @@ -48,7 +48,7 @@ spec: value: {{.name}}-cluster-issuer - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/argocd' + path: '{{.name}}/manifests/argocd' ignoreDifferences: - kind: Secret namespace: argocd diff --git a/apps/appsets/components.yaml b/apps/appsets/components.yaml index 31cdb3b9..0e62ffad 100644 --- a/apps/appsets/components.yaml +++ b/apps/appsets/components.yaml @@ -42,7 +42,7 @@ spec: - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' ref: deploy - path: '{{.name}}/secrets/dex' + path: '{{.name}}/manifests/dex' - repoURL: https://charts.dexidp.io chart: dex targetRevision: 0.16.0 @@ -65,7 +65,7 @@ spec: path: 'components/openstack' - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/openstack' + path: '{{.name}}/manifests/openstack' - component: undersync skipComponent: '{{has "undersync" ((default "[]" (index .metadata.annotations "uc_skip_components") | fromJson))}}' sources: @@ -74,7 +74,7 @@ spec: path: 'components/undersync' - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/undersync' + path: '{{.name}}/manifests/undersync' - component: nautobot skipComponent: '{{has "nautobot" ((default "[]" (index .metadata.annotations "uc_skip_components") | fromJson))}}' sources: @@ -85,7 +85,7 @@ spec: - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' ref: deploy - path: '{{.name}}/secrets/nautobot' + path: '{{.name}}/manifests/nautobot' - repoURL: https://nautobot.github.io/helm-charts/ chart: nautobot targetRevision: 2.1.3 @@ -169,7 +169,7 @@ spec: path: 'components/argo-events' - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/argo-events' + path: '{{.name}}/manifests/argo-events' - component: understack-workflows componentNamespace: argo-events skipComponent: '{{has "understack-workflows" ((default "[]" (index .metadata.annotations "uc_skip_components") | fromJson))}}' diff --git a/apps/appsets/infra.yaml b/apps/appsets/infra.yaml index f8a61b60..dc21a47a 100644 --- a/apps/appsets/infra.yaml +++ b/apps/appsets/infra.yaml @@ -29,7 +29,7 @@ spec: enabled: true - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/cert-manager' + path: '{{.name}}/manifests/cert-manager' - component: metallb-system skipComponent: '{{has "metallb" ((default "[]" (index .metadata.annotations "uc_skip_components") | fromJson))}}' sources: @@ -38,7 +38,7 @@ spec: path: 'bootstrap/metallb' - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/metallb' + path: '{{.name}}/manifests/metallb' ignoreDifferences: - group: "apiextensions.k8s.io" kind: CustomResourceDefinition @@ -88,7 +88,7 @@ spec: # and environment specific stuff here - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/cilium' + path: '{{.name}}/manifests/cilium' selector: # by setting the key in the elements 'skipComponent' to 'true' it will skip installing it # ArgoCD's templating operates with strings so it's the string "true" diff --git a/apps/appsets/openstack.yaml b/apps/appsets/openstack.yaml index 8fd33552..b228d772 100644 --- a/apps/appsets/openstack.yaml +++ b/apps/appsets/openstack.yaml @@ -44,7 +44,7 @@ spec: ref: understack - repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}' targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}' - path: '{{.name}}/secrets/{{.component}}' + path: '{{.name}}/manifests/{{.component}}' ref: deploy - repoURL: https://tarballs.opendev.org/openstack/openstack-helm/ chart: '{{.component}}' @@ -54,7 +54,7 @@ spec: valueFiles: - $understack/components/openstack-2024.1-jammy.yaml - $understack/components/{{.component}}/aio-values.yaml - - $deploy/{{.name}}/secrets/secret-openstack.yaml + - $deploy/{{.name}}/manifests/secret-openstack.yaml - $deploy/{{.name}}/helm-configs/{{.component}}.yaml # don't require all the values files ignoreMissingValueFiles: true diff --git a/docs/deploy-guide/add-remove-app.md b/docs/deploy-guide/add-remove-app.md index 8cfba06f..2673a7a8 100644 --- a/docs/deploy-guide/add-remove-app.md +++ b/docs/deploy-guide/add-remove-app.md @@ -18,7 +18,7 @@ repo. ### Kustomize -To make changes you will need to add or modify files in `$DEPLOY_NAME/secrets/$APPLICATION/` +To make changes you will need to add or modify files in `$DEPLOY_NAME/manifests/$APPLICATION/` in your deployment repo. ## Removing an application for a specific deploy diff --git a/docs/deploy-guide/auth.md b/docs/deploy-guide/auth.md index 9a3c89cb..568b27f5 100644 --- a/docs/deploy-guide/auth.md +++ b/docs/deploy-guide/auth.md @@ -68,7 +68,7 @@ kubectl --namespace dex \ --from-literal=client-id={client_id} \ --from-literal=client-secret={client_secret} \ --from-literal=redirect-uri=https://dex.${DNS_ZONE}/callback \ - -o yaml > ${UC_DEPLOY}/${DEPLOY_NAME}/secrets/secret-oidc-sso-dex.yaml + -o yaml > ${UC_DEPLOY}/${DEPLOY_NAME}/manifests/secret-oidc-sso-dex.yaml ``` You must remember to add this secret to your secret storage (e.g. for diff --git a/docs/deploy-guide/gitops-install.md b/docs/deploy-guide/gitops-install.md index 1341a3af..5e1aa6a3 100644 --- a/docs/deploy-guide/gitops-install.md +++ b/docs/deploy-guide/gitops-install.md @@ -174,13 +174,13 @@ to your git server so that ArgoCD can access it. Configure your ArgoCD to be aware of your cluster: ```bash -kubectl -n argocd apply -f "${UC_DEPLOY}/${DEPLOY_NAME}/secrets/argocd/secret-*-cluster.yaml" +kubectl -n argocd apply -f "${UC_DEPLOY}/${DEPLOY_NAME}/manifests/argocd/secret-*-cluster.yaml" ``` Now configure your ArgoCD to have the credential access to your deploy repo: ```bash -kubectl -n argocd apply -f "${UC_DEPLOY}/${DEPLOY_NAME}/secrets/argocd/secret-deploy-repo.yaml" +kubectl -n argocd apply -f "${UC_DEPLOY}/${DEPLOY_NAME}/manifests/argocd/secret-deploy-repo.yaml" ``` Label the node(s) to allow OpenStack control plane installation: diff --git a/scripts/gitops-secrets-gen.sh b/scripts/gitops-secrets-gen.sh index 85736b93..d17ec8e3 100755 --- a/scripts/gitops-secrets-gen.sh +++ b/scripts/gitops-secrets-gen.sh @@ -60,7 +60,7 @@ fi export DNS_ZONE export DEPLOY_NAME -DEST_DIR="${UC_DEPLOY}/${DEPLOY_NAME}/secrets" +DEST_DIR="${UC_DEPLOY}/${DEPLOY_NAME}/manifests" mkdir -p "${DEST_DIR}" ###