Skip to content

Commit 5cde75d

Browse files
committed
added env gen in all services
1 parent f9dc003 commit 5cde75d

1,293 files changed

Lines changed: 156865 additions & 34739 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

authenticator/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
all: build
2+
all: fetch-all-env build
33
GOOS?=darwin
44

55
FLAGS=
@@ -25,4 +25,5 @@ run: build
2525
./authenticator
2626

2727

28-
28+
fetch-all-env:
29+
go run fetchAllEnv/fetchAllEnv.go

authenticator/env_gen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"Category":"DEVTRON","Fields":[{"Env":"DEVTRON_DEFAULT_NAMESPACE","EnvType":"string","EnvValue":"devtroncd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEVTRON_SECRET_NAME","EnvType":"string","EnvValue":"devtron-secret","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_CLIENT_ID","EnvType":"string","EnvValue":"argo-cd","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_HOST","EnvType":"string","EnvValue":"http://localhost","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"DEX_PORT","EnvType":"string","EnvValue":"5556","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"RUNTIME_CONFIG_LOCAL_DEV","EnvType":"LocalDevMode","EnvValue":"false","EnvDescription":"","Example":"","Deprecated":"false"},{"Env":"USER_SESSION_DURATION_SECONDS","EnvType":"int","EnvValue":"86400","EnvDescription":"","Example":"","Deprecated":"false"}]}]

authenticator/env_gen.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
## DEVTRON Related Environment Variables
4+
| Key | Type | Default Value | Description | Example | Deprecated |
5+
|-------|----------|-------------------|-------------------|-----------------------|------------------|
6+
| DEVTRON_DEFAULT_NAMESPACE | string |devtroncd | | | false |
7+
| DEVTRON_SECRET_NAME | string |devtron-secret | | | false |
8+
| DEX_CLIENT_ID | string |argo-cd | | | false |
9+
| DEX_HOST | string |http://localhost | | | false |
10+
| DEX_PORT | string |5556 | | | false |
11+
| RUNTIME_CONFIG_LOCAL_DEV | LocalDevMode |false | | | false |
12+
| USER_SESSION_DURATION_SECONDS | int |86400 | | | false |
13+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package main
18+
19+
import (
20+
"github.com/devtron-labs/common-lib/fetchAllEnv"
21+
)
22+
23+
func main() {
24+
fetchAllEnv.FetchEnvAndWriteToFile()
25+
}

authenticator/go.mod

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,56 @@ toolchain go1.22.6
77
require (
88
github.com/caarlos0/env/v6 v6.7.2
99
github.com/coreos/go-oidc/v3 v3.11.0
10+
github.com/devtron-labs/common-lib v0.19.1
1011
github.com/golang-jwt/jwt/v4 v4.5.1
1112
github.com/google/uuid v1.3.0
1213
github.com/gorilla/mux v1.8.0
13-
github.com/sirupsen/logrus v1.8.1
14+
github.com/sirupsen/logrus v1.9.3
1415
golang.org/x/crypto v0.31.0
1516
golang.org/x/net v0.33.0
1617
golang.org/x/oauth2 v0.21.0
17-
google.golang.org/grpc v1.56.3
18+
google.golang.org/grpc v1.58.3
1819
gopkg.in/yaml.v3 v3.0.1
19-
k8s.io/api v0.23.1
20-
k8s.io/apimachinery v0.23.1
21-
k8s.io/client-go v0.23.1
20+
k8s.io/api v0.29.7
21+
k8s.io/apimachinery v0.29.7
22+
k8s.io/client-go v0.29.7
2223
)
2324

2425
require (
2526
github.com/davecgh/go-spew v1.1.1 // indirect
27+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
2628
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
27-
github.com/go-logr/logr v1.2.0 // indirect
29+
github.com/go-logr/logr v1.3.0 // indirect
30+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
31+
github.com/go-openapi/jsonreference v0.20.2 // indirect
32+
github.com/go-openapi/swag v0.22.3 // indirect
2833
github.com/gogo/protobuf v1.3.2 // indirect
29-
github.com/golang/protobuf v1.5.3 // indirect
30-
github.com/google/go-cmp v0.5.9 // indirect
34+
github.com/golang/protobuf v1.5.4 // indirect
35+
github.com/google/gnostic-models v0.6.8 // indirect
36+
github.com/google/go-cmp v0.6.0 // indirect
3137
github.com/google/gofuzz v1.2.0 // indirect
32-
github.com/googleapis/gnostic v0.5.5 // indirect
33-
github.com/imdario/mergo v0.3.12 // indirect
38+
github.com/imdario/mergo v0.3.13 // indirect
39+
github.com/josharian/intern v1.0.0 // indirect
3440
github.com/json-iterator/go v1.1.12 // indirect
35-
github.com/kr/pretty v0.3.0 // indirect
41+
github.com/mailru/easyjson v0.7.7 // indirect
3642
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3743
github.com/modern-go/reflect2 v1.0.2 // indirect
38-
github.com/rogpeppe/go-internal v1.9.0 // indirect
44+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3945
github.com/spf13/pflag v1.0.5 // indirect
4046
golang.org/x/sys v0.28.0 // indirect
4147
golang.org/x/term v0.27.0 // indirect
4248
golang.org/x/text v0.21.0 // indirect
4349
golang.org/x/time v0.3.0 // indirect
44-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
50+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
4551
google.golang.org/protobuf v1.33.0 // indirect
46-
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
4752
gopkg.in/inf.v0 v0.9.1 // indirect
4853
gopkg.in/yaml.v2 v2.4.0 // indirect
49-
k8s.io/klog/v2 v2.30.0 // indirect
50-
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
51-
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
52-
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
53-
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
54+
k8s.io/klog/v2 v2.110.1 // indirect
55+
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
56+
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
57+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
58+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
5459
sigs.k8s.io/yaml v1.3.0 // indirect
5560
)
61+
62+
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250122120743-f9dc0038c36a

0 commit comments

Comments
 (0)