---
# Source: spring-cloud-dataflow/charts/mariadb/templates/networkpolicy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: test-mariadb
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/managed-by: Helm
      app.kubernetes.io/name: mariadb
      app.kubernetes.io/version: 11.4.5
      helm.sh/chart: mariadb-20.4.1
  policyTypes:
    - Ingress
    - Egress
  egress:
    - {}
  ingress:
    - ports:
        - port: 3306
        - port: 3306
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/networkpolicy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: test-rabbitmq
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: rabbitmq
  policyTypes:
    - Ingress
    - Egress
  egress:
    - {}
  ingress:
    # Allow inbound connections to RabbitMQ
    - ports:
        - port: 4369
        - port: 5672
        - port: 5671
        - port: 25672
        - port: 15672
---
# Source: spring-cloud-dataflow/templates/server/networkpolicy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: test-spring-cloud-dataflow-server
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: server
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: spring-cloud-dataflow
      app.kubernetes.io/component: server
  policyTypes:
    - Ingress
    - Egress
  egress:
    - {}
  ingress:
    - ports:
        - port: 8080
        - port: 8080
---
# Source: spring-cloud-dataflow/templates/skipper/networkpolicy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: test-spring-cloud-dataflow-skipper
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: skipper
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: spring-cloud-dataflow
      app.kubernetes.io/component: skipper
  policyTypes:
    - Ingress
    - Egress
  egress:
    - {}
  ingress:
    - ports:
        - port: 7577
        - port: 80
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/primary/pdb.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: test-mariadb
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
    app.kubernetes.io/component: primary
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: mariadb
      app.kubernetes.io/component: primary
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/pdb.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: test-rabbitmq
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: rabbitmq
---
# Source: spring-cloud-dataflow/templates/prometheus-proxy/pdb.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: test-spring-cloud-dataflow-prometheus-proxy
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: prometheus-proxy
  namespace: "default"
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: spring-cloud-dataflow
      app.kubernetes.io/component: prometheus-proxy
---
# Source: spring-cloud-dataflow/templates/server/pdb.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: test-spring-cloud-dataflow-server
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: server
  namespace: "default"
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: spring-cloud-dataflow
      app.kubernetes.io/component: server
---
# Source: spring-cloud-dataflow/templates/skipper/pdb.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: test-spring-cloud-dataflow-skipper
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: skipper
  namespace: "default"
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: spring-cloud-dataflow
      app.kubernetes.io/component: skipper
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: test-mariadb
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
automountServiceAccountToken: false
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: test-rabbitmq
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
automountServiceAccountToken: false
secrets:
  - name: test-rabbitmq
---
# Source: spring-cloud-dataflow/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: test-spring-cloud-dataflow
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
  namespace: "default"
automountServiceAccountToken: false
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/secrets.yaml
apiVersion: v1
kind: Secret
metadata:
  name: test-mariadb
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
type: Opaque
data:
  mariadb-root-password: "NE82cjJ6Q01Vbw=="
  mariadb-password: "Y2hhbmdlLW1l"
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/config-secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: test-rabbitmq-config
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
type: Opaque
data:
  rabbitmq.conf: |-
    IyMgVXNlcm5hbWUgYW5kIHBhc3N3b3JkCmRlZmF1bHRfdXNlciA9IHVzZXIKIyMgQ2x1c3RlcmluZwojIwpjbHVzdGVyX25hbWUgPSB0ZXN0LXJhYmJpdG1xCmNsdXN0ZXJfZm9ybWF0aW9uLnBlZXJfZGlzY292ZXJ5X2JhY2tlbmQgID0gcmFiYml0X3BlZXJfZGlzY292ZXJ5X2s4cwpjbHVzdGVyX2Zvcm1hdGlvbi5rOHMuaG9zdCA9IGt1YmVybmV0ZXMuZGVmYXVsdApjbHVzdGVyX2Zvcm1hdGlvbi5rOHMuYWRkcmVzc190eXBlID0gaG9zdG5hbWUKY2x1c3Rlcl9mb3JtYXRpb24uazhzLnNlcnZpY2VfbmFtZSA9IHRlc3QtcmFiYml0bXEtaGVhZGxlc3MKY2x1c3Rlcl9mb3JtYXRpb24uazhzLmhvc3RuYW1lX3N1ZmZpeCA9IC50ZXN0LXJhYmJpdG1xLWhlYWRsZXNzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwKY2x1c3Rlcl9mb3JtYXRpb24ubm9kZV9jbGVhbnVwLmludGVydmFsID0gMTAKY2x1c3Rlcl9mb3JtYXRpb24ubm9kZV9jbGVhbnVwLm9ubHlfbG9nX3dhcm5pbmcgPSB0cnVlCmNsdXN0ZXJfcGFydGl0aW9uX2hhbmRsaW5nID0gYXV0b2hlYWwKCiMgcXVldWUgbWFzdGVyIGxvY2F0b3IKcXVldWVfbWFzdGVyX2xvY2F0b3IgPSBtaW4tbWFzdGVycwojIGVuYWJsZSBsb29wYmFjayB1c2VyCmxvb3BiYWNrX3VzZXJzLnVzZXIgPSBmYWxzZQojZGVmYXVsdF92aG9zdCA9IGRlZmF1bHQtdmhvc3QKI2Rpc2tfZnJlZV9saW1pdC5hYnNvbHV0ZSA9IDUwTUIKIyMgUHJvbWV0aGV1cyBtZXRyaWNzCiMjCnByb21ldGhldXMudGNwLnBvcnQgPSA5NDE5CiMjIFRDUCBMaXN0ZW4gT3B0aW9ucwojIwp0Y3BfbGlzdGVuX29wdGlvbnMuYmFja2xvZyA9IDEyOAp0Y3BfbGlzdGVuX29wdGlvbnMubm9kZWxheSA9IHRydWUKdGNwX2xpc3Rlbl9vcHRpb25zLmxpbmdlci5vbiAgICAgID0gdHJ1ZQp0Y3BfbGlzdGVuX29wdGlvbnMubGluZ2VyLnRpbWVvdXQgPSAwCnRjcF9saXN0ZW5fb3B0aW9ucy5rZWVwYWxpdmUgPSBmYWxzZQ==
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/secrets.yaml
apiVersion: v1
kind: Secret
metadata:
  name: test-rabbitmq
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
type: Opaque
data:
  rabbitmq-password: "V0J4QjJZbnBCZkgyeThaWA=="
  rabbitmq-erlang-cookie: "ZGhIbGs1M1drZ2dLS3VaYTMzOWo2blRFR3hWZU1QQjY="
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/primary/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-mariadb
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
    app.kubernetes.io/component: primary
data:
  my.cnf: |-
    [mysqld]
    skip-name-resolve
    explicit_defaults_for_timestamp
    basedir=/opt/bitnami/mariadb
    datadir=/bitnami/mariadb/data
    plugin_dir=/opt/bitnami/mariadb/plugin
    port=3306
    socket=/opt/bitnami/mariadb/tmp/mysql.sock
    tmpdir=/opt/bitnami/mariadb/tmp
    max_allowed_packet=16M
    bind-address=*
    pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
    log-error=/opt/bitnami/mariadb/logs/mysqld.log
    character-set-server=UTF8
    collation-server=utf8_general_ci
    slow_query_log=0
    long_query_time=10.0
    binlog_expire_logs_seconds=2592000
    
    [client]
    port=3306
    socket=/opt/bitnami/mariadb/tmp/mysql.sock
    default-character-set=UTF8
    plugin_dir=/opt/bitnami/mariadb/plugin
    
    [manager]
    port=3306
    socket=/opt/bitnami/mariadb/tmp/mysql.sock
    pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/primary/initialization-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-mariadb-init-scripts
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
    app.kubernetes.io/component: primary
data:
  create_databases.sql: |
    CREATE OR REPLACE USER 'skipper'@'%' identified by 'change-me';
    CREATE DATABASE IF NOT EXISTS `skipper`;
    GRANT ALL ON skipper.* to 'skipper'@'%';
    FLUSH PRIVILEGES;
---
# Source: spring-cloud-dataflow/templates/scripts-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-spring-cloud-dataflow-scripts
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
  namespace: "default"
data:
  wait-for-backends.sh: |-
    #!/bin/bash

    set -o errexit
    set -o pipefail
    set -o nounset

    # Auxiliary functions
    k8s_wait_for_statefulset() {
        namespace=${1:?namespace is missing}
        statefulset=${2:?statefulset name is missing}
        local -i return_code=0

        echo "Waiting for statefulset ${statefulset} to be successfully rolled out..."
        kubectl rollout status --namespace "$namespace" statefulset "$statefulset" >/dev/null 2>&1 || return_code=$?
        echo "Rollout exit code: '${return_code}'"
        return $return_code
    }
    k8s_wait_for_statefulset default test-mariadb
    k8s_wait_for_statefulset default test-rabbitmq
---
# Source: spring-cloud-dataflow/templates/server/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-spring-cloud-dataflow-server
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: server
  namespace: "default"
data:
  application.yaml: |-
    spring:
      cloud:
        dataflow:
          task:
            platform:
              kubernetes:
                accounts:
                  default:
                    limits:
                      cpu: 750m
                      ephemeral-storage: 2Gi
                      memory: 768Mi
                    requests:
                      cpu: 500m
                      ephemeral-storage: 50Mi
                      memory: 512Mi
                    readinessProbeDelay: 120
                    livenessProbeDelay: 90
                    podSecurityContext:
                      fsGroup: 1001
                      runAsUser: 1001
                    entryPointStyle: exec
        task:
          closecontextEnabled: true
      datasource:
        url: 'jdbc:mariadb://test-mariadb:3306/dataflow?useMysqlMetadata=true'
        driverClassName: org.mariadb.jdbc.Driver
        username: dataflow
        password: ${mariadb-password}
        testOnBorrow: true
        validationQuery: "SELECT 1"
      flyway:
        enabled: true
---
# Source: spring-cloud-dataflow/templates/skipper/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-spring-cloud-dataflow-skipper
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: skipper
  namespace: "default"
data:
  application.yaml: |-
    spring:
      cloud:
        skipper:
          server:
            platform:
              kubernetes:
                accounts:
                  default:
                    environmentVariables:
                      - SPRING_RABBITMQ_HOST=test-rabbitmq
                      - SPRING_RABBITMQ_PORT=5672
                      - SPRING_RABBITMQ_USERNAME=user
                      - SPRING_RABBITMQ_VIRTUAL_HOST=/
                      - SPRING_RABBITMQ_PASSWORD=${rabbitmq-password}
                    readinessProbeDelay: 120
                    livenessProbeDelay: 90
                    podSecurityContext:
                      fsGroup: 1001
                      runAsUser: 1001
                    entryPointStyle: exec
                    imagePullPolicy: IfNotPresent
      datasource:
        url: 'jdbc:mariadb://test-mariadb:3306/skipper?useMysqlMetadata=true'
        driverClassName: org.mariadb.jdbc.Driver
        username: skipper
        password: ${mariadb-password}
        testOnBorrow: true
        validationQuery: "SELECT 1"
      flyway:
        enabled: true
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/role.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: test-rabbitmq-endpoint-reader
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
rules:
  - apiGroups: [""]
    resources: ["endpoints"]
    verbs: ["get"]
  - apiGroups: [""]
    resources: ["events"]
    verbs: ["create"]
---
# Source: spring-cloud-dataflow/templates/role.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: test-spring-cloud-dataflow
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
  namespace: "default"
rules:
  - apiGroups:
      - ""
    resources:
      - services
      - pods
      - replicationcontrollers
      - persistentvolumeclaims
    verbs:
      - get
      - list
      - watch
      - create
      - delete
      - update
  - apiGroups:
      - ""
    resources:
      - configmaps
      - secrets
      - pods/log
      - pods/status
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - apps
    resources:
      - statefulsets
      - deployments
      - replicasets
    verbs:
      - get
      - list
      - watch
      - create
      - delete
      - update
      - patch
  - apiGroups:
      - extensions
    resources:
      - deployments
      - replicasets
    verbs:
      - get
      - list
      - watch
      - create
      - delete
      - update
      - patch
  - apiGroups:
      - batch
    resources:
      - cronjobs
      - jobs
    verbs:
      - get
      - list
      - watch
      - create
      - delete
      - update
      - patch
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/rolebinding.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: test-rabbitmq-endpoint-reader
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
subjects:
  - kind: ServiceAccount
    name: test-rabbitmq
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: test-rabbitmq-endpoint-reader
---
# Source: spring-cloud-dataflow/templates/rolebinding.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: test-spring-cloud-dataflow
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
  namespace: "default"
roleRef:
  kind: Role
  name: test-spring-cloud-dataflow
  apiGroup: rbac.authorization.k8s.io
subjects:
  - kind: ServiceAccount
    name: test-spring-cloud-dataflow
    namespace: "default"
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/headless-svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: test-mariadb-headless
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
spec:
  type: ClusterIP
  publishNotReadyAddresses: true
  clusterIP: None
  ports:
    - name: mysql
      port: 3306
      protocol: TCP
      targetPort: mysql
  selector:
    app.kubernetes.io/instance: test
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/part-of: mariadb
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/primary/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: test-mariadb
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
    app.kubernetes.io/component: primary
  annotations:
spec:
  type: ClusterIP
  sessionAffinity: None
  ports:
    - name: mysql
      port: 3306
      protocol: TCP
      targetPort: mysql
      nodePort: null
  selector:
    app.kubernetes.io/instance: test
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/component: primary
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
  name: test-rabbitmq-headless
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
spec:
  clusterIP: None
  ports:
    - name: epmd
      port: 4369
      targetPort: epmd
    - name: amqp
      port: 5672
      targetPort: amqp
    - name: dist
      port: 25672
      targetPort: dist
    - name: http-stats
      port: 15672
      targetPort: stats
  selector:
    app.kubernetes.io/instance: test
    app.kubernetes.io/name: rabbitmq
  publishNotReadyAddresses: true
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: test-rabbitmq
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
spec:
  type: ClusterIP
  sessionAffinity: None
  ports:
    - name: amqp
      port: 5672
      targetPort: amqp
      nodePort: null
    - name: epmd
      port: 4369
      targetPort: epmd
      nodePort: null
    - name: dist
      port: 25672
      targetPort: dist
      nodePort: null
    - name: http-stats
      port: 15672
      targetPort: stats
      nodePort: null
  selector:
    app.kubernetes.io/instance: test
    app.kubernetes.io/name: rabbitmq
---
# Source: spring-cloud-dataflow/templates/server/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: test-spring-cloud-dataflow-server
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: server
  namespace: "default"
spec:
  type: ClusterIP
  sessionAffinity: None
  ports:
    - name: http
      port: 8080
      targetPort: http
      nodePort: null
  selector:
    app.kubernetes.io/instance: test
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/component: server
---
# Source: spring-cloud-dataflow/templates/skipper/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: test-spring-cloud-dataflow-skipper
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: skipper
  namespace: "default"
spec:
  type: ClusterIP
  sessionAffinity: None
  ports:
    - name: http
      port: 80
      targetPort: http
      nodePort: null
  selector:
    app.kubernetes.io/instance: test
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/component: skipper
---
# Source: spring-cloud-dataflow/templates/server/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-spring-cloud-dataflow-server
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: server
  namespace: "default"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: spring-cloud-dataflow
      app.kubernetes.io/component: server
  strategy:
    type: RollingUpdate
  template:
    metadata:
      annotations:
        checksum/configuration: ddcb061f226ea498d7cf5f347113ab13e6fe944835defe7d1b60c1f43cc22a48
      labels:
        app.kubernetes.io/instance: test
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: spring-cloud-dataflow
        app.kubernetes.io/version: 2.11.5
        helm.sh/chart: spring-cloud-dataflow-34.2.1
        app.kubernetes.io/component: server
    spec:
      
      serviceAccountName: test-spring-cloud-dataflow
      automountServiceAccountToken: true
      affinity:
        podAffinity:
          
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/instance: test
                    app.kubernetes.io/name: spring-cloud-dataflow
                    app.kubernetes.io/component: server
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:
          
      securityContext:
        fsGroup: 1001
        fsGroupChangePolicy: Always
        supplementalGroups: []
        sysctls: []
      initContainers:
        - name: wait-for-backends
          image: docker.io/bitnami/kubectl:1.32.2-debian-12-r3
          imagePullPolicy: "IfNotPresent"
          command:
            - /scripts/wait-for-backends.sh
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          resources:
            limits:
              cpu: 150m
              ephemeral-storage: 2Gi
              memory: 192Mi
            requests:
              cpu: 100m
              ephemeral-storage: 50Mi
              memory: 128Mi
          volumeMounts:
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: scripts
              mountPath: /scripts/wait-for-backends.sh
              subPath: wait-for-backends.sh
      containers:
        - name: server
          image: docker.io/bitnami/spring-cloud-dataflow:2.11.5-debian-12-r9
          imagePullPolicy: "IfNotPresent"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: SERVER_PORT
              value: "8080"
            - name: SPRING_CLOUD_CONFIG_ENABLED
              value: "false"
            - name: SPRING_CLOUD_KUBERNETES_CONFIG_ENABLE_API
              value: "false"
            - name: SPRING_CLOUD_KUBERNETES_SECRETS_ENABLE_API
              value: "false"
            - name: SPRING_CLOUD_KUBERNETES_SECRETS_PATHS
              value: "/etc/secrets"
            - name: SPRING_CLOUD_DATAFLOW_SERVER_URI
              value: "http://test-spring-cloud-dataflow-server.default.svc.cluster.local:8080"
            - name: SPRING_CLOUD_DATAFLOW_FEATURES_STREAMS_ENABLED
              value: "true"
            - name: SPRING_CLOUD_DATAFLOW_FEATURES_TASKS_ENABLED
              value: "true"
            - name: SPRING_CLOUD_DATAFLOW_FEATURES_SCHEDULES_ENABLED
              value: "true"
            - name: SPRING_CLOUD_SKIPPER_CLIENT_SERVER_URI
              value: "http://test-spring-cloud-dataflow-skipper.default.svc.cluster.local/api"
            - name: SPRING_APPLICATION_JSON
              value: "{ \"maven\": { \"local-repository\": null, \"remote-repositories\": { \"repo1\": { \"url\": \"https://repo.spring.io/libs-snapshot\"} } } }"
            - name: KUBERNETES_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: KUBERNETES_TRUST_CERTIFICATES
              value: "false"
            - name: SPRING_CLOUD_DATAFLOW_TASK_COMPOSEDTASKRUNNER_URI
              value: 'docker://docker.io/bitnami/spring-cloud-dataflow-composed-task-runner:2.11.5-debian-12-r9'
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          livenessProbe:
            tcpSocket:
              port: http
            initialDelaySeconds: 120
            periodSeconds: 20
            timeoutSeconds: 1
            successThreshold: 1
            failureThreshold: 6
          readinessProbe:
            httpGet:
              path: /management/health
              port: http
            initialDelaySeconds: 120
            periodSeconds: 20
            timeoutSeconds: 1
            successThreshold: 1
            failureThreshold: 6
          resources:
            limits:
              cpu: 750m
              ephemeral-storage: 2Gi
              memory: 768Mi
            requests:
              cpu: 500m
              ephemeral-storage: 50Mi
              memory: 512Mi
          volumeMounts:
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: empty-dir
              mountPath: /.m2
              subPath: app-m2-dir
            - name: database
              mountPath: /etc/secrets/database
              readOnly: true
            - name: config
              mountPath: /opt/bitnami/spring-cloud-dataflow/conf
              readOnly: true
      volumes:
        - name: empty-dir
          emptyDir: {}
        - name: database
          secret:
            secretName: test-mariadb
        - name: config
          configMap:
            name: test-spring-cloud-dataflow-server
            items:
              - key: application.yaml
                path: application.yml
        - name: scripts
          configMap:
            name: test-spring-cloud-dataflow-scripts
            defaultMode: 0755
---
# Source: spring-cloud-dataflow/templates/skipper/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-spring-cloud-dataflow-skipper
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spring-cloud-dataflow
    app.kubernetes.io/version: 2.11.5
    helm.sh/chart: spring-cloud-dataflow-34.2.1
    app.kubernetes.io/component: skipper
  namespace: "default"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: spring-cloud-dataflow
      app.kubernetes.io/component: skipper
  strategy:
    type: RollingUpdate
  template:
    metadata:
      annotations:
        checksum/configuration: b5159adcd8f28999d857646ad2071e75e7a9173913cae5e09f3998cfd8ad77ff
      labels:
        app.kubernetes.io/instance: test
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: spring-cloud-dataflow
        app.kubernetes.io/version: 2.11.5
        helm.sh/chart: spring-cloud-dataflow-34.2.1
        app.kubernetes.io/component: skipper
    spec:
      
      serviceAccountName: test-spring-cloud-dataflow
      automountServiceAccountToken: true
      affinity:
        podAffinity:
          
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/instance: test
                    app.kubernetes.io/name: spring-cloud-dataflow
                    app.kubernetes.io/component: skipper
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:
          
      securityContext:
        fsGroup: 1001
        fsGroupChangePolicy: Always
        supplementalGroups: []
        sysctls: []
      initContainers:
        - name: wait-for-backends
          image: docker.io/bitnami/kubectl:1.32.2-debian-12-r3
          imagePullPolicy: "IfNotPresent"
          command:
            - /scripts/wait-for-backends.sh
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          resources:
            limits:
              cpu: 150m
              ephemeral-storage: 2Gi
              memory: 192Mi
            requests:
              cpu: 100m
              ephemeral-storage: 50Mi
              memory: 128Mi
          volumeMounts:
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: scripts
              mountPath: /scripts/wait-for-backends.sh
              subPath: wait-for-backends.sh
      containers:
        - name: skipper
          image: docker.io/bitnami/spring-cloud-skipper:2.11.5-debian-12-r10
          imagePullPolicy: "IfNotPresent"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: SERVER_PORT
              value: "7577"
            - name: SPRING_CLOUD_CONFIG_ENABLED
              value: "false"
            - name: SPRING_CLOUD_KUBERNETES_CONFIG_ENABLE_API
              value: "false"
            - name: SPRING_CLOUD_KUBERNETES_SECRETS_ENABLE_API
              value: "false"
            - name: SPRING_CLOUD_KUBERNETES_SECRETS_PATHS
              value: "/etc/secrets"
            - name: KUBERNETES_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: KUBERNETES_TRUST_CERTIFICATES
              value: "false"
          ports:
            - name: http
              containerPort: 7577
              protocol: TCP
          livenessProbe:
            tcpSocket:
              port: http
            initialDelaySeconds: 120
            periodSeconds: 20
            timeoutSeconds: 1
            successThreshold: 1
            failureThreshold: 6
          readinessProbe:
            httpGet:
              path: /actuator/health
              port: http
            initialDelaySeconds: 120
            periodSeconds: 20
            timeoutSeconds: 1
            successThreshold: 1
            failureThreshold: 6
          resources:
            limits:
              cpu: 750m
              ephemeral-storage: 2Gi
              memory: 768Mi
            requests:
              cpu: 500m
              ephemeral-storage: 50Mi
              memory: 512Mi
          volumeMounts:
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: database
              mountPath: /etc/secrets/database
              readOnly: true
            - name: config
              mountPath: /opt/bitnami/spring-cloud-skipper/conf
              readOnly: true
            - name: rabbitmq
              mountPath: /etc/secrets/rabbitmq
              readOnly: true
      volumes:
        - name: empty-dir
          emptyDir: {}
        - name: database
          secret:
            secretName: test-mariadb
        - name: config
          configMap:
            name: test-spring-cloud-dataflow-skipper
            items:
              - key: application.yaml
                path: application.yml
        - name: rabbitmq
          secret:
            secretName: test-rabbitmq
        - name: scripts
          configMap:
            name: test-spring-cloud-dataflow-scripts
            defaultMode: 0755
---
# Source: spring-cloud-dataflow/charts/mariadb/templates/primary/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: test-mariadb
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mariadb
    app.kubernetes.io/version: 11.4.5
    helm.sh/chart: mariadb-20.4.1
    app.kubernetes.io/part-of: mariadb
    app.kubernetes.io/component: primary
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: mariadb
      app.kubernetes.io/part-of: mariadb
      app.kubernetes.io/component: primary
  serviceName: test-mariadb-headless
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      annotations:
        checksum/configuration: 7924a68a70934c94b1c6ed6e0c4f52921a82e9160a5e31ae73d72c08cccc0caa
      labels:
        app.kubernetes.io/instance: test
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: mariadb
        app.kubernetes.io/version: 11.4.5
        helm.sh/chart: mariadb-20.4.1
        app.kubernetes.io/part-of: mariadb
        app.kubernetes.io/component: primary
    spec:
      
      automountServiceAccountToken: false
      serviceAccountName: test-mariadb
      affinity:
        podAffinity:
          
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/instance: test
                    app.kubernetes.io/name: mariadb
                    app.kubernetes.io/component: primary
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:
          
      securityContext:
        fsGroup: 1001
        fsGroupChangePolicy: Always
        supplementalGroups: []
        sysctls: []
      initContainers:
        - name: preserve-logs-symlinks
          image: docker.io/bitnami/mariadb:10.11.11-debian-12-r7
          imagePullPolicy: "IfNotPresent"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          resources:
            limits:
              cpu: 375m
              ephemeral-storage: 2Gi
              memory: 384Mi
            requests:
              cpu: 250m
              ephemeral-storage: 50Mi
              memory: 256Mi
          command:
            - /bin/bash
          args:
            - -ec
            - |
              #!/bin/bash

              . /opt/bitnami/scripts/libfs.sh
              # We copy the logs folder because it has symlinks to stdout and stderr
              if ! is_dir_empty /opt/bitnami/mariadb/logs; then
                cp -r /opt/bitnami/mariadb/logs /emptydir/app-logs-dir
              fi
          volumeMounts:
            - name: empty-dir
              mountPath: /emptydir
      containers:
        - name: mariadb
          image: docker.io/bitnami/mariadb:10.11.11-debian-12-r7
          imagePullPolicy: "IfNotPresent"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: MARIADB_ROOT_PASSWORD_FILE
              value: /opt/bitnami/mariadb/secrets/mariadb-root-password
            - name: MARIADB_USER
              value: "dataflow"
            - name: MARIADB_PASSWORD_FILE
              value: /opt/bitnami/mariadb/secrets/mariadb-password
            - name: MARIADB_DATABASE
              value: "dataflow"
            - name: MARIADB_ENABLE_SSL
              value: "no"
          ports:
            - name: mysql
              containerPort: 3306
          livenessProbe:
            failureThreshold: 3
            initialDelaySeconds: 120
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
            exec:
              command:
                - /bin/bash
                - -ec
                - |
                  password_aux="${MARIADB_ROOT_PASSWORD:-}"
                  if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
                      password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
                  fi
                  mariadb-admin status -uroot -p"${password_aux}"
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 30
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
            exec:
              command:
                - /bin/bash
                - -ec
                - |
                  password_aux="${MARIADB_ROOT_PASSWORD:-}"
                  if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
                      password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
                  fi
                  mariadb-admin ping -uroot -p"${password_aux}"
          resources:
            limits:
              cpu: 375m
              ephemeral-storage: 2Gi
              memory: 384Mi
            requests:
              cpu: 250m
              ephemeral-storage: 50Mi
              memory: 256Mi
          volumeMounts:
            - name: data
              mountPath: /bitnami/mariadb
            - name: custom-init-scripts
              mountPath: /docker-entrypoint-initdb.d
            - name: config
              mountPath: /opt/bitnami/mariadb/conf/my.cnf
              subPath: my.cnf
            - name: mariadb-credentials
              mountPath: /opt/bitnami/mariadb/secrets/
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: empty-dir
              mountPath: /opt/bitnami/mariadb/conf
              subPath: app-conf-dir
            - name: empty-dir
              mountPath: /opt/bitnami/mariadb/tmp
              subPath: app-tmp-dir
            - name: empty-dir
              mountPath: /opt/bitnami/mariadb/logs
              subPath: app-logs-dir
      volumes:
        - name: empty-dir
          emptyDir: {}
        - name: config
          configMap:
            name: test-mariadb
        - name: custom-init-scripts
          configMap:
            name: test-mariadb-init-scripts
        - name: mariadb-credentials
          secret:
            secretName: test-mariadb
            items:
              - key: mariadb-root-password
                path: mariadb-root-password
              - key: mariadb-password
                path: mariadb-password
  volumeClaimTemplates:
    - metadata:
        name: data
        labels:
          app.kubernetes.io/instance: test
          app.kubernetes.io/name: mariadb
          app.kubernetes.io/component: primary
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"
---
# Source: spring-cloud-dataflow/charts/rabbitmq/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: test-rabbitmq
  namespace: "default"
  labels:
    app.kubernetes.io/instance: test
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: rabbitmq
    app.kubernetes.io/version: 4.0.7
    helm.sh/chart: rabbitmq-15.3.3
spec:
  serviceName: test-rabbitmq-headless
  podManagementPolicy: OrderedReady
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: rabbitmq
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: test
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: rabbitmq
        app.kubernetes.io/version: 4.0.7
        helm.sh/chart: rabbitmq-15.3.3
      annotations:
        checksum/config: 14b42584f2c9f7ff9c857ec0a1ac9bab42795f148b7b001b84c1286ccd8b6540
        checksum/secret: ece83d70bb043fd51b9bf5553dcb64997eaa74ea5913bceaabadcdd9b401f5e4
    spec:
      
      serviceAccountName: test-rabbitmq
      affinity:
        podAffinity:
          
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/instance: test
                    app.kubernetes.io/name: rabbitmq
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:
          
      automountServiceAccountToken: true
      securityContext:
        fsGroup: 1001
        fsGroupChangePolicy: Always
        supplementalGroups: []
        sysctls: []
      terminationGracePeriodSeconds: 120
      enableServiceLinks: true
      initContainers:
        - name: prepare-plugins-dir
          image: docker.io/bitnami/rabbitmq:4.0.7-debian-12-r0
          imagePullPolicy: "IfNotPresent"
          resources:
            limits:
              cpu: 375m
              ephemeral-storage: 2Gi
              memory: 384Mi
            requests:
              cpu: 250m
              ephemeral-storage: 50Mi
              memory: 256Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          command:
            - /bin/bash
          args:
            - -ec
            - |
              #!/bin/bash

              . /opt/bitnami/scripts/liblog.sh

              info "Copying plugins dir to empty dir"
              # In order to not break the possibility of installing custom plugins, we need
              # to make the plugins directory writable, so we need to copy it to an empty dir volume
              cp -r --preserve=mode /opt/bitnami/rabbitmq/plugins/ /emptydir/app-plugins-dir
          volumeMounts:
            - name: empty-dir
              mountPath: /emptydir
      containers:
        - name: rabbitmq
          image: docker.io/bitnami/rabbitmq:4.0.7-debian-12-r0
          imagePullPolicy: "IfNotPresent"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          lifecycle:
            preStop:
              exec:
                command:
                  - /bin/bash
                  - -ec
                  - |
                    if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
                        /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t "120" -d "false"
                    else
                        rabbitmqctl stop_app
                    fi
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: MY_POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: RABBITMQ_FORCE_BOOT
              value: "no"
            - name: RABBITMQ_NODE_NAME
              value: "rabbit@$(MY_POD_NAME).test-rabbitmq-headless.$(MY_POD_NAMESPACE).svc.cluster.local"
            - name: RABBITMQ_UPDATE_PASSWORD
              value: "no"
            - name: RABBITMQ_MNESIA_DIR
              value: "/opt/bitnami/rabbitmq/.rabbitmq/mnesia/$(RABBITMQ_NODE_NAME)"
            - name: RABBITMQ_LDAP_ENABLE
              value: "no"
            - name: RABBITMQ_LOGS
              value: "-"
            - name: RABBITMQ_ULIMIT_NOFILES
              value: "65535"
            - name: RABBITMQ_USE_LONGNAME
              value: "true"
            - name: RABBITMQ_ERL_COOKIE
              valueFrom:
                secretKeyRef:
                  name: test-rabbitmq
                  key: rabbitmq-erlang-cookie
            - name: RABBITMQ_LOAD_DEFINITIONS
              value: "no"
            - name: RABBITMQ_DEFINITIONS_FILE
              value: "/app/load_definition.json"
            - name: RABBITMQ_SECURE_PASSWORD
              value: "yes"
            - name: RABBITMQ_USERNAME
              value: "user"
            - name: RABBITMQ_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: test-rabbitmq
                  key: rabbitmq-password
            - name: RABBITMQ_PLUGINS
              value: "rabbitmq_management, rabbitmq_peer_discovery_k8s, rabbitmq_auth_backend_ldap"
          envFrom:
          ports:
            - name: amqp
              containerPort: 5672
            - name: dist
              containerPort: 25672
            - name: stats
              containerPort: 15672
            - name: epmd
              containerPort: 4369
            - name: metrics
              containerPort: 9419
          livenessProbe:
            failureThreshold: 6
            initialDelaySeconds: 120
            periodSeconds: 30
            successThreshold: 1
            timeoutSeconds: 20
            exec:
              command:
                - sh
                - -ec
                - curl -f --user user:$RABBITMQ_PASSWORD 127.0.0.1:15672/api/health/checks/virtual-hosts
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 10
            periodSeconds: 30
            successThreshold: 1
            timeoutSeconds: 20
            exec:
              command:
                - sh
                - -ec
                - curl -f --user user:$RABBITMQ_PASSWORD 127.0.0.1:15672/api/health/checks/local-alarms
          resources:
            limits:
              cpu: 375m
              ephemeral-storage: 2Gi
              memory: 384Mi
            requests:
              cpu: 250m
              ephemeral-storage: 50Mi
              memory: 256Mi
          volumeMounts:
            - name: configuration
              mountPath: /bitnami/rabbitmq/conf
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: empty-dir
              mountPath: /opt/bitnami/rabbitmq/etc/rabbitmq
              subPath: app-conf-dir
            - name: empty-dir
              mountPath: /opt/bitnami/rabbitmq/var/lib/rabbitmq
              subPath: app-tmp-dir
            - name: empty-dir
              mountPath: /opt/bitnami/rabbitmq/.rabbitmq/
              subPath: app-erlang-cookie
            - name: empty-dir
              mountPath: /opt/bitnami/rabbitmq/var/log/rabbitmq
              subPath: app-logs-dir
            - name: empty-dir
              mountPath: /opt/bitnami/rabbitmq/plugins
              subPath: app-plugins-dir
            - name: data
              mountPath: /opt/bitnami/rabbitmq/.rabbitmq/mnesia
      volumes:
        - name: empty-dir
          emptyDir: {}
        - name: configuration
          projected:
            sources:
              - secret:
                  name: test-rabbitmq-config
  volumeClaimTemplates:
    - apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: data
        labels:
          app.kubernetes.io/instance: test
          app.kubernetes.io/name: rabbitmq
      spec:
        accessModes:
            - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"
