Skip to content

Commit

Permalink
FS-1723; Clean up bioscfg before deploying (#9)
Browse files Browse the repository at this point in the history
- Fix linting
- Remove test vars from chart
- Add file handler closing
- Renaming ENV var, no need to have a prefix that is the app name
  • Loading branch information
jakeschuurmans authored Oct 15, 2024
1 parent fba9711 commit 25930ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
15 changes: 6 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.57.2
golangci-lint-version: 1.57.2 # use the fixed version to not introduce new linters unexpectedly

linters-settings:
govet:
enable:
- fieldalignment
auto-fix: true
check-shadowing: true
settings:
printf:
funcs:
Expand Down Expand Up @@ -47,6 +46,7 @@ linters-settings:
- wrapperFunc
gofumpt:
extra-rules: true
shadow: true

linters:
enable:
Expand All @@ -65,7 +65,7 @@ linters:
# additional linters
- bodyclose
- gocritic
- goerr113
- err113
- goimports
- revive
- misspell
Expand All @@ -76,14 +76,11 @@ linters:
enable-all: false
disable-all: true

run:
# build-tags:
skip-dirs:
issues:
exclude-dirs:
- internal/fixtures
skip-files:
exclude-files:
- "(.*/)*.*_test.go"

issues:
exclude-rules:
- linters:
- gosec
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
readOnly: true
env:
{{- if .Values.env.endpoints.fleetdb.authenticate }}
- name: FLIPFLOP_ENDPOINTS_FLEETDB_OIDC_CLIENT_SECRET
- name: ENDPOINTS_FLEETDB_OIDC_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: bioscfg-secrets
Expand Down
2 changes: 0 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ image:
tag: latest
url: localhost:5001
env:
test: myTest
test1: myFirstTest
facility: sandbox
log_level: debug
concurrency: 5
Expand Down
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func readInFile(v *viper.Viper, cfg *Configuration, path string) error {
if err != nil {
return errors.Wrap(ErrConfig, err.Error())
}
defer fh.Close()

if err = v.ReadConfig(fh); err != nil {
return errors.Wrap(ErrConfig, "ReadConfig error:"+err.Error())
Expand Down

0 comments on commit 25930ed

Please sign in to comment.