Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.5 #61

Merged
merged 4 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions backend/cmd/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ type Config struct {
HideHealthChecks bool `mapstructure:"hide-health-checks"`
} `mapstructure:"access-log"`
}

// TLS options
TLS struct {
// enable tls termination
Enabled bool

// TLS certificate file
CertFile string `mapstructure:"cert-file" validate:"omitempty,file"`

// TLS certificate key file
KeyFile string `mapstructure:"key-file" validate:"omitempty,file"`
}
}

// Validate config
Expand Down Expand Up @@ -126,5 +138,9 @@ func DefaultConfig() Config {
cfg.Logging.AccessLog.Enabled = appDefault.AccessLog.Enabled
cfg.Logging.AccessLog.HideHealthChecks = appDefault.AccessLog.HideHealthChecks

cfg.TLS.Enabled = false
cfg.TLS.CertFile = ""
cfg.TLS.KeyFile = ""

return cfg
}
10 changes: 9 additions & 1 deletion backend/cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,16 @@ func main() {
}

// run server
var serverErr error
zlog.Info().Msg("Starting server on " + v.GetString("addr"))
if err := server.ListenAndServe(); err != nil {

if cfg.TLS.Enabled {
serverErr = server.ListenAndServeTLS(cfg.TLS.CertFile, cfg.TLS.KeyFile)
} else {
serverErr = server.ListenAndServe()
}

if serverErr != nil {
zlog.Fatal().Caller().Err(err).Send()
}
},
Expand Down
5 changes: 5 additions & 0 deletions backend/hack/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@ logging:
access-log:
enabled: true
hide-health-checks: false

tls:
enabled: false
cert-file:
key-file:
36 changes: 18 additions & 18 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
"coverage": "vitest run --coverage"
},
"dependencies": {
"@apollo/client": "^3.9.10",
"@apollo/client": "^3.9.11",
"@headlessui/react": "^1.7.18",
"@heroicons/react": "^2.1.3",
"@kubetail/ui": "0.1.3",
"async-mutex": "^0.4.1",
"async-mutex": "^0.5.0",
"clsx": "^2.1.0",
"date-fns": "^2.30.0",
"date-fns-tz": "^2.0.1",
"date-fns": "^3.6.0",
"date-fns-tz": "^3.0.1",
"distinct-colors": "^3.0.0",
"fancy-ansi": "^0.1.0",
"fancy-ansi": "^0.1.1",
"graphql": "^16.8.1",
"graphql-ws": "^5.16.0",
"lucide-react": "^0.303.0",
"lucide-react": "^0.367.0",
"react": "^18.2.0",
"react-day-picker": "^8.10.0",
"react-dom": "^18.2.0",
Expand All @@ -37,7 +37,7 @@
"react-window-infinite-loader": "^1.0.9",
"recoil": "^0.7.7",
"tailwind-merge": "^2.2.2",
"usehooks-ts": "^3.0.2"
"usehooks-ts": "^3.1.0"
},
"devDependencies": {
"@apollo/react-testing": "^4.0.0",
Expand All @@ -46,35 +46,35 @@
"@graphql-codegen/fragment-matcher": "^5.0.2",
"@graphql-typed-document-node/core": "^3.2.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.2",
"@types/node": "^20.12.3",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.23",
"@testing-library/react": "^15.0.1",
"@types/node": "^20.12.7",
"@types/react": "^18.2.77",
"@types/react-dom": "^18.2.25",
"@types/react-timeago": "^4.1.7",
"@types/react-window": "^1.8.8",
"@types/react-window-infinite-loader": "^1.0.9",
"@types/zen-observable": "^0.8.7",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "1.0.0-beta.5",
"@vitest/coverage-v8": "1.5.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"history": "^5.3.0",
"jsdom": "^22.1.0",
"jsdom": "^24.0.0",
"postcss": "^8.4.38",
"rollup-plugin-visualizer": "^5.12.0",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.3",
"typescript": "^5.4.5",
"vite": "^5.2.8",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.4.0"
"vitest": "^1.5.0"
}
}
Loading
Loading