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

Add options for skipping default tags #1474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion cmd/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
if err != nil {
panic(fmt.Sprintf("cannot calculate the absolute path with %s", *repoRoot))
}
p, err := config.GetProvider(context.Background(), true)
p, err := config.GetProvider(context.Background(), true, false)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
dumpGeneratedResourceList(p, generatedResourceList)
dumpSkippedResourcesCSV(p, skippedResourcesCSV)
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/accessanalyzer/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/account/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/acm/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/acmpca/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/amp/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/amplify/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/apigateway/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/apigatewayv2/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/appautoscaling/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/appconfig/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/appflow/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/appintegrations/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/applicationinsights/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
3 changes: 2 additions & 1 deletion cmd/provider/appmesh/zz_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("100").Int()
skipDefaultTags = app.Flag("skip-default-tags", "Do not set default crossplane tags for resources").Bool()

namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String()
enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool()
Expand Down Expand Up @@ -156,7 +157,7 @@ func main() {
metrics.Registry.MustRegister(stateMetrics)

ctx := context.Background()
provider, err := config.GetProvider(ctx, false)
provider, err := config.GetProvider(ctx, false, *skipDefaultTags)
kingpin.FatalIfError(err, "Cannot initialize the provider configuration")
setupConfig := &clients.SetupConfig{
Logger: logr,
Expand Down
Loading