k3s/namespaces/ai/openwebui/kustomization.yaml

97 lines
2.2 KiB
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: notImportantHere
namespace: ai
unsetOnly: true
namePrefix: open-webui-
resources:
- ../../../kustomize/bases/helmchart/
patches:
- path: patches/chart.yaml
target:
kind: HelmChart
name: chart
replacements:
- source:
kind: HTTPRoute
name: http
fieldPath: metadata.labels.[app.kubernetes.io/appName]
targets:
- select:
kind: HTTPRoute
options:
create: true
delimiter: "."
index: 0
fieldPaths:
- spec.hostnames.0
- select:
kind: InfisicalSecret
options:
delimiter: "-"
index: 0
fieldPaths:
- spec.managedSecretReference.secretName
- select:
kind: InfisicalSecret
options:
delimiter: "/"
index: 2
fieldPaths:
- spec.authentication.universalAuth.secretsScope.secretsPath
- select:
kind: HTTPRoute
fieldPaths:
- spec.rules.0.backendRefs.0.name
- source:
kind: HTTPRoute
name: http
fieldPath: metadata.labels.[app.kubernetes.io/routePrefix]
targets:
- select:
kind: HTTPRoute
options:
create: true
delimiter: "."
index: 0
fieldPaths:
- spec.hostnames.0
- source:
kind: HTTPRoute
name: http
fieldPath: metadata.labels.[app.kubernetes.io/appNamespace]
targets:
- select:
kind: HelmChart
name: chart
fieldPaths:
- spec.targetNamespace
- select:
kind: InfisicalSecret
options:
delimiter: "/"
index: 1
fieldPaths:
- spec.authentication.universalAuth.secretsScope.secretsPath
- select:
kind: InfisicalSecret
fieldPaths:
- spec.managedSecretReference.secretNamespace
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/appName: open-webui
- pairs:
app.kubernetes.io/appNamespace: ai
- pairs:
app.kubernetes.io/routePrefix: owui