Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Remove redundant setting for scheme in chart
Browse files Browse the repository at this point in the history
The chart had a setting that can be derived based on another value. This
commit removed the extra config value as it is not required

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
  • Loading branch information
Waterdrips authored and alexellis committed Oct 14, 2020
1 parent e3cc266 commit 0a2ad73
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ This is mainly for configuration documentation for developers wishing to use thi
| `customers.url` | `The public URL to a customers file, it should be unformatted with 1 username per line` | `""` |
| `customers.customersSecret` | `If set to ture we use a secret for our customers list rather than a public URL` | `false` |
| `global.rootDomain` | `The root domain for this OFC installation` | `"example.com"` |
| `global.scheme` | `Wither http or https, depending on the TLS setting` | `https` |
| `global.enableECR` | `Set to true is using ECR as our container registry rather than Docker Hub` | `false` |
| `global.imagePullPolicy` | `The policy for pulling OFC images, Allways or IfNotPresent for example` | `IfNotPresent` |
| `global.coreNamespace` | `The namespace for the core OFC components` | `openfaas` |
Expand Down
6 changes: 5 additions & 1 deletion chart/openfaas-cloud/templates/ofc-core/edge-auth-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ spec:
- name: oauth_provider
value: {{ .Values.edgeAuth.oauthProvider | quote }}
- name: external_redirect_domain
value: {{ printf "%s://auth.system.%s" .Values.global.scheme .Values.global.rootDomain | quote }}
{{- if .Values.tls.enabled }}
value: {{ printf "https://auth.system.%s" .Values.global.rootDomain | quote }}
{{- else }}
value: {{ printf "http://auth.system.%s" .Values.global.rootDomain | quote }}
{{- end }}
- name: cookie_root_domain
value: {{ printf ".system.%s" .Values.global.rootDomain | quote }}
- name: secure_cookie
Expand Down
2 changes: 0 additions & 2 deletions chart/openfaas-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ global:

## rootDomain is the root domain of the ofc installation o6s.io for example
rootDomain: "example.com"
## scheme is the http/https setting for the installation
scheme: https
enableECR: false
imagePullPolicy: IfNotPresent
## coreNamespace this is used where we need to communicate with core openfaas components
Expand Down
3 changes: 2 additions & 1 deletion chart/test/core_edge_auth_dep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func makeContainerVolumes(customersSecret bool) []ContainerVolume {

func makeContainerEnv(customersSecret, secureCookie bool) []Environment {
var environ []Environment

environ = append(environ, Environment{Name: "port", Value: "8080"})
environ = append(environ, Environment{Name: "oauth_client_secret_path", Value: "/var/secrets/of-client-secret/of-client-secret"})
environ = append(environ, Environment{Name: "public_key_path", Value: "/var/secrets/public/key.pub"})
Expand All @@ -146,7 +147,7 @@ func makeContainerEnv(customersSecret, secureCookie bool) []Environment {
environ = append(environ, Environment{Name: "client_id", Value: "client-id"})
environ = append(environ, Environment{Name: "oauth_provider_base_url", Value: ""})
environ = append(environ, Environment{Name: "oauth_provider", Value: "github"})
environ = append(environ, Environment{Name: "external_redirect_domain", Value: "https://auth.system.example.com"})
environ = append(environ, Environment{Name: "external_redirect_domain", Value: "http://auth.system.example.com"})
environ = append(environ, Environment{Name: "cookie_root_domain", Value: ".system.example.com"})
environ = append(environ, Environment{Name: "secure_cookie", Value: strconv.FormatBool(secureCookie)})
if !customersSecret {
Expand Down

0 comments on commit 0a2ad73

Please sign in to comment.