k3s/namespaces/core/tika/kustomization.yaml
Jonathan Leech-Pepin 2d4c95f5b6
Add app: and version: tags to tika as a test
- Determine right replacements to leverage them going forward
- Determine how to use `image:` yaml for the deployment
2025-05-13 15:58:02 -04:00

85 lines
1.8 KiB
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: image
newName: docker.io/apache/tika
newTag: 3.1.0.0
transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: notImportantHere
namespace: core
unsetOnly: true
namePrefix: tika-
resources:
- ../../../kustomize/bases/deployservice/
- extra/gatus-endpoints.yaml
replacements:
- source:
kind: Deployment
name: app
fieldPath: spec.template.spec.containers.0.image
options:
delimiter: ":"
index: 1
targets:
- select:
kind: Deployment
name: app
options:
create: true
fieldPaths:
- spec.template.metadata.labels.version
- source:
kind: Deployment
name: app
fieldPath: metadata.labels.app
options:
delimiter: ":"
index: 0
targets:
- select:
kind: Deployment
name: app
options:
create: true
fieldPaths:
- spec.template.metadata.labels.app
- source:
kind: Deployment
name: app
fieldPath: metadata.labels.[app.kubernetes.io/appName]
targets:
- select:
kind: Service
fieldPaths:
- spec.ports.0.name
- spec.ports.0.targetPort
- source:
kind: Deployment
name: app
fieldPath: spec.template.spec.containers.0.ports.0.containerPort
targets:
- select:
kind: Service
fieldPaths:
- spec.ports.0.port
patches:
- path: patches/deployment.yaml
target:
kind: Deployment
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/appName: tika
- pairs:
app.kubernetes.io/appNamespace: core
app: tika