update
This commit is contained in:
@@ -24,12 +24,13 @@ APP VERSION: {{ .Chart.AppVersion }}
|
|||||||
2. Check the status of the pods:
|
2. Check the status of the pods:
|
||||||
kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "timetracker.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "timetracker.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||||
|
|
||||||
3. PostgreSQL Credentials:
|
3. External PostgreSQL:
|
||||||
Username: {{ .Values.postgresql.auth.username }}
|
This chart requires an existing PostgreSQL database.
|
||||||
Password: {{ .Values.postgresql.auth.password }}
|
Configured connection: {{ .Values.postgresql.url }}
|
||||||
Database: {{ .Values.postgresql.auth.database }}
|
|
||||||
|
|
||||||
IMPORTANT NOTES:
|
IMPORTANT NOTES:
|
||||||
|
- Ensure your external PostgreSQL database is reachable from within the cluster before installing.
|
||||||
|
- Set postgresql.url in values.yaml to point to your existing database.
|
||||||
- Make sure to change the OIDC configuration in values.yaml
|
- Make sure to change the OIDC configuration in values.yaml
|
||||||
- Change the SESSION_SECRET from the default value for production
|
- Change the SESSION_SECRET from the default value for production
|
||||||
- Configure ingress host and TLS settings for your environment
|
- Configure ingress host and TLS settings for your environment
|
||||||
|
|||||||
@@ -61,14 +61,6 @@ Create the name of the service account to use
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
|
||||||
PostgreSQL labels
|
|
||||||
*/}}
|
|
||||||
{{- define "timetracker.postgresql.labels" -}}
|
|
||||||
{{ include "timetracker.labels" . }}
|
|
||||||
app.kubernetes.io/component: postgresql
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Backend labels
|
Backend labels
|
||||||
*/}}
|
*/}}
|
||||||
@@ -101,10 +93,3 @@ Frontend selector labels
|
|||||||
app.kubernetes.io/component: frontend
|
app.kubernetes.io/component: frontend
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
|
||||||
PostgreSQL selector labels
|
|
||||||
*/}}
|
|
||||||
{{- define "timetracker.postgresql.selectorLabels" -}}
|
|
||||||
{{ include "timetracker.selectorLabels" . }}
|
|
||||||
app.kubernetes.io/component: postgresql
|
|
||||||
{{- end }}','description':'Creates a comprehensive helpers.tpl file with standard Kubernetes naming conventions and label helpers for timetracker application components'}] <|tool_calls_section_begin|><|tool_call_begin|>functions.create_new_file:48<|tool_call_argument_begin|>{
|
|
||||||
@@ -30,8 +30,26 @@ spec:
|
|||||||
value: {{ .Values.backend.env.nodeEnv | quote }}
|
value: {{ .Values.backend.env.nodeEnv | quote }}
|
||||||
- name: PORT
|
- name: PORT
|
||||||
value: {{ .Values.backend.env.port | quote }}
|
value: {{ .Values.backend.env.port | quote }}
|
||||||
|
- name: PG_USERNAME
|
||||||
|
{{- if .Values.postgresql.auth.existingSecret }}
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.postgresql.auth.existingSecret }}
|
||||||
|
key: username
|
||||||
|
{{- else }}
|
||||||
|
value: {{ .Values.postgresql.auth.username | quote }}
|
||||||
|
{{- end }}
|
||||||
|
- name: PG_PASSWORD
|
||||||
|
{{- if .Values.postgresql.auth.existingSecret }}
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.postgresql.auth.existingSecret }}
|
||||||
|
key: password
|
||||||
|
{{- else }}
|
||||||
|
value: {{ .Values.postgresql.auth.password | quote }}
|
||||||
|
{{- end }}
|
||||||
- name: DATABASE_URL
|
- name: DATABASE_URL
|
||||||
value: "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ include "timetracker.fullname" . }}-postgresql:5432/{{ .Values.postgresql.auth.database }}"
|
value: "postgresql://$(PG_USERNAME):$(PG_PASSWORD)@{{ .Values.postgresql.host }}:{{ .Values.postgresql.port }}/{{ .Values.postgresql.database }}"
|
||||||
- name: OIDC_ISSUER_URL
|
- name: OIDC_ISSUER_URL
|
||||||
value: {{ .Values.backend.oidc.issuerUrl | quote }}
|
value: {{ .Values.backend.oidc.issuerUrl | quote }}
|
||||||
- name: OIDC_CLIENT_ID
|
- name: OIDC_CLIENT_ID
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ include "timetracker.fullname" . }}-postgresql
|
|
||||||
labels:
|
|
||||||
{{- include "timetracker.postgresql.labels" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 5432
|
|
||||||
targetPort: postgresql
|
|
||||||
protocol: TCP
|
|
||||||
name: postgresql
|
|
||||||
selector:
|
|
||||||
{{- include "timetracker.postgresql.selectorLabels" . | nindent 4 }}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: StatefulSet
|
|
||||||
metadata:
|
|
||||||
name: {{ include "timetracker.fullname" . }}-postgresql
|
|
||||||
labels:
|
|
||||||
{{- include "timetracker.postgresql.labels" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
serviceName: {{ include "timetracker.fullname" . }}-postgresql
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "timetracker.postgresql.selectorLabels" . | nindent 6 }}
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "timetracker.postgresql.selectorLabels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
{{- with .Values.imagePullSecrets }}
|
|
||||||
imagePullSecrets:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
serviceAccountName: {{ include "timetracker.serviceAccountName" . }}
|
|
||||||
securityContext:
|
|
||||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
||||||
containers:
|
|
||||||
- name: postgresql
|
|
||||||
image: "{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
|
|
||||||
imagePullPolicy: {{ .Values.postgresql.image.pullPolicy }}
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_USER
|
|
||||||
value: {{ .Values.postgresql.auth.username | quote }}
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
value: {{ .Values.postgresql.auth.password | quote }}
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
value: {{ .Values.postgresql.auth.database | quote }}
|
|
||||||
- name: PGDATA
|
|
||||||
value: /var/lib/postgresql/data/pgdata
|
|
||||||
ports:
|
|
||||||
- name: postgresql
|
|
||||||
containerPort: 5432
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- pg_isready
|
|
||||||
- -U
|
|
||||||
- {{ .Values.postgresql.auth.username }}
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
failureThreshold: 6
|
|
||||||
readinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- pg_isready
|
|
||||||
- -U
|
|
||||||
- {{ .Values.postgresql.auth.username }}
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 5
|
|
||||||
timeoutSeconds: 3
|
|
||||||
failureThreshold: 3
|
|
||||||
resources:
|
|
||||||
{{- toYaml .Values.postgresql.resources | nindent 12 }}
|
|
||||||
volumeMounts:
|
|
||||||
- name: data
|
|
||||||
mountPath: /var/lib/postgresql/data
|
|
||||||
volumeClaimTemplates:
|
|
||||||
- metadata:
|
|
||||||
name: data
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- {{ .Values.postgresql.persistence.accessMode }}
|
|
||||||
{{- if .Values.postgresql.persistence.storageClass }}
|
|
||||||
storageClassName: {{ .Values.postgresql.persistence.storageClass }}
|
|
||||||
{{- end }}
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.postgresql.persistence.size }}
|
|
||||||
@@ -1,31 +1,20 @@
|
|||||||
# Default values for timetracker
|
# Default values for timetracker
|
||||||
|
|
||||||
# PostgreSQL Configuration
|
# External PostgreSQL Configuration
|
||||||
|
# PREREQUISITE: An existing PostgreSQL database must be provisioned before installing this chart.
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: true
|
host: "postgres"
|
||||||
image:
|
port: 5432
|
||||||
repository: postgres
|
database: "timetracker"
|
||||||
tag: "16-alpine"
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
|
|
||||||
|
# Provide credentials either inline or from an existing secret.
|
||||||
|
# If auth.existingSecret is set, username and password are read from that
|
||||||
|
# secret using the keys "username" and "password". The inline auth.username
|
||||||
|
# and auth.password values are ignored in that case.
|
||||||
auth:
|
auth:
|
||||||
username: timetracker
|
username: "timetracker"
|
||||||
password: timetracker_password
|
password: "timetracker_password"
|
||||||
database: timetracker
|
existingSecret: ""
|
||||||
|
|
||||||
persistence:
|
|
||||||
enabled: true
|
|
||||||
storageClass: ""
|
|
||||||
accessMode: ReadWriteOnce
|
|
||||||
size: 10Gi
|
|
||||||
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 1000m
|
|
||||||
memory: 1Gi
|
|
||||||
requests:
|
|
||||||
cpu: 250m
|
|
||||||
memory: 256Mi
|
|
||||||
|
|
||||||
# Backend Configuration
|
# Backend Configuration
|
||||||
backend:
|
backend:
|
||||||
|
|||||||
Reference in New Issue
Block a user