Skip to content

Commit

Permalink
chore: update helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie committed Jul 16, 2024
1 parent 00d6c20 commit 78c6701
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 45 deletions.
2 changes: 1 addition & 1 deletion api/gen.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build generate
// +build generate

package accounts
package api

//go:generate go run -modfile ../tools/go.mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -config config.client.yml api.yml
//go:generate go run -modfile ../tools/go.mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -config config.server.yml api.yml
Expand Down
2 changes: 1 addition & 1 deletion gen.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build generate
// +build generate

package main
package main
8 changes: 4 additions & 4 deletions helm/charts/knox/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@ spec:

env:
{{- if .Values.database.uri }}
- name: knox_ACCOUNTS_DATABASE_URI
- name: KNOX_DATABASE_URI
value: "{{ .Values.database.uri }}"
{{- else if .Values.database.uriSecret }}
- name: knox_ACCOUNTS_DATABASE_URI
- name: KNOX_DATABASE_URI
valueFrom:
secretKeyRef:
name: "{{ .Values.database.uriSecret }}"
key: "uri"
{{- end }}

{{- if .Values.database.prefix }}
- name: knox_ACCOUNTS_DATABASE_PREFIX
- name: KNOX_DATABASE_TABLE_PREFIX
value: "{{ .Values.database.prefix }}"
{{- end }}

{{- if .Values.http.addr }}
- name: knox_ACCOUNTS_ADDR
- name: KNOX_ADDR
value: "{{ .Values.http.addr }}"
{{- end }}

Expand Down
10 changes: 7 additions & 3 deletions helm/charts/knox/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,23 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
args: ["migrate"]
env:
{{- if .Values.database.prefix }}
- name: KNOX_DATABASE_TABLE_PREFIX
value: "{{ .Values.database.prefix }}"
{{- end }}
{{- if .Values.database.uri }}
- name: knox_ACCOUNTS_DATABASE_URI
- name: KNOX_DATABASE_URI
value: "{{ .Values.database.uri }}"
{{- else if .Values.database.uriSecret }}
- name: knox_ACCOUNTS_DATABASE_URI
- name: KNOX_DATABASE_URI
valueFrom:
secretKeyRef:
name: "{{ .Values.database.uriSecret }}"
key: "uri"
{{- end }}

{{- if .Values.migrate.timeout }}
- name: knox_TIMEOUT
- name: KNOX_TIMEOUT
value: "{{ .Values.migrate.timeout }}"
{{- end }}

Expand Down
2 changes: 1 addition & 1 deletion helm/charts/knox/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
replicaCount: 3
replicaCount: 1

image:
repository: ghcr.io/zeiss/knox/knox
Expand Down
70 changes: 36 additions & 34 deletions pkg/apis/models.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package tools

import (
_ "github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen"
_ "github.com/golang/mock/mockgen/model"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/goreleaser/goreleaser"
_ "github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen"
_ "gotest.tools/gotestsum"
_ "k8s.io/code-generator"
_ "knative.dev/pkg/codegen/cmd/injection-gen"
Expand Down

0 comments on commit 78c6701

Please sign in to comment.