@hed-hog/cli 0.0.79 → 0.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ apiVersion: v2
2
+ name: postgresql-<%= config.appName %>
3
+ description: Helm chart for postgres service (generated from docker-compose)
4
+ type: application
5
+ version: 0.1.0
6
+ appVersion: 1.0.0
@@ -0,0 +1,14 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: {{ printf "%s-headless" .Values.workloadName }}
5
+ namespace: {{ .Values.namespace }}
6
+ spec:
7
+ clusterIP: None
8
+ selector:
9
+ app: {{ .Values.workloadName }}
10
+ ports:
11
+ - name: tcp
12
+ protocol: TCP
13
+ port: {{ .Values.service.port }}
14
+ targetPort: {{ .Values.service.port }}
@@ -0,0 +1,18 @@
1
+ {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
2
+ apiVersion: v1
3
+ kind: PersistentVolumeClaim
4
+ metadata:
5
+ name: {{ .Values.serviceName }}-pvc
6
+ namespace: {{ .Values.namespace }}
7
+ spec:
8
+ accessModes:
9
+ {{- range .Values.persistence.accessModes }}
10
+ - {{ . }}
11
+ {{- end }}
12
+ resources:
13
+ requests:
14
+ storage: {{ .Values.persistence.size }}
15
+ {{- if .Values.persistence.storageClassName }}
16
+ storageClassName: {{ .Values.persistence.storageClassName }}
17
+ {{- end }}
18
+ {{- end }}
@@ -0,0 +1,9 @@
1
+ {{- $secret := lookup "v1" "Secret" .Values.namespace .Values.auth.secretName -}}
2
+ apiVersion: v1
3
+ kind: Secret
4
+ metadata:
5
+ name: {{ .Values.auth.secretName }}
6
+ namespace: {{ .Values.namespace }}
7
+ type: Opaque
8
+ data:
9
+ {{ .Values.auth.passwordKey }}: {{- if and $secret (hasKey $secret.data .Values.auth.passwordKey) }} {{ index $secret.data .Values.auth.passwordKey }} {{- else }} {{ randAlphaNum 32 | b64enc }} {{- end }}
@@ -0,0 +1,14 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: {{ .Values.serviceName }}
5
+ namespace: {{ .Values.namespace }}
6
+ spec:
7
+ type: {{ .Values.service.type }}
8
+ selector:
9
+ app: {{ .Values.workloadName }}
10
+ ports:
11
+ - name: tcp
12
+ protocol: TCP
13
+ port: {{ .Values.service.port }}
14
+ targetPort: {{ .Values.service.port }}
@@ -0,0 +1,42 @@
1
+ apiVersion: apps/v1
2
+ kind: StatefulSet
3
+ metadata:
4
+ name: {{ .Values.workloadName }}
5
+ namespace: {{ .Values.namespace }}
6
+ spec:
7
+ serviceName: {{ printf "%s-headless" .Values.workloadName }}
8
+ replicas: {{ .Values.replicas }}
9
+ selector:
10
+ matchLabels:
11
+ app: {{ .Values.workloadName }}
12
+ template:
13
+ metadata:
14
+ labels:
15
+ app: {{ .Values.workloadName }}
16
+ spec:
17
+ containers:
18
+ - name: {{ .Values.workloadName }}
19
+ image: {{ .Values.image }}
20
+ env:
21
+ - name: POSTGRES_DB
22
+ value: {{ .Values.auth.database | quote }}
23
+ - name: POSTGRES_USER
24
+ value: {{ .Values.auth.username | quote }}
25
+ - name: POSTGRES_PASSWORD
26
+ valueFrom:
27
+ secretKeyRef:
28
+ name: {{ .Values.auth.secretName }}
29
+ key: {{ .Values.auth.passwordKey }}
30
+ ports:
31
+ - containerPort: {{ .Values.service.port }}
32
+ {{- if .Values.persistence.enabled }}
33
+ volumeMounts:
34
+ - name: postgres-data
35
+ mountPath: {{ .Values.persistence.mountPath }}
36
+ {{- end }}
37
+ {{- if .Values.persistence.enabled }}
38
+ volumes:
39
+ - name: postgres-data
40
+ persistentVolumeClaim:
41
+ claimName: {{ default (printf "%s-pvc" .Values.serviceName) .Values.persistence.existingClaim }}
42
+ {{- end }}
@@ -0,0 +1,24 @@
1
+ namespace: <%= config.namespace %>
2
+ serviceName: postgresql-<%= config.appName %>
3
+ workloadName: postgresql-<%= config.appName %>
4
+ image: <%= service.image || 'postgres:18' %>
5
+ replicas: 1
6
+
7
+ auth:
8
+ database: <%= postgresDbName %>
9
+ username: postgres
10
+ secretName: postgresql-<%= config.appName %>-auth
11
+ passwordKey: postgres-password
12
+
13
+ persistence:
14
+ enabled: false
15
+ mountPath: /var/lib/postgresql/data
16
+ accessModes:
17
+ - ReadWriteOnce
18
+ size: 8Gi
19
+ storageClassName: ""
20
+ existingClaim: ""
21
+
22
+ service:
23
+ type: ClusterIP
24
+ port: <%= servicePort %>
@@ -17,10 +17,12 @@
17
17
  "emitDecoratorMetadata": true,
18
18
  "types": ["node"],
19
19
  "paths": {
20
- "@prisma/client": [
20
+ "@prisma/client": [
21
+ "../../node_modules/.prisma/client",
21
22
  "../../packages/api-prisma/node_modules/.prisma/client"
22
23
  ],
23
24
  "@prisma/client/*": [
25
+ "../../node_modules/.prisma/client/*",
24
26
  "../../packages/api-prisma/node_modules/.prisma/client/*"
25
27
  ],
26
28
  "@hed-hog/api": ["../../packages/api/dist"],