{{- if .Values.enableArcExtension }}
{{- if .Values.Azure.proxySettings.isProxyEnabled }}
apiVersion: v1
kind: Secret
metadata:
  name: arc-proxy-config
  namespace: {{ .Release.Namespace }}
type: Opaque
data:
  {{- if .Values.Azure.proxySettings.httpProxy }}
    HTTP_PROXY: {{.Values.Azure.proxySettings.httpProxy | b64enc | quote}}
  {{- end }}
  {{- if .Values.Azure.proxySettings.httpsProxy }}
    HTTPS_PROXY: {{.Values.Azure.proxySettings.httpsProxy | b64enc | quote}}
  {{- end }}
  {{- if .Values.Azure.proxySettings.noProxy }}
    NO_PROXY: {{.Values.Azure.proxySettings.noProxy | b64enc | quote}}
  {{- end }}
---
{{- if .Values.Azure.proxySettings.proxyCert }}
apiVersion: v1
kind: Secret
metadata:
  name: arc-proxy-cert
  namespace: {{ .Release.Namespace }}
type: Opaque
data: 
  proxy-cert.crt: {{.Values.Azure.proxySettings.proxyCert | b64enc | quote}}
{{- end }}
{{- end }}
{{- end }}
