REFACTOR(goldilocks): use managedNsMeta for Goldil

- Remove namespace.yaml files
- Add managedNamespaceMetadata with Goldilocks label
- Set CreateNamespace=true in syncOptions
- Update kustomization.yaml to remove namespace.yaml references
This commit is contained in:
2025-12-29 15:57:46 +09:00
parent 0996187c82
commit 19adcadfdf
15 changed files with 111 additions and 171 deletions

View File

@@ -7,7 +7,6 @@ metadata:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: default
sources: sources:
- repoURL: https://github.com/coder/code-server.git - repoURL: https://github.com/coder/code-server.git
targetRevision: main targetRevision: main
@@ -21,19 +20,21 @@ spec:
- repoURL: https://gitea0213.kro.kr/bluemayne/applications.git - repoURL: https://gitea0213.kro.kr/bluemayne/applications.git
targetRevision: main targetRevision: main
path: code-server path: code-server
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: code-server namespace: code-server
syncPolicy: syncPolicy:
automated: automated:
prune: true prune: true
selfHeal: true selfHeal: true
retry: retry:
limit: 5 limit: 5
backoff: backoff:
duration: 5s duration: 5s
factor: 2 factor: 2
maxDuration: 3m maxDuration: 3m
managedNamespaceMetadata:
labels:
goldilocks.fairwinds.com/enabled: 'true'
syncOptions:
- CreateNamespace=true

View File

@@ -1,12 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: code-server namespace: code-server
resources: resources:
- vault/code-server-password.yaml
- namespace.yaml - rbac.yaml
- ingress.yaml
- vault/code-server-password.yaml
- rbac.yaml
- ingress.yaml

View File

@@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: code-server
labels:
goldilocks.fairwinds.com/enabled: "true"

View File

@@ -7,44 +7,39 @@ metadata:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: default
sources: sources:
- repoURL: https://gitea0213.kro.kr/bluemayne/applications.git - repoURL: https://gitea0213.kro.kr/bluemayne/applications.git
targetRevision: main targetRevision: main
path: docusaurus path: docusaurus
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: docusaurus namespace: docusaurus
syncPolicy: syncPolicy:
automated: automated:
prune: true prune: true
selfHeal: true selfHeal: true
allowEmpty: false allowEmpty: false
syncOptions: syncOptions:
- CreateNamespace=true
- PrunePropagationPolicy=foreground - PrunePropagationPolicy=foreground
- PruneLast=true - PruneLast=true
retry: retry:
limit: 5 limit: 5
backoff: backoff:
duration: 5s duration: 5s
factor: 2 factor: 2
maxDuration: 3m maxDuration: 3m
managedNamespaceMetadata:
labels:
goldilocks.fairwinds.com/enabled: 'true'
revisionHistoryLimit: 10 revisionHistoryLimit: 10
# Ignore differences in checksum annotations and manual restart annotations
ignoreDifferences: ignoreDifferences:
- group: apps - group: apps
kind: Deployment kind: Deployment
jqPathExpressions: jqPathExpressions:
- .spec.template.metadata.annotations - .spec.template.metadata.annotations
- .metadata.annotations - .metadata.annotations
- group: ''
- group: ""
kind: Service kind: Service
name: docusaurus name: docusaurus
namespace: docusaurus namespace: docusaurus

View File

@@ -1,11 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- deployment.yaml
- namespace.yaml - service.yaml
- deployment.yaml - ingress.yaml
- service.yaml
- ingress.yaml
namespace: docusaurus namespace: docusaurus

View File

@@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: docusaurus
labels:
goldilocks.fairwinds.com/enabled: "true"

View File

@@ -7,43 +7,38 @@ metadata:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: default
sources: sources:
# Helm chart from Gitea repository
- repoURL: https://dl.gitea.com/charts/ - repoURL: https://dl.gitea.com/charts/
chart: gitea chart: gitea
targetRevision: 12.4.0 targetRevision: 12.4.0
helm: helm:
valueFiles: valueFiles:
- $values/gitea/helm-values.yaml - $values/gitea/helm-values.yaml
# Values file from applications repository
- repoURL: https://gitea0213.kro.kr/bluemayne/applications.git - repoURL: https://gitea0213.kro.kr/bluemayne/applications.git
targetRevision: main targetRevision: main
ref: values ref: values
# Vault secrets from applications repository
- repoURL: https://gitea0213.kro.kr/bluemayne/applications.git - repoURL: https://gitea0213.kro.kr/bluemayne/applications.git
targetRevision: main targetRevision: main
path: gitea path: gitea
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: gitea namespace: gitea
syncPolicy: syncPolicy:
automated: automated:
prune: true prune: true
selfHeal: true selfHeal: true
allowEmpty: false allowEmpty: false
syncOptions: syncOptions:
- CreateNamespace=true
- PrunePropagationPolicy=foreground - PrunePropagationPolicy=foreground
- PruneLast=true - PruneLast=true
retry: retry:
limit: 5 limit: 5
backoff: backoff:
duration: 5s duration: 5s
factor: 2 factor: 2
maxDuration: 3m maxDuration: 3m
managedNamespaceMetadata:
labels:
goldilocks.fairwinds.com/enabled: 'true'
revisionHistoryLimit: 10 revisionHistoryLimit: 10

View File

@@ -1,15 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- namespace.yaml - deployment.yaml
- vault/gitea-admin-secret.yaml
- deployment.yaml - vault/gitea-postgres-password.yaml
- vault/gitea-runner-token.yaml
- vault/gitea-admin-secret.yaml - vault/gitea-minio-credentials.yaml
- vault/gitea-postgres-password.yaml - vault/minio-root-password.yaml
- vault/gitea-runner-token.yaml
- vault/gitea-minio-credentials.yaml
- vault/minio-root-password.yaml
namespace: gitea namespace: gitea

View File

@@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: gitea
labels:
goldilocks.fairwinds.com/enabled: "true"

View File

@@ -7,24 +7,25 @@ metadata:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: default
sources: sources:
- repoURL: https://gitea0213.kro.kr/bluemayne/applications.git - repoURL: https://gitea0213.kro.kr/bluemayne/applications.git
targetRevision: main targetRevision: main
path: homer path: homer
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: homer namespace: homer
syncPolicy: syncPolicy:
automated: automated:
prune: true prune: true
selfHeal: true selfHeal: true
retry: retry:
limit: 5 limit: 5
backoff: backoff:
duration: 5s duration: 5s
factor: 2 factor: 2
maxDuration: 3m maxDuration: 3m
managedNamespaceMetadata:
labels:
goldilocks.fairwinds.com/enabled: 'true'
syncOptions:
- CreateNamespace=true

View File

@@ -1,14 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- namespace.yaml - deployment.yaml
- deployment.yaml - service.yaml
- service.yaml - ingress.yaml
- ingress.yaml
configMapGenerator: configMapGenerator:
- name: homer-config - name: homer-config
namespace: homer namespace: homer
files: files:
- config.yml - config.yml

View File

@@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: homer
labels:
goldilocks.fairwinds.com/enabled: "true"

View File

@@ -7,7 +7,6 @@ metadata:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: default
sources: sources:
- repoURL: https://charts.christianhuth.de - repoURL: https://charts.christianhuth.de
chart: umami chart: umami
@@ -21,29 +20,27 @@ spec:
- repoURL: https://gitea0213.kro.kr/bluemayne/applications.git - repoURL: https://gitea0213.kro.kr/bluemayne/applications.git
targetRevision: main targetRevision: main
path: umami path: umami
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: umami namespace: umami
ignoreDifferences: ignoreDifferences:
# Ignore app-secret data changes in umami-app-secret - group: ''
# Helm chart generates random app-secret value on each sync,
# causing ArgoCD to detect it as OutOfSync
- group: ""
kind: Secret kind: Secret
name: umami-app-secret name: umami-app-secret
jsonPointers: jsonPointers:
- /data - /data
syncPolicy: syncPolicy:
automated: automated:
prune: true prune: true
selfHeal: true selfHeal: true
retry: retry:
limit: 5 limit: 5
backoff: backoff:
duration: 5s duration: 5s
factor: 2 factor: 2
maxDuration: 3m maxDuration: 3m
managedNamespaceMetadata:
labels:
goldilocks.fairwinds.com/enabled: 'true'
syncOptions:
- CreateNamespace=true

View File

@@ -1,7 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- namespace.yaml - vault/umami-password.yaml
- vault/umami-password.yaml - ingress.yaml
- ingress.yaml

View File

@@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: umami
labels:
goldilocks.fairwinds.com/enabled: "true"