diff --git a/kustomization.yaml b/kustomization.yaml index cda7cb2..450c352 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -1,4 +1,4 @@ - +namespace: default resources: - resources vars: @@ -16,5 +16,12 @@ vars: name: nfs-provisioner-client-info fieldref: fieldpath: data.nfsPath +- name: NAMESPACE + objref: + apiVersion: v1 + kind: ConfigMap + name: nfs-provisioner-client-info + fieldref: + fieldpath: metadata.namespace configurations: - varreference.yaml diff --git a/resources/cluster-role-binding.yaml b/resources/cluster-role-binding.yaml index 1dd1821..e3e21ac 100644 --- a/resources/cluster-role-binding.yaml +++ b/resources/cluster-role-binding.yaml @@ -7,7 +7,7 @@ metadata: subjects: - kind: ServiceAccount name: nfs-client-provisioner - namespace: coffee + namespace: $(NAMESPACE) roleRef: kind: ClusterRole name: nfs-client-provisioner diff --git a/varreference.yaml b/varreference.yaml index 7b85cfe..c08746a 100644 --- a/varreference.yaml +++ b/varreference.yaml @@ -1,3 +1,5 @@ varReference: - path: spec/template/spec/volumes/nfs/path - kind: Deployment \ No newline at end of file + kind: Deployment +- path: subjects/namespace + kind: ClusterRoleBinding \ No newline at end of file