diff --git a/apis/core/v1alpha1/flagsourceconfiguration_types.go b/apis/core/v1alpha1/flagsourceconfiguration_types.go index e285a19c8..f01a51e09 100644 --- a/apis/core/v1alpha1/flagsourceconfiguration_types.go +++ b/apis/core/v1alpha1/flagsourceconfiguration_types.go @@ -30,32 +30,33 @@ import ( type SyncProviderType string const ( - SidecarEnvVarPrefix string = "SIDECAR_ENV_VAR_PREFIX" - InputConfigurationEnvVarPrefix string = "SIDECAR" - SidecarMetricPortEnvVar string = "METRICS_PORT" - SidecarPortEnvVar string = "PORT" - SidecarSocketPathEnvVar string = "SOCKET_PATH" - SidecarEvaluatorEnvVar string = "EVALUATOR" - SidecarImageEnvVar string = "IMAGE" - SidecarVersionEnvVar string = "TAG" - SidecarProviderArgsEnvVar string = "PROVIDER_ARGS" - SidecarDefaultSyncProviderEnvVar string = "SYNC_PROVIDER" - SidecarLogFormatEnvVar string = "LOG_FORMAT" - SidecarProbesEnabledVar string = "PROBES_ENABLED" - defaultSidecarEnvVarPrefix string = "FLAGD" - DefaultMetricPort int32 = 8014 - defaultPort int32 = 8013 - defaultSocketPath string = "" - defaultEvaluator string = "json" - defaultImage string = "ghcr.io/open-feature/flagd" - defaultTag string = "v0.5.4" - defaultLogFormat string = "json" - defaultProbesEnabled bool = true - SyncProviderKubernetes SyncProviderType = "kubernetes" - SyncProviderFilepath SyncProviderType = "filepath" - SyncProviderHttp SyncProviderType = "http" - SyncProviderGrpc SyncProviderType = "grpc" - SyncProviderFlagdProxy SyncProviderType = "flagd-proxy" + SidecarEnvVarPrefix string = "SIDECAR_ENV_VAR_PREFIX" + InputConfigurationEnvVarPrefix string = "SIDECAR" + SidecarMetricPortEnvVar string = "METRICS_PORT" + SidecarPortEnvVar string = "PORT" + SidecarSocketPathEnvVar string = "SOCKET_PATH" + SidecarEvaluatorEnvVar string = "EVALUATOR" + SidecarImageEnvVar string = "IMAGE" + SidecarVersionEnvVar string = "TAG" + SidecarProviderArgsEnvVar string = "PROVIDER_ARGS" + SidecarDefaultSyncProviderEnvVar string = "SYNC_PROVIDER" + SidecarLogFormatEnvVar string = "LOG_FORMAT" + SidecarProbesEnabledVar string = "PROBES_ENABLED" + defaultSidecarEnvVarPrefix string = "FLAGD" + DefaultMetricPort int32 = 8014 + defaultPort int32 = 8013 + defaultSocketPath string = "" + defaultEvaluator string = "json" + defaultImage string = "ghcr.io/open-feature/flagd" + // renovate: datasource=github-tags depName=open-feature/flagd/flagd + defaultTag string = "v0.5.4" + defaultLogFormat string = "json" + defaultProbesEnabled bool = true + SyncProviderKubernetes SyncProviderType = "kubernetes" + SyncProviderFilepath SyncProviderType = "filepath" + SyncProviderHttp SyncProviderType = "http" + SyncProviderGrpc SyncProviderType = "grpc" + SyncProviderFlagdProxy SyncProviderType = "flagd-proxy" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -164,10 +165,10 @@ type FlagSourceConfigurationStatus struct { // Important: Run "make" to regenerate code after modifying this file } -//+kubebuilder:resource:shortName="fsc" -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:storageversion +// +kubebuilder:resource:shortName="fsc" +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // FlagSourceConfiguration is the Schema for the FlagSourceConfigurations API type FlagSourceConfiguration struct { @@ -178,7 +179,7 @@ type FlagSourceConfiguration struct { Status FlagSourceConfigurationStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // FlagSourceConfigurationList contains a list of FlagSourceConfiguration type FlagSourceConfigurationList struct { diff --git a/controllers/common/flagd-proxy.go b/controllers/common/flagd-proxy.go index cc05b8899..7f8f8caab 100644 --- a/controllers/common/flagd-proxy.go +++ b/controllers/common/flagd-proxy.go @@ -17,11 +17,12 @@ import ( ) const ( - ManagedByAnnotationValue = "open-feature-operator" - FlagdProxyDeploymentName = "flagd-proxy" - FlagdProxyServiceAccountName = "open-feature-operator-flagd-proxy" - FlagdProxyServiceName = "flagd-proxy-svc" - DefaultFlagdProxyTag = "v0.2.2" //FLAGD_PROXY_TAG_RENOVATE + ManagedByAnnotationValue = "open-feature-operator" + FlagdProxyDeploymentName = "flagd-proxy" + FlagdProxyServiceAccountName = "open-feature-operator-flagd-proxy" + FlagdProxyServiceName = "flagd-proxy-svc" + // renovate: datasource=github-tags depName=open-feature/flagd/flagd-proxy + DefaultFlagdProxyTag = "v0.2.2" DefaultFlagdProxyImage = "ghcr.io/open-feature/flagd-proxy" DefaultFlagdProxyPort = 8015 DefaultFlagdProxyMetricsPort = 8016 diff --git a/renovate.json b/renovate.json index 8195a007e..7cdeeaac9 100644 --- a/renovate.json +++ b/renovate.json @@ -11,8 +11,8 @@ ], "kubernetes": { "fileMatch": [ - "^chart/templates/rendered\\.yaml$", - "^config/default/.*-patch\\.yaml$", + "^chart/templates/rendered\\.ya?ml$", + "^config/default/.*-patch\\.ya?ml$", "test\\/.*\\.ya?ml$" ] }, @@ -22,34 +22,26 @@ "^.*open-feature/flagd.*$" ], "groupName": "open-feature/flagd" - } - ], - "regexManagers": [ - { - "fileMatch": ["^apis/core/.*/flagsourceconfiguration_types.go$"], - "matchStrings": ["defaultTag\\s*string\\s*= \"(?.*?)\"\\s"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd/(?.*)$" }, { - "fileMatch": ["^chart/open-feature-operator/values.yaml$"], - "matchStrings": ["repository: \"ghcr\\.io\/open-feature\/flagd\"\\n\\s*tag: (?.*?)\\s"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd/(?.*)$" + "matchDepNames": [ + "open-feature/flagd", + "open-feature/flagd/flagd" + ], + "extractVersion": "^flagd/(?.*?)$" }, { - "fileMatch": ["^chart/open-feature-operator/README.md$"], - "matchStrings": ["current flagd version: \\`(?.*?)\\`"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd/(?.*)$" - }, + "matchDepNames": [ + "open-feature/flagd-proxy", + "open-feature/flagd/flagd-proxy" + ], + "extractVersion": "^flagd-proxy/(?.*?)$" + } + ], + "regexManagers": [ { "fileMatch": [ - "^docs/getting_started.md$", - "^test/e2e/kuttl/inject-flagd/01-assert.yaml$" + "^docs/getting_started.md$" ], "matchStrings": ["ghcr\\.io\\/open-feature\\/flagd:(?.*?)\\s"], "depNameTemplate": "open-feature/flagd", @@ -62,57 +54,13 @@ "(^|\\/)Dockerfile", "(^|\\/).*\\.ya?ml$", "(^|\\/).*\\.toml$", - "(^|\\/).*\\.sh$" + "(^|\\/).*\\.sh$", + "^controllers/common/flagd-proxy.go$", + "^apis/core/.*/flagsourceconfiguration_types.go$" ], "matchStrings": [ - "# renovate: datasource=(?.+?) depName=(?.+?)\\s.*?_VERSION ?(\\??=|\\: ?) ?\\\"?(?.+?)?\\\"?\\s" + "(#|\\/\\/) renovate: datasource=(?.+?) depName=(?.+?)\\s.*?(?\\??=|\\: ?) ?\\\"?(?.+?)?\\\"?\\s" ] - }, - { - "fileMatch": ["^controllers/core/flagsourceconfiguration/flagd-proxy.go$"], - "matchStrings": ["\"(?.*?)\" \\/\\/FLAGD_PROXY_TAG_RENOVATE"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd-proxy/(?.*)$" - }, - { - "fileMatch": ["^chart/open-feature-operator/values.yaml$"], - "matchStrings": ["repository: \"ghcr\\.io\/open-feature\/flagd-proxy\"\\n\\s*tag: (?.*?)\\s"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd-proxy/(?.*)$" - }, - { - "fileMatch": ["^chart/open-feature-operator/README.md$"], - "matchStrings": ["current flagd-proxy version: \\`(?.*?)\\`"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd-proxy/(?.*)$" - }, - { - "fileMatch": [ - "^test/e2e/kuttl/fsconfig-flagd-proxy-sync/00-install.yaml$", - "^test/e2e/kuttl/fsconfig-flagd-proxy-sync/01-assert.yaml$", - "^test/e2e/kuttl/fsconfig-k8s-sync/00-install.yaml$", - "^test/e2e/kuttl/fsconfig-k8s-sync/01-assert.yaml$", - "^test/e2e/kuttl/fsconfig-file-sync/00-install.yaml$", - "^test/e2e/kuttl/fsconfig-file-sync/01-assert.yaml$" - ], - "matchStrings": ["image: ghcr\\.io\/open-feature\/flagd:(?.*?)\\s"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd-proxy/(?.*)$" - }, - { - "fileMatch": [ - "^test/e2e/kuttl/fsconfig-flagd-proxy-sync/00-install.yaml$", - "^test/e2e/kuttl/fsconfig-k8s-sync/00-install.yaml$", - "^test/e2e/kuttl/fsconfig-file-sync/00-install.yaml$" - ], - "matchStrings": ["tag: (?.*?)\\s"], - "depNameTemplate": "open-feature/flagd", - "datasourceTemplate": "github-releases", - "extractVersionTemplate": "^flagd-proxy/(?.*)$" } ] } diff --git a/test/e2e/kuttl/fsconfig-file-sync/00-install.yaml b/test/e2e/kuttl/fsconfig-file-sync/00-install.yaml index 57dbf42c1..c26dc2e84 100644 --- a/test/e2e/kuttl/fsconfig-file-sync/00-install.yaml +++ b/test/e2e/kuttl/fsconfig-file-sync/00-install.yaml @@ -7,6 +7,7 @@ spec: metricsPort: 8080 evaluator: json defaultSyncProvider: filepath + # renovate: datasource=github-tags depName=open-feature/flagd/flagd tag: v0.5.4 sources: - source: end-to-end-test diff --git a/test/e2e/kuttl/fsconfig-flagd-proxy-sync/00-install.yaml b/test/e2e/kuttl/fsconfig-flagd-proxy-sync/00-install.yaml index 738945c09..c5799e573 100644 --- a/test/e2e/kuttl/fsconfig-flagd-proxy-sync/00-install.yaml +++ b/test/e2e/kuttl/fsconfig-flagd-proxy-sync/00-install.yaml @@ -7,6 +7,7 @@ spec: metricsPort: 8080 evaluator: json defaultSyncProvider: flagd-proxy + # renovate: datasource=github-tags depName=open-feature/flagd/flagd tag: v0.5.4 sources: - source: end-to-end-test diff --git a/test/e2e/kuttl/fsconfig-k8s-sync/00-install.yaml b/test/e2e/kuttl/fsconfig-k8s-sync/00-install.yaml index a753e0b69..d38c1dc73 100644 --- a/test/e2e/kuttl/fsconfig-k8s-sync/00-install.yaml +++ b/test/e2e/kuttl/fsconfig-k8s-sync/00-install.yaml @@ -7,6 +7,7 @@ spec: metricsPort: 8080 evaluator: json defaultSyncProvider: kubernetes + # renovate: datasource=github-tags depName=open-feature/flagd/flagd tag: v0.5.4 sources: - source: end-to-end-test