From 16dec1cdece7497a802c9e9a80d46a2cadc9c2d6 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 21 Jul 2025 11:47:39 -0500 Subject: [PATCH] ssh-host-keys: Do not specify a namespace We don't want to hard-code a namespace for the `ssh-known-hosts` ConfigMap because that makes it less useful for other projects besides Jenkins. Instead, we omit the namespace specification and allow consumers to specify their own. The _jenkins_ project doesn't have a default namespace, since it specifies resources in the `jenkins` and `jenkins-jobs` namespaces, we need to create a sub-project to set the namespace for the `ssh-known-hosts` ConfigMap. --- jenkins/kustomization.yaml | 2 +- jenkins/ssh-host-keys/kustomization.yaml | 7 +++++++ ssh-host-keys/kustomization.yaml | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 jenkins/ssh-host-keys/kustomization.yaml diff --git a/jenkins/kustomization.yaml b/jenkins/kustomization.yaml index 91096ce..fe89ddf 100644 --- a/jenkins/kustomization.yaml +++ b/jenkins/kustomization.yaml @@ -10,7 +10,7 @@ resources: - secrets.yaml - iscsi.yaml - gentoo-storage.yaml -- ../ssh-host-keys +- ssh-host-keys patches: - patch: | diff --git a/jenkins/ssh-host-keys/kustomization.yaml b/jenkins/ssh-host-keys/kustomization.yaml new file mode 100644 index 0000000..e8ed4bc --- /dev/null +++ b/jenkins/ssh-host-keys/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: jenkins-jobs + +resources: +- ../../ssh-host-keys diff --git a/ssh-host-keys/kustomization.yaml b/ssh-host-keys/kustomization.yaml index 9f287be..b08342b 100644 --- a/ssh-host-keys/kustomization.yaml +++ b/ssh-host-keys/kustomization.yaml @@ -3,7 +3,6 @@ kind: Kustomization configMapGenerator: - name: ssh-known-hosts - namespace: jenkins-jobs files: - ssh_known_hosts options: