diff --git a/.github/workflows/validate-crd-docs.yml b/.github/workflows/validate-crd-docs.yml new file mode 100644 index 000000000..cc8e340b0 --- /dev/null +++ b/.github/workflows/validate-crd-docs.yml @@ -0,0 +1,38 @@ +name: Validate CRD Docs +on: + pull_request: + branches: + - 'main' +defaults: + run: + shell: bash +jobs: + check-helm-docs: + name: Check crd documentation values + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Cache build tools + id: cache-build-tools + uses: actions/cache@v3 + with: + path: ./bin + key: build-tools-${{ github.ref_name }} + + - name: Check if crds.md is up to date + run: | + cp ./docs/crds.md ./docs/crds-old.md + make generate-crdocs + cd ./docs/ + if ! cmp --quiet ./crds-old.md ./crds.md; then + echo "The crd values have changes that are not reflected in the documentation. Please use make generate-crdocs to re-generate the docs." + echo "" + echo "=========== Diff ===========" + diff -u ./crds-old.md ./crds.md + exit 1 + else + echo "" + echo "CRDs documentation is correct!" + fi diff --git a/.gitignore b/.gitignore index 35a7372cb..cfd1841c7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ config/rendered/release.yaml .tar.gz config/manager/manager.yaml config/manager/kustomization.yaml +tmpcrd.yaml schemas .vscode of-agent diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 677ab33a6..0e90052d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,3 +30,15 @@ Which will result in building the operator image `docker.io/user1/myImgName:myTa and deploying to your cluster. Please be aware that it is using the cluster your current kube-context is pointing to. **Note:** All bash variables are optional, the default values are set and will result in an image `ghcr.io/openfeature/operator:latest` + +### Autogenerated Documentation + +Some part of the project docs may be autogenerated and require running a script. + +#### CRDs Docs +If you modified or added crds to the project, then you should recreate the crds.md file. To do so run: + +``` +make generate-crdocs +``` + diff --git a/Makefile b/Makefile index 6fa87f2a1..c82246713 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,11 @@ lint: go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest ${GOPATH}/bin/golangci-lint run --deadline=3m --timeout=3m ./... # Run linters +.PHONY: generate-crdocs +generate-crdocs: kustomize crdocs + $(KUSTOMIZE) build config/crd > tmpcrd.yaml + $(CRDOC) --resources tmpcrd.yaml --output docs/crds.md + ##@ Build .PHONY: build @@ -181,12 +186,14 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen HELM ?= $(LOCALBIN)/HELM ENVTEST ?= $(LOCALBIN)/setup-envtest +CRDOC ?= $(LOCALBIN)/crdoc ## Tool Versions # renovate: datasource=github-tags depName=kubernetes-sigs/kustomize KUSTOMIZE_VERSION ?= v4.5.7 # renovate: datasource=github-releases depName=kubernetes-sigs/controller-tools CONTROLLER_TOOLS_VERSION ?= v0.10.0 +CRDOC_VERSION ?= v0.6.2 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize @@ -200,6 +207,11 @@ controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessar $(CONTROLLER_GEN): $(LOCALBIN) GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) +.PHONY: crdocs +crdocs: $(CRDOC) ## Download crdoc locally if necessary. +$(CRDOC): $(LOCALBIN) + GOBIN=$(LOCALBIN) go install fybrik.io/crdoc@$(CRDOC_VERSION) + .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) diff --git a/docs/crds.md b/docs/crds.md new file mode 100644 index 000000000..0148e281e --- /dev/null +++ b/docs/crds.md @@ -0,0 +1,2370 @@ +# API Reference + +Packages: + +- [core.openfeature.dev/v1alpha1](#coreopenfeaturedevv1alpha1) +- [core.openfeature.dev/v1alpha2](#coreopenfeaturedevv1alpha2) +- [core.openfeature.dev/v1alpha3](#coreopenfeaturedevv1alpha3) + +# core.openfeature.dev/v1alpha1 + +Resource Types: + +- [FeatureFlagConfiguration](#featureflagconfiguration) + +- [FlagSourceConfiguration](#flagsourceconfiguration) + + + + +## FeatureFlagConfiguration +[↩ Parent](#coreopenfeaturedevv1alpha1 ) + + + + + + +FeatureFlagConfiguration is the Schema for the featureflagconfigurations API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcore.openfeature.dev/v1alpha1true
kindstringFeatureFlagConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + FeatureFlagConfigurationSpec defines the desired state of FeatureFlagConfiguration
+
false
statusobject + FeatureFlagConfigurationStatus defines the observed state of FeatureFlagConfiguration
+
false
+ + +### FeatureFlagConfiguration.spec +[↩ Parent](#featureflagconfiguration) + + + +FeatureFlagConfigurationSpec defines the desired state of FeatureFlagConfiguration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
featureFlagSpecstring + FeatureFlagSpec is the json representation of the feature flag
+
false
flagDSpecobject + FlagDSpec [DEPRECATED]: superseded by FlagSourceConfiguration
+
false
serviceProviderobject + ServiceProvider [DEPRECATED]: superseded by FlagSourceConfiguration
+
false
syncProviderobject + SyncProvider [DEPRECATED]: superseded by FlagSourceConfiguration
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec +[↩ Parent](#featureflagconfigurationspec) + + + +FlagDSpec [DEPRECATED]: superseded by FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
envs[]object +
+
false
metricsPortinteger +
+
+ Format: int32
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index] +[↩ Parent](#featureflagconfigurationspecflagdspec) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.configMapKeyRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.fieldRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.resourceFieldRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.secretKeyRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### FeatureFlagConfiguration.spec.serviceProvider +[↩ Parent](#featureflagconfigurationspec) + + + +ServiceProvider [DEPRECATED]: superseded by FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nameenum +
+
+ Enum: flagd
+
true
credentialsobject + ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. + Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
+
false
+ + +### FeatureFlagConfiguration.spec.serviceProvider.credentials +[↩ Parent](#featureflagconfigurationspecserviceprovider) + + + +ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. + Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstring + API version of the referent.
+
false
fieldPathstring + If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.
+
false
kindstring + Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+
false
namespacestring + Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+
false
resourceVersionstring + Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
+
false
uidstring + UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+
false
+ + +### FeatureFlagConfiguration.spec.syncProvider +[↩ Parent](#featureflagconfigurationspec) + + + +SyncProvider [DEPRECATED]: superseded by FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring +
+
true
httpSyncConfigurationobject + HttpSyncConfiguration defines the desired configuration for a http sync
+
false
+ + +### FeatureFlagConfiguration.spec.syncProvider.httpSyncConfiguration +[↩ Parent](#featureflagconfigurationspecsyncprovider) + + + +HttpSyncConfiguration defines the desired configuration for a http sync + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
targetstring + Target is the target url for flagd to poll
+
true
bearerTokenstring +
+
false
+ +## FlagSourceConfiguration +[↩ Parent](#coreopenfeaturedevv1alpha1 ) + + + + + + +FlagSourceConfiguration is the Schema for the FlagSourceConfigurations API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcore.openfeature.dev/v1alpha1true
kindstringFlagSourceConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration
+
false
statusobject + FlagSourceConfigurationStatus defines the observed state of FlagSourceConfiguration
+
false
+ + +### FlagSourceConfiguration.spec +[↩ Parent](#flagsourceconfiguration) + + + +FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sources[]object + Sources defines the syncProviders and associated configuration to be applied to the sidecar
+
true
debugLoggingboolean + DebugLogging defines whether to enable --debug flag of flagd sidecar. Default false (disabled).
+
false
defaultSyncProviderstring + DefaultSyncProvider defines the default sync provider
+
false
envVarPrefixstring + EnvVarPrefix defines the prefix to be applied to all environment variables applied to the sidecar, default FLAGD
+
false
envVars[]object + EnvVars define the env vars to be applied to the sidecar, any env vars in FeatureFlagConfiguration CRs are added at the lowest index, all values will have the EnvVarPrefix applied
+
false
evaluatorstring + Evaluator sets an evaluator, defaults to 'json'
+
false
imagestring + Image allows for the sidecar image to be overridden, defaults to 'ghcr.io/open-feature/flagd'
+
false
logFormatstring + LogFormat allows for the sidecar log format to be overridden, defaults to 'json'
+
false
metricsPortinteger + MetricsPort defines the port to serve metrics on, defaults to 8014
+
+ Format: int32
+
false
portinteger + Port defines the port to listen on, defaults to 8013
+
+ Format: int32
+
false
probesEnabledboolean + ProbesEnabled defines whether to enable liveness and readiness probes of flagd sidecar. Default true (enabled).
+
false
rolloutOnChangeboolean + RolloutOnChange dictates whether annotated deployments will be restarted when configuration changes are detected in this CR, defaults to false
+
false
socketPathstring + SocketPath defines the unix socket path to listen on
+
false
syncProviderArgs[]string + SyncProviderArgs are string arguments passed to all sync providers, defined as key values separated by =
+
false
tagstring + Tag to be appended to the sidecar image, defaults to 'main'
+
false
+ + +### FlagSourceConfiguration.spec.sources[index] +[↩ Parent](#flagsourceconfigurationspec) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sourcestring + Source is a URI of the flag sources
+
true
certPathstring + CertPath is a path of a certificate to be used by grpc TLS connection
+
false
httpSyncBearerTokenstring + HttpSyncBearerToken is a bearer token. Used by http(s) sync provider only
+
false
providerstring + Provider type - kubernetes, http, grpc or filepath
+
false
providerIDstring + ProviderID is an identifier to be used in grpc provider
+
false
selectorstring + Selector is a flag configuration selector used by grpc provider
+
false
tlsboolean + TLS - Enable/Disable secure TLS connectivity. Currently used only by GRPC sync
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index] +[↩ Parent](#flagsourceconfigurationspec) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom +[↩ Parent](#flagsourceconfigurationspecenvvarsindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.configMapKeyRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.fieldRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.resourceFieldRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.secretKeyRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ +# core.openfeature.dev/v1alpha2 + +Resource Types: + +- [FeatureFlagConfiguration](#featureflagconfiguration) + +- [FlagSourceConfiguration](#flagsourceconfiguration) + + + + +## FeatureFlagConfiguration +[↩ Parent](#coreopenfeaturedevv1alpha2 ) + + + + + + +FeatureFlagConfiguration is the Schema for the featureflagconfigurations API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcore.openfeature.dev/v1alpha2true
kindstringFeatureFlagConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + FeatureFlagConfigurationSpec defines the desired state of FeatureFlagConfiguration
+
false
statusobject + FeatureFlagConfigurationStatus defines the observed state of FeatureFlagConfiguration
+
false
+ + +### FeatureFlagConfiguration.spec +[↩ Parent](#featureflagconfiguration-1) + + + +FeatureFlagConfigurationSpec defines the desired state of FeatureFlagConfiguration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
featureFlagSpecobject + FeatureFlagSpec is the structured representation of the feature flag specification
+
false
flagDSpecobject + FlagDSpec [DEPRECATED]: superseded by FlagSourceConfiguration
+
false
serviceProviderobject + ServiceProvider [DEPRECATED]: superseded by FlagSourceConfiguration
+
false
syncProviderobject + SyncProvider [DEPRECATED]: superseded by FlagSourceConfiguration
+
false
+ + +### FeatureFlagConfiguration.spec.featureFlagSpec +[↩ Parent](#featureflagconfigurationspec-1) + + + +FeatureFlagSpec is the structured representation of the feature flag specification + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
flagsmap[string]object +
+
true
$evaluatorsobject +
+
false
+ + +### FeatureFlagConfiguration.spec.featureFlagSpec.flags[key] +[↩ Parent](#featureflagconfigurationspecfeatureflagspec) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultVariantstring +
+
true
stateenum +
+
+ Enum: ENABLED, DISABLED
+
true
variantsobject +
+
true
targetingobject + Targeting is the json targeting rule
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec +[↩ Parent](#featureflagconfigurationspec-1) + + + +FlagDSpec [DEPRECATED]: superseded by FlagSourceConfiguration + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
envs[]object +
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index] +[↩ Parent](#featureflagconfigurationspecflagdspec-1) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindex-1) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.configMapKeyRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom-1) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.fieldRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom-1) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.resourceFieldRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom-1) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### FeatureFlagConfiguration.spec.flagDSpec.envs[index].valueFrom.secretKeyRef +[↩ Parent](#featureflagconfigurationspecflagdspecenvsindexvaluefrom-1) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### FeatureFlagConfiguration.spec.serviceProvider +[↩ Parent](#featureflagconfigurationspec-1) + + + +ServiceProvider [DEPRECATED]: superseded by FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nameenum +
+
+ Enum: flagd
+
true
credentialsobject + ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. + Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
+
false
+ + +### FeatureFlagConfiguration.spec.serviceProvider.credentials +[↩ Parent](#featureflagconfigurationspecserviceprovider-1) + + + +ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. + Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstring + API version of the referent.
+
false
fieldPathstring + If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.
+
false
kindstring + Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+
false
namespacestring + Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+
false
resourceVersionstring + Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
+
false
uidstring + UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+
false
+ + +### FeatureFlagConfiguration.spec.syncProvider +[↩ Parent](#featureflagconfigurationspec-1) + + + +SyncProvider [DEPRECATED]: superseded by FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring +
+
true
httpSyncConfigurationobject + HttpSyncConfiguration defines the desired configuration for a http sync
+
false
+ + +### FeatureFlagConfiguration.spec.syncProvider.httpSyncConfiguration +[↩ Parent](#featureflagconfigurationspecsyncprovider-1) + + + +HttpSyncConfiguration defines the desired configuration for a http sync + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
targetstring + Target is the target url for flagd to poll
+
true
bearerTokenstring +
+
false
+ +## FlagSourceConfiguration +[↩ Parent](#coreopenfeaturedevv1alpha2 ) + + + + + + +FlagSourceConfiguration is the Schema for the FlagSourceConfigurations API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcore.openfeature.dev/v1alpha2true
kindstringFlagSourceConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration
+
false
statusobject + FlagSourceConfigurationStatus defines the observed state of FlagSourceConfiguration
+
false
+ + +### FlagSourceConfiguration.spec +[↩ Parent](#flagsourceconfiguration-1) + + + +FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultSyncProviderstring + DefaultSyncProvider defines the default sync provider
+
false
evaluatorstring + Evaluator sets an evaluator, defaults to 'json'
+
false
imagestring + Image allows for the sidecar image to be overridden, defaults to 'ghcr.io/open-feature/flagd'
+
false
logFormatstring + LogFormat allows for the sidecar log format to be overridden, defaults to 'json'
+
false
metricsPortinteger + MetricsPort defines the port to serve metrics on, defaults to 8013
+
+ Format: int32
+
false
portinteger + Port defines the port to listen on, defaults to 8014
+
+ Format: int32
+
false
probesEnabledboolean + ProbesEnabled defines whether to enable liveness and readiness probes of flagd sidecar. Default true (enabled).
+
false
socketPathstring + SocketPath defines the unix socket path to listen on
+
false
syncProviderArgs[]string + SyncProviderArgs are string arguments passed to all sync providers, defined as key values separated by =
+
false
tagstring + Tag to be appended to the sidecar image, defaults to 'main'
+
false
+ +# core.openfeature.dev/v1alpha3 + +Resource Types: + +- [FlagSourceConfiguration](#flagsourceconfiguration) + + + + +## FlagSourceConfiguration +[↩ Parent](#coreopenfeaturedevv1alpha3 ) + + + + + + +FlagSourceConfiguration is the Schema for the FlagSourceConfigurations API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcore.openfeature.dev/v1alpha3true
kindstringFlagSourceConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration
+
false
statusobject + FlagSourceConfigurationStatus defines the observed state of FlagSourceConfiguration
+
false
+ + +### FlagSourceConfiguration.spec +[↩ Parent](#flagsourceconfiguration-1) + + + +FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sources[]object + SyncProviders define the syncProviders and associated configuration to be applied to the sidecar
+
true
debugLoggingboolean + DebugLogging defines whether to enable --debug flag of flagd sidecar. Default false (disabled).
+
false
defaultSyncProviderstring + DefaultSyncProvider defines the default sync provider
+
false
envVarPrefixstring + EnvVarPrefix defines the prefix to be applied to all environment variables applied to the sidecar, default FLAGD
+
false
envVars[]object + EnvVars define the env vars to be applied to the sidecar, any env vars in FeatureFlagConfiguration CRs are added at the lowest index, all values will have the EnvVarPrefix applied, default FLAGD
+
false
evaluatorstring + Evaluator sets an evaluator, defaults to 'json'
+
false
imagestring + Image allows for the sidecar image to be overridden, defaults to 'ghcr.io/open-feature/flagd'
+
false
logFormatstring + LogFormat allows for the sidecar log format to be overridden, defaults to 'json'
+
false
metricsPortinteger + MetricsPort defines the port to serve metrics on, defaults to 8014
+
+ Format: int32
+
false
portinteger + Port defines the port to listen on, defaults to 8013
+
+ Format: int32
+
false
probesEnabledboolean + ProbesEnabled defines whether to enable liveness and readiness probes of flagd sidecar. Default true (enabled).
+
false
rolloutOnChangeboolean + RolloutOnChange dictates whether annotated deployments will be restarted when configuration changes are detected in this CR, defaults to false
+
false
socketPathstring + SocketPath defines the unix socket path to listen on
+
false
syncProviderArgs[]string + SyncProviderArgs are string arguments passed to all sync providers, defined as key values separated by =
+
false
tagstring + Tag to be appended to the sidecar image, defaults to 'main'
+
false
+ + +### FlagSourceConfiguration.spec.sources[index] +[↩ Parent](#flagsourceconfigurationspec-1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sourcestring + Source is a URI of the flag sources
+
true
certPathstring + CertPath is a path of a certificate to be used by grpc TLS connection
+
false
httpSyncBearerTokenstring + HttpSyncBearerToken is a bearer token. Used by http(s) sync provider only
+
false
providerstring + Provider type - kubernetes, http(s), grpc(s) or filepath
+
false
providerIDstring + ProviderID is an identifier to be used in grpc provider
+
false
selectorstring + Selector is a flag configuration selector used by grpc provider
+
false
tlsboolean + TLS - Enable/Disable secure TLS connectivity. Currently used only by GRPC sync
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index] +[↩ Parent](#flagsourceconfigurationspec-1) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom +[↩ Parent](#flagsourceconfigurationspecenvvarsindex-1) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.configMapKeyRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom-1) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.fieldRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom-1) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.resourceFieldRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom-1) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### FlagSourceConfiguration.spec.envVars[index].valueFrom.secretKeyRef +[↩ Parent](#flagsourceconfigurationspecenvvarsindexvaluefrom-1) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
\ No newline at end of file