Skip to content

Commit

Permalink
move zarf vars out of chart/values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw committed Sep 3, 2024
1 parent 7a019e0 commit 8a41f46
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 13 deletions.
8 changes: 4 additions & 4 deletions packages/api/chart/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
- name: DEFAULT_EMBEDDINGS_MODEL
value: "{{ .Values.api.env.defaultEmbeddingsModel }}"
- name: PORT
value: "{{ .Values.api.env.port }}"
value: "{{ .Values.api.port }}"
- name: SUPABASE_URL
value: "{{ .Values.supabase.env.url }}"
- name: SUPABASE_ANON_KEY
Expand All @@ -63,17 +63,17 @@ spec:
key: anon-key
optional: true
ports:
- containerPort: {{ .Values.api.env.port }}
- containerPort: {{ .Values.api.port }}
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.api.env.port }}
port: {{ .Values.api.port }}
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: {{ .Values.api.env.port }}
port: {{ .Values.api.port }}
initialDelaySeconds: 10
periodSeconds: 10
securityContext:
Expand Down
4 changes: 2 additions & 2 deletions packages/api/chart/templates/api/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ spec:
ports:
- name: http
protocol: TCP
port: {{ .Values.api.env.port }}
targetPort: {{ .Values.api.env.port }}
port: {{ .Values.api.port }}
targetPort: {{ .Values.api.port }}
type: ClusterIP
2 changes: 1 addition & 1 deletion packages/api/chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
{{- include "chart.selectorLabels" . | nindent 10 }}
host: {{ include "chart.fullname" . }}
gateway: tenant
port: {{ .Values.api.env.port }}
port: {{ .Values.api.port }}

allow:
- direction: Ingress
Expand Down
19 changes: 13 additions & 6 deletions packages/api/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,23 @@ api:
tag: 0.11.0
# x-release-please-end
imagePullPolicy: Always

replicas: 1

securityContext:
runAsUser: 65532
runAsGroup: 65532
runAsNonRoot: true
capabilities:
drop:
- ALL
- ALL

port: 8080

env:
port: 8080
exposeAPI: "###ZARF_VAR_EXPOSE_API###"
defaultEmbeddingsModel: "###ZARF_VAR_DEFAULT_EMBEDDINGS_MODEL###"
exposeAPI: "true"
defaultEmbeddingsModel: "text-embeddings"

serviceAccount:
name: leapfrogai-api
create: true
Expand All @@ -38,7 +43,8 @@ api:
runAsNonRoot: true
capabilities:
drop:
- ALL
- ALL

env:
serviceName: "supabase-postgresql"
servicePort: 5432
Expand All @@ -52,10 +58,11 @@ kiwigrid:
repository: kiwigrid/k8s-sidecar
tag: 1.23.3
imagePullPolicy: Always

securityContext:
runAsUser: 65532
runAsGroup: 65532
runAsNonRoot: true
capabilities:
drop:
- ALL
- ALL
4 changes: 4 additions & 0 deletions packages/api/values/registry1-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ api:
tag: v0.11.0
# x-release-please-end

env:
exposeAPI: "###ZARF_VAR_EXPOSE_API###"
defaultEmbeddingsModel: "###ZARF_VAR_DEFAULT_EMBEDDINGS_MODEL###"

migration:
image:
# TODO: replace with Ironbank image once hardened: registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api/migrations
Expand Down
4 changes: 4 additions & 0 deletions packages/api/values/upstream-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ api:
repository: ghcr.io/defenseunicorns/leapfrogai/leapfrogai-api
tag: ###ZARF_CONST_IMAGE_VERSION###

env:
exposeAPI: "###ZARF_VAR_EXPOSE_API###"
defaultEmbeddingsModel: "###ZARF_VAR_DEFAULT_EMBEDDINGS_MODEL###"

migration:
image:
repository: ghcr.io/defenseunicorns/leapfrogai/api-migrations
Expand Down

0 comments on commit 8a41f46

Please sign in to comment.