diff --git a/component/main.jsonnet b/component/main.jsonnet index f390a5c9..1f63a6bd 100644 --- a/component/main.jsonnet +++ b/component/main.jsonnet @@ -202,7 +202,7 @@ local k8up_schedule = // Define outputs below { '00_namespace': namespace, - [if params.replicas >= 2 then '01_networkpolicy_infinispan']: networkpolicy_infinispan, + [if params.helm_values.networkPolicy.enabled && params.replicas >= 2 then '01_networkpolicy_infinispan']: networkpolicy_infinispan, [if params.ingress.enabled && params.helm_values.networkPolicy.enabled then '01_ingress_controller_ns_patch']: ns_patch, '10_admin_secret': admin_secret, '11_db_secret': db_secret, diff --git a/tests/golden/builtin/builtin/builtin/01_networkpolicy_infinispan.yaml b/tests/golden/builtin/builtin/builtin/01_networkpolicy_infinispan.yaml deleted file mode 100644 index 0344dfd4..00000000 --- a/tests/golden/builtin/builtin/builtin/01_networkpolicy_infinispan.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - annotations: {} - labels: - app.kubernetes.io/component: keycloak - app.kubernetes.io/instance: builtin - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: keycloak - name: keycloakx-infinispan - name: keycloakx-infinispan -spec: - egress: [] - ingress: - - from: - - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - ports: - - port: 7800 - protocol: TCP - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - policyTypes: - - Ingress diff --git a/tests/golden/external/external/external/01_networkpolicy_infinispan.yaml b/tests/golden/external/external/external/01_networkpolicy_infinispan.yaml deleted file mode 100644 index 5b66e80a..00000000 --- a/tests/golden/external/external/external/01_networkpolicy_infinispan.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - annotations: {} - labels: - app.kubernetes.io/component: keycloak - app.kubernetes.io/instance: external - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: keycloak - name: keycloakx-infinispan - name: keycloakx-infinispan -spec: - egress: [] - ingress: - - from: - - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - ports: - - port: 7800 - protocol: TCP - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - policyTypes: - - Ingress diff --git a/tests/golden/openshift-postgres/openshift-postgres/openshift-postgres/01_networkpolicy_infinispan.yaml b/tests/golden/openshift-postgres/openshift-postgres/openshift-postgres/01_networkpolicy_infinispan.yaml deleted file mode 100644 index 844bbad2..00000000 --- a/tests/golden/openshift-postgres/openshift-postgres/openshift-postgres/01_networkpolicy_infinispan.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - annotations: {} - labels: - app.kubernetes.io/component: keycloak - app.kubernetes.io/instance: openshift-postgres - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: keycloak - name: keycloakx-infinispan - name: keycloakx-infinispan -spec: - egress: [] - ingress: - - from: - - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - ports: - - port: 7800 - protocol: TCP - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - policyTypes: - - Ingress diff --git a/tests/golden/openshift/openshift/openshift/01_networkpolicy_infinispan.yaml b/tests/golden/openshift/openshift/openshift/01_networkpolicy_infinispan.yaml deleted file mode 100644 index bdc0c4c8..00000000 --- a/tests/golden/openshift/openshift/openshift/01_networkpolicy_infinispan.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - annotations: {} - labels: - app.kubernetes.io/component: keycloak - app.kubernetes.io/instance: openshift - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: keycloak - name: keycloakx-infinispan - name: keycloakx-infinispan -spec: - egress: [] - ingress: - - from: - - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - ports: - - port: 7800 - protocol: TCP - podSelector: - matchLabels: - app.kubernetes.io/instance: keycloakx - app.kubernetes.io/name: keycloakx - policyTypes: - - Ingress