From ecb0dc291f314125e6305ee399daa5108b6b02b4 Mon Sep 17 00:00:00 2001 From: CEE Date: Fri, 6 Sep 2024 02:41:31 +0900 Subject: [PATCH] =?UTF-8?q?volume=20=EC=9D=B4=EB=A0=87=EA=B2=8C=20?= =?UTF-8?q?=ED=95=98=EB=A9=B4=20=EC=95=88=EB=90=98=EC=A7=80=EB=A7=8C...=20?= =?UTF-8?q?=ED=98=BC=EC=9E=90=20=EC=93=B8=EA=B1=B4=EB=8D=B0=20=EA=B7=80?= =?UTF-8?q?=EC=B0=AE=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helm/templates/config.yaml | 49 +++++++++++++++++++++++++++++++ helm/templates/service-local.yaml | 17 +++++++++++ helm/values.yaml | 39 +++++++++++++++++------- 3 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 helm/templates/config.yaml create mode 100644 helm/templates/service-local.yaml diff --git a/helm/templates/config.yaml b/helm/templates/config.yaml new file mode 100644 index 0000000..088abb5 --- /dev/null +++ b/helm/templates/config.yaml @@ -0,0 +1,49 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "proxynd.fullname" . }}-files +data: + proxynd_global.yaml: |- + cache: + ttl: 3600 + proxynd_apt-proxy.yaml: |- + path: proxy/apt + #cache: + # enabled: false + # retention_time: 1h + # evict: 1h + proxies: + ubuntu: + - name: official + url: http://archive.ubuntu.com/ubuntu + - name: kakao + url: http://mirror.kakao.com/ubuntu + - name: ubuntu-security + url: http://security.ubuntu.com/ubuntu + debian: + - name: official + url: http://ftp.debian.org/debian + proxynd_maven-proxy.yaml: |- + path: proxy/maven + use_cache: true + # https://docs.gradle.org/current/userguide/declaring_repositories.html + proxies: + - name: Maven Center + id: maven-center + url: https://repo.maven.apache.org/maven2/ + description: "maven centeral" + - name: jcener + id: jcenter + url: https://jcenter.bintray.com + - name: google + id: google + url: https://maven.google.com + # https://repo.spring.io/webapp/#/home + - name: spring_release + id: repo.spring.io-releases + url: https://repo.spring.io/release + - name: spring_snapshots + id: repo.spring.io-snapshots + url: https://repo.spring.io/snapshot + + diff --git a/helm/templates/service-local.yaml b/helm/templates/service-local.yaml new file mode 100644 index 0000000..36833dd --- /dev/null +++ b/helm/templates/service-local.yaml @@ -0,0 +1,17 @@ +{{- if .Values.serviceLocal.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "proxynd.fullname" . }}-local + labels: + {{- include "proxynd.labels" . | nindent 4 }} +spec: + type: {{ .Values.serviceLocal.type }} + ports: + - port: {{ .Values.serviceLocal.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "proxynd.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 7198e6a..8a39aa3 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -38,6 +38,11 @@ service: type: ClusterIP port: 8080 +serviceLocal: + enabled: false + type: LoadBalancer + port: 18080 + ingress: enabled: false className: "" @@ -68,25 +73,37 @@ resources: {} livenessProbe: httpGet: - path: / + path: /healthz port: http readinessProbe: httpGet: - path: / + path: /healthz port: http # Additional volumes on the output Deployment definition. -volumes: [] -# - name: foo -# secret: -# secretName: mysecret -# optional: false +volumes: + - name: "proxynd-configmap-volume-mount-files" + configMap: + name: "proxynd-configmap-files" + items: + - key: proxynd_global.yaml + path: global.yaml + - key: proxynd_apt-proxy.yaml + path: apt-proxy.yaml + - key: proxynd_maven-proxy.yaml + path: maven-proxy.yaml # Additional volumeMounts on the output Deployment definition. -volumeMounts: [] -# - name: foo -# mountPath: "/etc/foo" -# readOnly: true +volumeMounts: + - name: "proxynd-configmap-volume-mount-files" + mountPath: /config/global.yaml + subPath: global.yaml + - name: "proxynd-configmap-volume-mount-files" + mountPath: /config/apt-proxy.yaml + subPath: apt-proxy.yaml + - name: "proxynd-configmap-volume-mount-files" + mountPath: /config/maven-proxy.yaml + subPath: maven-proxy.yaml nodeSelector: {}