diff --git a/api/gen.go b/api/gen.go index 56aa621..1c2a4be 100644 --- a/api/gen.go +++ b/api/gen.go @@ -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 diff --git a/gen.go b/gen.go index c64b67f..4e18154 100644 --- a/gen.go +++ b/gen.go @@ -1,4 +1,4 @@ //go:build generate // +build generate -package main \ No newline at end of file +package main diff --git a/helm/charts/knox/templates/deployment.yaml b/helm/charts/knox/templates/deployment.yaml index 83f4179..6e6032c 100644 --- a/helm/charts/knox/templates/deployment.yaml +++ b/helm/charts/knox/templates/deployment.yaml @@ -62,10 +62,10 @@ 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 }}" @@ -73,12 +73,12 @@ spec: {{- 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 }} diff --git a/helm/charts/knox/templates/job.yaml b/helm/charts/knox/templates/job.yaml index 56c497d..52d0e78 100644 --- a/helm/charts/knox/templates/job.yaml +++ b/helm/charts/knox/templates/job.yaml @@ -36,11 +36,15 @@ 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 }}" @@ -48,7 +52,7 @@ spec: {{- end }} {{- if .Values.migrate.timeout }} - - name: knox_TIMEOUT + - name: KNOX_TIMEOUT value: "{{ .Values.migrate.timeout }}" {{- end }} diff --git a/helm/charts/knox/values.yaml b/helm/charts/knox/values.yaml index 1a48191..739570c 100644 --- a/helm/charts/knox/values.yaml +++ b/helm/charts/knox/values.yaml @@ -1,4 +1,4 @@ -replicaCount: 3 +replicaCount: 1 image: repository: ghcr.io/zeiss/knox/knox diff --git a/pkg/apis/models.gen.go b/pkg/apis/models.gen.go index 80ac8bf..3b3d999 100644 --- a/pkg/apis/models.gen.go +++ b/pkg/apis/models.gen.go @@ -295,40 +295,42 @@ type UpdateUserJSONRequestBody = UserUpdate // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xcW2/buBL+KwLPeVRjp6cHKPy22y52g3aBImn2pQgCRhrHbCRSJamkRuD/viCpqyXq", - "4khykuotESlqOPPN5RtRfkQeCyNGgUqBVo8owhyHIIHr/4DeE85oCFSe+eoCoWiFIiw3yEUUh4BWe3Nc", - "xOFHTDj4aCV5DC4S3gZCrG6W20jdICQn9Bbtdi4KSEikGvJhjeNAotXp0jUP+RED3+ZPMTNrViNUwi1w", - "sxzz7gpy7i1x9rF0/5rxEEu0QnFMlNxV6dh6LaAsnkW6ZGaLeBFn38GzazIf76dFCTi0LpoM9llxlw5q", - "DPyR21cDhLMIuCSgBz0OWIL/myxp1McS3kgSQlWtLiJ+zTNdRMRn5t1BcfCGsQAwVaNmMzW3JTqrSlb7", - "mF0mD7vRt6mtgseNlSuLC4kl/ANcEEbrbOqiOPL77j8WwC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ccoSo9t", + "GzSCYiqV9gdZAe7eB0owu7djti5caHOaOHtwttgabV+ffLZWw+dtaH9v5LlZ3aoQEcTgS2F0h82rQc9/", + "pOHOBpYYLMOsA+FX87wChLbwV78hR8fdjmtGrSVrTgUTa01E+iDi9WbCeZCwmsf7F3CdLvP0IivNnPR/", + "cnBNl8PyE8uJCfmC4slRnNNxMiSLKiLviwzqipjmftAzi5ZG5gVj00ZKZYGxB5fWeQEsIJbrOEFlOixk", + "dEYyWthkEBE11+QWEmpIqMrBWiDd/N9HPo0Gp0nalUt1E5NOC4OmgvXzl0E2lTXToW2LKFZUpPtZZm7x", + "4yrNC408A410GN/rzFsnNPFqckddEHPKHY8LLh2c8OmImSZ/zEP4FljOQ/YGZ7H9eWXn7vztvs8Tjk2X", + "rfx0W/mqDQft5vefTC4berOhT0t87z2mgHzftn6vym8spNc/0pyYFRRwahoqb3oZ3CAtbN0Ck47YWr28", + "0k8bnoqoUXdUFppxBprRiSOvLw2fCxirOeLFArUT5rcenHWwlPmhNlkKnIfYLJCejducIgtXb17Kgd8h", + "yNlujb5YrnSo9UFkpXpvt+Vb6bPzr++TM0HdMUZ+HmG31bPfyJ4o0zR/g2tiwlVziaalK80vg3gNvvw8", + "NvQffkrQz86eyVcEC6WbldKxoV+LDdhnfIefOvbEswWsp0vgg5HawQ6/2y+pmj9zOTGtXBxjTmrJhm80", + "svzXlVzx/L3U/jDWOSxjGQD3nL+8vKMs84tig6mh+Y2r5RDLELIsR9wetBaBbgr2lkuD0onupFV+jWti", + "MmRB0FSvfv4y6E9mzXRo2X0cGvjRU27s5YOnl3CE5ICE15mQntu1fZdnL2A6Yf5wIqmDAEwKpmly0Tz7", + "9QWx85wBuTKiGUkPbRGZiTj/zUm59v2YBySOuFTrn1Y/rfDu0+6vAAAA//+uS4qM3mQAAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/tools/tools.go b/tools/tools.go index 4b624f0..21a6c05 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -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"