diff --git a/charts/vald/templates/index/job/correction/networkpolicy.yaml b/charts/vald/templates/index/job/correction/networkpolicy.yaml deleted file mode 100644 index a780880ec9..0000000000 --- a/charts/vald/templates/index/job/correction/networkpolicy.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2019-2023 vdaas.org vald team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -{{- $agent := .Values.agent -}} -{{- $discoverer := .Values.discoverer -}} -{{- $corrector := .Values.manager.index.corrector -}} -{{- if and .Values.defaults.networkPolicy.enabled $corrector.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ $corrector.name }}-allow -spec: - podSelector: - matchLabels: - app: {{ $corrector.name }} - policyTypes: - - Ingress - - Egress - ingress: - - from: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: kube-system - {{- if .Values.defaults.networkPolicy.custom.ingress }} - {{- toYaml .Values.defaults.networkPolicy.custom.ingress | nindent 4 }} - {{- end }} - egress: - - to: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: {{ .Release.Namespace }} - podSelector: - matchLabels: - app: {{ $agent.name }} - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: {{ .Release.Namespace }} - podSelector: - matchLabels: - app: {{ $discoverer.name }} - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: kube-system - {{- if .Values.defaults.networkPolicy.custom.egress }} - {{- toYaml .Values.defaults.networkPolicy.custom.egress | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/vald/templates/index/job/creation/networkpolicy.yaml b/charts/vald/templates/index/job/creation/networkpolicy.yaml deleted file mode 100644 index 597ed01d54..0000000000 --- a/charts/vald/templates/index/job/creation/networkpolicy.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2019-2023 vdaas.org vald team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -{{- $agent := .Values.agent -}} -{{- $discoverer := .Values.discoverer -}} -{{- $creator := .Values.manager.index.creator -}} -{{- if and .Values.defaults.networkPolicy.enabled $creator.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ $creator.name }}-allow -spec: - podSelector: - matchLabels: - app: {{ $creator.name }} - policyTypes: - - Ingress - - Egress - ingress: - - from: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: kube-system - {{- if .Values.defaults.networkPolicy.custom.ingress }} - {{- toYaml .Values.defaults.networkPolicy.custom.ingress | nindent 4 }} - {{- end }} - egress: - - to: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: {{ .Release.Namespace }} - podSelector: - matchLabels: - app: {{ $agent.name }} - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: {{ .Release.Namespace }} - podSelector: - matchLabels: - app: {{ $discoverer.name }} - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: kube-system - {{- if .Values.defaults.networkPolicy.custom.egress }} - {{- toYaml .Values.defaults.networkPolicy.custom.egress | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/vald/templates/index/job/save/networkpolicy.yaml b/charts/vald/templates/index/job/save/networkpolicy.yaml deleted file mode 100644 index 0c428b5f42..0000000000 --- a/charts/vald/templates/index/job/save/networkpolicy.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2019-2023 vdaas.org vald team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -{{- $agent := .Values.agent -}} -{{- $discoverer := .Values.discoverer -}} -{{- $saver := .Values.manager.index.saver -}} -{{- if and .Values.defaults.networkPolicy.enabled $saver.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ $saver.name }}-allow -spec: - podSelector: - matchLabels: - app: {{ $saver.name }} - policyTypes: - - Ingress - - Egress - ingress: - - from: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: kube-system - {{- if .Values.defaults.networkPolicy.custom.ingress }} - {{- toYaml .Values.defaults.networkPolicy.custom.ingress | nindent 4 }} - {{- end }} - egress: - - to: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: {{ .Release.Namespace }} - podSelector: - matchLabels: - app: {{ $agent.name }} - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: {{ .Release.Namespace }} - podSelector: - matchLabels: - app: {{ $discoverer.name }} - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: kube-system - {{- if .Values.defaults.networkPolicy.custom.egress }} - {{- toYaml .Values.defaults.networkPolicy.custom.egress | nindent 4 }} - {{- end }} -{{- end }} diff --git a/k8s/index/job/correction/networkpolicy.yaml b/k8s/index/job/correction/networkpolicy.yaml deleted file mode 100644 index ed97d539c0..0000000000 --- a/k8s/index/job/correction/networkpolicy.yaml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/k8s/index/job/creation/networkpolicy.yaml b/k8s/index/job/creation/networkpolicy.yaml deleted file mode 100644 index ed97d539c0..0000000000 --- a/k8s/index/job/creation/networkpolicy.yaml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/k8s/index/job/save/networkpolicy.yaml b/k8s/index/job/save/networkpolicy.yaml deleted file mode 100644 index ed97d539c0..0000000000 --- a/k8s/index/job/save/networkpolicy.yaml +++ /dev/null @@ -1 +0,0 @@ ----