Skip to content

Commit 832642a

Browse files
committed
Update the default configuration to map what the turn-key integration does
1 parent 520876d commit 832642a

3 files changed

Lines changed: 9 additions & 22 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Refactor
2+
body: Remove the --extended configuration as the default configuration now matches the integration settings in OpsLevel
3+
time: 2025-08-29T11:55:37.843381-04:00

cmd/root.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ func Execute(version, commit, date string) {
7575
func init() {
7676
rootCmd.PersistentFlags().StringP("config", "c", "./config.yaml", "The configuration file to read in - if not found a default is used. Overrides environment variable 'OPSLEVEL_CONFIG_PATH")
7777
rootCmd.PersistentFlags().Bool("dry-run", false, "If true, no mutative actions will be taken.")
78-
rootCmd.PersistentFlags().Bool("extended", false, "If true, uses the extended default configuration.")
7978
rootCmd.PersistentFlags().String("log-format", "TEXT", "Overrides environment variable 'OPSLEVEL_LOG_FORMAT' (options [\"JSON\", \"TEXT\"])")
8079
rootCmd.PersistentFlags().String("log-level", "INFO", "Overrides environment variable 'OPSLEVEL_LOG_LEVEL' (options [\"ERROR\", \"WARN\", \"INFO\", \"DEBUG\"])")
8180
rootCmd.PersistentFlags().String("api-token", "", "The OpsLevel API Token. Overrides environment variable 'OPSLEVEL_API_TOKEN'")
@@ -148,9 +147,6 @@ func LoadConfig() (*config.Configuration, error) {
148147
return nil, err
149148
}
150149
if !ok {
151-
if viper.GetBool("extended") {
152-
return config.ExtendedConfiguration, nil
153-
}
154150
return config.DefaultConfiguration, nil
155151
}
156152
data, err := os.ReadFile(filepath)

config/config.go

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ var (
88
DefaultConfiguration = &Configuration{
99
Selectors: []controller.Selector{
1010
{
11-
ApiVersion: "apps/v1",
12-
Kind: "Deployment",
11+
ApiVersion: "v1",
12+
Kind: "Namespace",
1313
},
14-
},
15-
}
16-
ExtendedConfiguration = &Configuration{
17-
Selectors: []controller.Selector{
1814
{
1915
ApiVersion: "apps/v1",
2016
Kind: "Deployment",
@@ -28,24 +24,16 @@ var (
2824
Kind: "DaemonSet",
2925
},
3026
{
31-
ApiVersion: "batch/v1",
32-
Kind: "CronJob",
27+
ApiVersion: "networking.k8s.io/v1",
28+
Kind: "Ingress",
3329
},
3430
{
3531
ApiVersion: "v1",
3632
Kind: "Service",
3733
},
3834
{
39-
ApiVersion: "apiregistration.k8s.io/v1",
40-
Kind: "APIService",
41-
},
42-
{
43-
ApiVersion: "autoscaling/v2",
44-
Kind: "HorizontalPodAutoscaler",
45-
},
46-
{
47-
ApiVersion: "v1",
48-
Kind: "Pod",
35+
ApiVersion: "batch/v1",
36+
Kind: "CronJob",
4937
},
5038
},
5139
}

0 commit comments

Comments
 (0)