| giolekva | e55bfe5 | 2022-05-16 22:15:13 +0400 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: rpuppy |
| 5 | namespace: {{ .Release.Namespace }} |
| 6 | spec: |
| Giorgi Lekveishvili | fab9bf4 | 2023-05-19 11:18:02 +0400 | [diff] [blame] | 7 | type: ClusterIP |
| giolekva | e55bfe5 | 2022-05-16 22:15:13 +0400 | [diff] [blame] | 8 | selector: |
| 9 | app: rpuppy |
| 10 | ports: |
| 11 | - name: http |
| 12 | port: 80 |
| 13 | targetPort: http |
| 14 | protocol: TCP |
| Giorgi Lekveishvili | 8ffa0ad | 2023-05-19 16:14:14 +0400 | [diff] [blame] | 15 | # --- |
| 16 | # apiVersion: cert-manager.io/v1 |
| 17 | # kind: Certificate |
| 18 | # metadata: |
| 19 | # name: rpuppy |
| 20 | # namespace: {{ .Release.Namespace }} |
| 21 | # # annotations: |
| 22 | # # helm.sh/resource-policy: keep |
| 23 | # spec: |
| 24 | # secretName: cert-rpuppy |
| 25 | # dnsNames: |
| 26 | # - {{ .Values.domain }} |
| 27 | # issuerRef: |
| 28 | # kind: ClusterIssuer |
| 29 | # name: {{ .Values.certificateIssuer}} |
| Giorgi Lekveishvili | fab9bf4 | 2023-05-19 11:18:02 +0400 | [diff] [blame] | 30 | --- |
| 31 | apiVersion: networking.k8s.io/v1 |
| 32 | kind: Ingress |
| 33 | metadata: |
| 34 | name: ingress |
| 35 | namespace: {{ .Release.Namespace }} |
| Giorgi Lekveishvili | 15335c2 | 2023-06-29 22:38:17 +0400 | [diff] [blame] | 36 | {{- if .Values.certificateIssuer }} |
| Giorgi Lekveishvili | 0610777 | 2023-05-19 15:36:57 +0400 | [diff] [blame] | 37 | annotations: |
| 38 | acme.cert-manager.io/http01-edit-in-place: "true" |
| Giorgi Lekveishvili | 15335c2 | 2023-06-29 22:38:17 +0400 | [diff] [blame] | 39 | cert-manager.io/cluster-issuer: {{ .Values.certificateIssuer }} |
| 40 | {{- end }} |
| Giorgi Lekveishvili | fab9bf4 | 2023-05-19 11:18:02 +0400 | [diff] [blame] | 41 | spec: |
| 42 | ingressClassName: {{ .Values.ingressClassName }} |
| Giorgi Lekveishvili | 15335c2 | 2023-06-29 22:38:17 +0400 | [diff] [blame] | 43 | {{- if .Values.certificateIssuer }} |
| Giorgi Lekveishvili | fab9bf4 | 2023-05-19 11:18:02 +0400 | [diff] [blame] | 44 | tls: |
| 45 | - hosts: |
| 46 | - {{ .Values.domain }} |
| 47 | secretName: cert-rpuppy |
| Giorgi Lekveishvili | 15335c2 | 2023-06-29 22:38:17 +0400 | [diff] [blame] | 48 | {{- end }} |
| Giorgi Lekveishvili | fab9bf4 | 2023-05-19 11:18:02 +0400 | [diff] [blame] | 49 | rules: |
| 50 | - host: {{ .Values.domain }} |
| 51 | http: |
| 52 | paths: |
| 53 | - path: / |
| 54 | pathType: Prefix |
| 55 | backend: |
| 56 | service: |
| 57 | name: rpuppy |
| 58 | port: |
| 59 | name: http |
| giolekva | e55bfe5 | 2022-05-16 22:15:13 +0400 | [diff] [blame] | 60 | --- |
| 61 | apiVersion: apps/v1 |
| 62 | kind: Deployment |
| 63 | metadata: |
| 64 | name: rpuppy |
| 65 | namespace: {{ .Release.Namespace }} |
| 66 | spec: |
| 67 | selector: |
| 68 | matchLabels: |
| 69 | app: rpuppy |
| 70 | replicas: 1 |
| 71 | template: |
| 72 | metadata: |
| 73 | labels: |
| 74 | app: rpuppy |
| 75 | spec: |
| 76 | containers: |
| 77 | - name: rpuppy |
| 78 | image: {{ .Values.image.repository }}:{{ .Values.image.tag }} |
| 79 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 80 | ports: |
| 81 | - name: http |
| 82 | containerPort: 8080 |
| 83 | protocol: TCP |
| 84 | command: ["rpuppy", "--port=8080"] |
| 85 | resources: |
| 86 | requests: |
| 87 | memory: "10Mi" |
| 88 | cpu: "10m" |
| 89 | limits: |
| 90 | memory: "20Mi" |
| 91 | cpu: "100m" |
| 92 | tolerations: |
| 93 | - key: "pcloud" |
| 94 | operator: "Equal" |
| 95 | value: "role" |
| 96 | effect: "NoSchedule" |