1
0
Fork 0

remove placeholdertransformer

This commit is contained in:
Massaki Archambault 2023-02-06 10:31:21 -05:00
parent 17e553fce4
commit 77644f5240
7 changed files with 100 additions and 23 deletions

View File

@ -10,6 +10,7 @@ spec:
targetNamespace: longhorn-system targetNamespace: longhorn-system
set: set:
backupTargetCredentialSecret: s3-backupstore-credentials backupTargetCredentialSecret: s3-backupstore-credentials
ingress.host: ${LONGHORN_EXTERNAL_HOST}
valuesContent: |- valuesContent: |-
defaultSettings: defaultSettings:
backupTarget: s3://longhorn-backups@home/ backupTarget: s3://longhorn-backups@home/
@ -27,4 +28,3 @@ spec:
operator: Exists operator: Exists
ingress: ingress:
enabled: true enabled: true
host: ${LONGHORN_EXTERNAL_HOST}

View File

@ -10,7 +10,6 @@ commonLabels:
app.kubernetes.io/managed-by: kustomize-cluster app.kubernetes.io/managed-by: kustomize-cluster
transformers: transformers:
- transformers/placeholders.yaml
- transformers/ssm-secrets.yaml - transformers/ssm-secrets.yaml
configMapGenerator: configMapGenerator:
@ -29,3 +28,31 @@ secretGenerator:
- AWS_ACCESS_KEY_ID=${ssm:/k3s/prod/longhorn/s3_access_key_id} - AWS_ACCESS_KEY_ID=${ssm:/k3s/prod/longhorn/s3_access_key_id}
- AWS_SECRET_ACCESS_KEY=${ssm:/k3s/prod/longhorn/s3_secret_access_key} - AWS_SECRET_ACCESS_KEY=${ssm:/k3s/prod/longhorn/s3_secret_access_key}
- AWS_ENDPOINTS=https://s3.badjware.dev - AWS_ENDPOINTS=https://s3.badjware.dev
replacements:
- source:
kind: ConfigMap
name: cluster-replacements
namespace: default
fieldPath: data.TRAEFIK_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: traefik
namespace: kube-system
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: cluster-replacements
namespace: default
fieldPath: data.LONGHORN_EXTERNAL_HOST
targets:
- select:
kind: HelmChart
name: longhorn
namespace: kube-system
fieldPaths:
- spec.set.[ingress.host]
options:
create: true

View File

@ -1,2 +0,0 @@
TRAEFIK_EXTERNAL_HOST=traefik.badjnet.home
LONGHORN_EXTERNAL_HOST=longhorn.badjnet.home

View File

@ -1,5 +0,0 @@
apiVersion: badjware/v1
kind: PlaceholderTransformer
metadata:
name: placeholders
placeholdersFile: placeholders.txt

View File

@ -34,6 +34,14 @@ images:
newTag: 6.2.5 newTag: 6.2.5
configMapGenerator: configMapGenerator:
- name: replacements
namespace: default
literals:
- GITEA_EXTERNAL_HOST=code.badjware.dev
- DRONE_EXTERNAL_HOST=drone.badjware.dev
- NEXTCLOUD_EXTERNAL_HOST=cloud.badjware.dev
- GRAFANA_EXTERNAL_HOST=grafana.badjware.dev
- PROMETHEUS_EXTERNAL_HOST=prometheus.badjnet.home
- name: ecommerce-exporter-config - name: ecommerce-exporter-config
namespace: monitoring namespace: monitoring
behavior: replace behavior: replace
@ -100,7 +108,6 @@ commonLabels:
app.kubernetes.io/managed-by: kustomize app.kubernetes.io/managed-by: kustomize
transformers: transformers:
- transformers/placeholders.yaml
- transformers/ssm-secrets.yaml - transformers/ssm-secrets.yaml
patchesJson6902: patchesJson6902:
@ -117,3 +124,65 @@ patchesJson6902:
# patchesStrategicMerge: # patchesStrategicMerge:
# - patches/blackbox-exporter-probe-patch.yaml # - patches/blackbox-exporter-probe-patch.yaml
replacements:
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.GITEA_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: gitea
namespace: gitea
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.DRONE_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: drone
namespace: gitea
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.NEXTCLOUD_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: nextcloud
namespace: nextcloud
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.GRAFANA_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: grafana
namespace: monitoring
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.PROMETHEUS_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: prometheus
namespace: monitoring
fieldPaths:
- spec.rules.0.host

View File

@ -1,7 +0,0 @@
GITEA_EXTERNAL_HOST=code.badjware.dev
DRONE_EXTERNAL_HOST=drone.badjware.dev
NEXTCLOUD_EXTERNAL_HOST=cloud.badjware.dev
GRAFANA_EXTERNAL_HOST=grafana.badjware.dev
KUBERNETES_DASHBOARD_EXTERNAL_HOST=kubernetes-dashboard.badjnet.home
PROMETHEUS_EXTERNAL_HOST=prometheus.badjnet.home

View File

@ -1,5 +0,0 @@
apiVersion: badjware/v1
kind: PlaceholderTransformer
metadata:
name: placeholders
placeholdersFile: placeholders.txt