helmfile.yaml 2.48 KB
bases:
  - ../common/environments.yaml

---

repositories:

releases:
  - name: keycloak-operator
    namespace: {{ .Values.namespace }}
    chart: charts/keycloak-operator
    jsonPatches:
      - target:
          kind: Deployment
          name: keycloak-operator
          namespace: {{ .Values.namespace }}
          version: v1
          group: apps
        patch:
          - op: add
            path: /spec/template/spec/containers/0/env/-
            value:
              name: QUARKUS_OPERATOR_SDK_NAMESPACES
              value: {{ .Values.watchNamespaces }}
      - target:
          kind: Role
          name: keycloak-operator-role
          namespace: {{ .Values.namespace }}
          version: v1
          group: rbac.authorization.k8s.io
        patch:
          - op: remove
            path: /metadata/namespace
          - op: replace
            path: /kind
            value: ClusterRole
      - target:
          kind: RoleBinding
          name: keycloak-operator-role-binding
          namespace: {{ .Values.namespace }}
          version: v1
          group: rbac.authorization.k8s.io
        patch:
          - op: remove
            path: /metadata/namespace
          - op: replace
            path: /kind
            value: ClusterRoleBinding
          - op: replace
            path: /roleRef/kind
            value: ClusterRole
      - target:
          kind: RoleBinding
          name: keycloak-operator-view
          namespace: {{ .Values.namespace }}
          version: v1
          group: rbac.authorization.k8s.io
        patch:
          - op: remove
            path: /metadata/namespace
          - op: replace
            path: /kind
            value: ClusterRoleBinding
          - op: replace
            path: /roleRef/kind
            value: ClusterRole
      - target:
          kind: RoleBinding
          name: keycloakcontroller-role-binding
          namespace: {{ .Values.namespace }}
          version: v1
          group: rbac.authorization.k8s.io
        patch:
          - op: remove
            path: /metadata/namespace
          - op: replace
            path: /kind
            value: ClusterRoleBinding
      - target:
          kind: RoleBinding
          name: keycloakrealmimportcontroller-role-binding
          namespace: {{ .Values.namespace }}
          version: v1
          group: rbac.authorization.k8s.io
        patch:
          - op: remove
            path: /metadata/namespace
          - op: replace
            path: /kind
            value: ClusterRoleBinding