blob: 2d0729481f235e9e790864d5b0b93722d94a15c8 [file] [log] [blame]
gio3a375eb2026-07-29 16:00:22 +04001apiVersion: v1
2kind: Service
3metadata:
4 name: goproxy
5 namespace: {{ .Release.Namespace }}
6spec:
7 type: ClusterIP
8 selector:
9 app: goproxy
10 ports:
11 - name: http
12 port: {{ .Values.servicePort }}
13 targetPort: http
14 protocol: TCP
15---
16apiVersion: apps/v1
17kind: Deployment
18metadata:
19 name: goproxy
20 namespace: {{ .Release.Namespace }}
21spec:
22 selector:
23 matchLabels:
24 app: goproxy
25 replicas: 1
26 template:
27 metadata:
28 labels:
29 app: goproxy
30 spec:
31 securityContext:
32 fsGroup: 65534
33 fsGroupChangePolicy: OnRootMismatch
34 containers:
35 - name: goproxy
36 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
37 imagePullPolicy: {{ .Values.image.pullPolicy }}
38 ports:
39 - name: http
40 containerPort: {{ .Values.port }}
41 protocol: TCP
42 command:
43 - /usr/local/bin/goproxy
44 - server
45 - --address=:{{ .Values.port }}
46 - --cacher-dir=/go/pkg/mod
47 env:
48 - name: GOMODCACHE
49 value: /go/pkg/mod
50 volumeMounts:
51 - name: cache-volume
52 mountPath: /go/pkg/mod
53 securityContext:
54 runAsUser: 65534
55 runAsGroup: 65534
56 volumes:
57 - name: cache-volume
58 persistentVolumeClaim:
59 claimName: {{ .Values.persistentVolumeClaimName }}
60 tolerations:
61 - key: "pcloud"
62 operator: "Equal"
63 value: "role"
64 effect: "NoSchedule"