Skip to content

Commit

Permalink
chore!: Remove references to Vault in helm and config files.
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Values in helm `values.yaml` or in the monetr config
that reference Vault will be ignored going forward and will have no
affect on the behavior of monetr.
  • Loading branch information
elliotcourant committed Jan 5, 2023
1 parent 2644b25 commit 8c6def9
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 64 deletions.
4 changes: 2 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: "2022.9.20"
version: "2023.1.5"

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.11.7"
appVersion: "0.14.0"
34 changes: 0 additions & 34 deletions pkg/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ type Configuration struct {
Sentry Sentry `yaml:"sentry"`
Server Server `yaml:"server"`
Stripe Stripe `yaml:"stripe"`
Vault Vault `yaml:"vault"`
}

func (c Configuration) GetConfigFileName() string {
Expand Down Expand Up @@ -335,23 +334,6 @@ func (s Stripe) IsBillingEnabled() bool {
return s.Enabled && s.BillingEnabled
}

type Vault struct {
Enabled bool `yaml:"enabled"`
Address string `yaml:"address"`
Auth string `yaml:"auth"`
Token string `yaml:"token"`
TokenFile string `yaml:"tokenFile"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Role string `yaml:"role"`
CertificatePath string `yaml:"certificatePath"`
KeyPath string `yaml:"keyPath"`
CACertificatePath string `yaml:"caCertificatePath"`
InsecureSkipVerify bool `yaml:"insecureSkipVerify"`
Timeout time.Duration `yaml:"timeout"`
IdleConnTimeout time.Duration `yaml:"idleConnTimeout"`
}

type RabbitMQ struct {
Enabled bool `yaml:"enabled"`
Hostname string `yaml:"hostname"`
Expand Down Expand Up @@ -534,10 +516,6 @@ func setupDefaults(v *viper.Viper) {
v.SetDefault("Server.UICacheHours", 12)
v.SetDefault("Stripe.InitialPlan.FreeTrialDays", 30)
v.SetDefault("UIDomainName", "localhost:4000")
v.SetDefault("Vault.Auth", "kubernetes")
v.SetDefault("Vault.IdleConnTimeout", 9*time.Minute)
v.SetDefault("Vault.Timeout", 10*time.Second)
v.SetDefault("Vault.TokenFile", "/var/run/secrets/kubernetes.io/serviceaccount/token")
}

func setupEnv(v *viper.Viper) {
Expand Down Expand Up @@ -613,16 +591,4 @@ func setupEnv(v *viper.Viper) {
_ = v.BindEnv("Stripe.TaxesEnabled", "MONETR_STRIPE_TAXES_ENABLED")
_ = v.BindEnv("Stripe.InitialPlan.FreeTrialDays", "MONETR_STRIPE_DEFAULT_TRIAL_DAYS")
_ = v.BindEnv("Stripe.InitialPlan.StripePriceId", "MONETR_STRIPE_DEFAULT_PRICE_ID")
_ = v.BindEnv("Vault.Enabled", "MONETR_VAULT_ENABLED")
_ = v.BindEnv("Vault.Address", "MONETR_VAULT_ADDRESS")
_ = v.BindEnv("Vault.Auth", "MONETR_VAULT_AUTH")
_ = v.BindEnv("Vault.Token", "MONETR_VAULT_TOKEN")
_ = v.BindEnv("Vault.TokenFile", "MONETR_VAULT_TOKEN_FILE")
_ = v.BindEnv("Vault.Role", "MONETR_VAULT_ROLE")
_ = v.BindEnv("Vault.CertificatePath", "MONETR_VAULT_TLS_CERT_PATH")
_ = v.BindEnv("Vault.KeyPath", "MONETR_VAULT_TLS_KEY_PATH")
_ = v.BindEnv("Vault.CACertificatePath", "MONETR_VAULT_TLS_CA_PATH")
_ = v.BindEnv("Vault.InsecureSkipVerify", "MONETR_VAULT_INSECURE_SKIP_VERIFY")
_ = v.BindEnv("Vault.Timeout", "MONETR_VAULT_TIMEOUT")
_ = v.BindEnv("Vault.IdleConnTimeout", "MONETR_VAULT_IDLE_CONN_TIMEOUT")
}
11 changes: 0 additions & 11 deletions templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@ data:
MONETR_STRIPE_WEBHOOKS_DOMAIN: {{ quote .Values.api.stripe.webhooksDomain }}
MONETR_STRIPE_BILLING_ENABLED: {{ quote .Values.api.stripe.billingEnabled }}
MONETR_STRIPE_TAXES_ENABLED: {{ quote .Values.api.stripe.taxesEnabled }}
MONETR_VAULT_ENABLED: {{ quote .Values.api.vault.enabled }}
{{ if .Values.api.vault.address }}MONETR_VAULT_ADDRESS: {{ quote .Values.api.vault.address }} {{ end }}
{{ if .Values.api.vault.auth }}MONETR_VAULT_AUTH: {{ quote .Values.api.vault.auth }} {{ end }}
{{ if .Values.api.vault.tokenFile }}MONETR_VAULT_TOKEN_FILE: {{ quote .Values.api.vault.tokenFile }} {{ end }}
{{ if .Values.api.vault.role }}MONETR_VAULT_ROLE: {{ quote .Values.api.vault.role }} {{ end }}
{{ if .Values.api.vault.certificatePath }}MONETR_VAULT_TLS_CERT_PATH: {{ quote .Values.api.vault.certificatePath }} {{ end }}
{{ if .Values.api.vault.keyPath }}MONETR_VAULT_TLS_KEY_PATH: {{ quote .Values.api.vault.keyPath }} {{ end }}
{{ if .Values.api.vault.caCertificatePath }}MONETR_VAULT_TLS_CA_PATH: {{ quote .Values.api.vault.caCertificatePath }} {{ end }}
MONETR_VAULT_INSECURE_SKIP_VERIFY: {{ quote .Values.api.vault.insecureSkipVerify }}
{{ if .Values.api.vault.timeout }}MONETR_VAULT_TIMEOUT: {{ quote .Values.api.vault.timeout }} {{ end }}
{{ if .Values.api.vault.idleConnTimeout }}MONETR_VAULT_IDLE_CONN_TIMEOUT: {{ quote .Values.api.vault.idleConnTimeout }} {{ end }}

---
kind: ConfigMap
Expand Down
2 changes: 0 additions & 2 deletions values.my.monetr.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ api:
enabled: true
sampleRate: 1.0
traceSampleRate: 1.0
vault:
enabled: false
keyManagement:
enabled: true
provider: google
Expand Down
2 changes: 0 additions & 2 deletions values.my.monetr.dog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ api:
enabled: true
sampleRate: 1.0
traceSampleRate: 1.0
vault:
enabled: false
keyManagement:
enabled: true
provider: google
Expand Down
13 changes: 0 additions & 13 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,4 @@ api:
secretKey: null
keyId: ""
endpoint: null
vault:
enabled: false
address: ""
role: "default"
caCertificatePath: ""
certificatePath: ""
keyPath: ""
insecureSkipVerify: false
token: ""
tokenFile: ""
auth: "kubernetes"
timeout: "30s"
idleConnTimeout: "9m"

0 comments on commit 8c6def9

Please sign in to comment.