diff --git a/charts/azdo-proxy/Chart.yaml b/charts/azdo-proxy/Chart.yaml index 5690df0..3c47f68 100644 --- a/charts/azdo-proxy/Chart.yaml +++ b/charts/azdo-proxy/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: azdo-proxy description: A Helm chart for azdo-proxy type: application -version: v0.3.2 -appVersion: v0.3.2 +version: v0.3.3 +appVersion: v0.3.3 diff --git a/charts/azdo-proxy/templates/deployment.yaml b/charts/azdo-proxy/templates/deployment.yaml index ec15dfa..2071f34 100644 --- a/charts/azdo-proxy/templates/deployment.yaml +++ b/charts/azdo-proxy/templates/deployment.yaml @@ -56,7 +56,7 @@ spec: volumes: - name: config secret: - secretName: {{ .Values.configSecretName }} + secretName: {{ include "azdo-proxy.fullname" . }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/azdo-proxy/templates/networkpolicy.yaml b/charts/azdo-proxy/templates/networkpolicy.yaml new file mode 100644 index 0000000..1d6e045 --- /dev/null +++ b/charts/azdo-proxy/templates/networkpolicy.yaml @@ -0,0 +1,18 @@ +{{- if .Values.networkPolicy.enabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "azdo-proxy.fullname" . }}-deny-ingress + labels: + {{- include "azdo-proxy.labels" . | nindent 4 }} +spec: + policyTypes: + - Ingress + - Egress + ingress: + - from: + - podSelector: {} + egress: + - {} + podSelector: {} +{{- end }} diff --git a/charts/azdo-proxy/templates/secret.yaml b/charts/azdo-proxy/templates/secret.yaml new file mode 100644 index 0000000..c2c3d4d --- /dev/null +++ b/charts/azdo-proxy/templates/secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "azdo-proxy.fullname" . }} + labels: + {{- include "azdo-proxy.labels" . | nindent 4 }} +data: + config.json: {{ required "Config has to be set." .Values.config }} diff --git a/charts/azdo-proxy/templates/tests/test-connection.yaml b/charts/azdo-proxy/templates/tests/test-connection.yaml deleted file mode 100644 index b11b03b..0000000 --- a/charts/azdo-proxy/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "azdo-proxy.fullname" . }}-test-connection" - labels: - {{- include "azdo-proxy.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "azdo-proxy.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/azdo-proxy/values.yaml b/charts/azdo-proxy/values.yaml index 9110747..183bc97 100644 --- a/charts/azdo-proxy/values.yaml +++ b/charts/azdo-proxy/values.yaml @@ -44,4 +44,7 @@ tolerations: [] affinity: {} -configSecretName: "" +networkPolicy: + enabled: false + +config: ""