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 + +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +core.openfeature.dev/v1alpha1 | +true | +
kind | +string | +FeatureFlagConfiguration | +true | +
metadata | +object | +Refer to the Kubernetes API documentation for the fields of the `metadata` field. | +true | +
spec | +object | +
+ FeatureFlagConfigurationSpec defines the desired state of FeatureFlagConfiguration + |
+ false | +
status | +object | +
+ FeatureFlagConfigurationStatus defines the observed state of FeatureFlagConfiguration + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
featureFlagSpec | +string | +
+ FeatureFlagSpec is the json representation of the feature flag + |
+ false | +
flagDSpec | +object | +
+ FlagDSpec [DEPRECATED]: superseded by FlagSourceConfiguration + |
+ false | +
serviceProvider | +object | +
+ ServiceProvider [DEPRECATED]: superseded by FlagSourceConfiguration + |
+ false | +
syncProvider | +object | +
+ SyncProvider [DEPRECATED]: superseded by FlagSourceConfiguration + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
envs | +[]object | +
+ + |
+ false | +
metricsPort | +integer | +
+ + + Format: int32 + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +string | +
+ Name of the environment variable. Must be a C_IDENTIFIER. + |
+ true | +
value | +string | +
+ 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 | +
valueFrom | +object | +
+ Source for the environment variable's value. Cannot be used if value is not empty. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
configMapKeyRef | +object | +
+ Selects a key of a ConfigMap. + |
+ false | +
fieldRef | +object | +
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels[' + |
+ false | +
resourceFieldRef | +object | +
+ 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 | +
secretKeyRef | +object | +
+ Selects a key of a secret in the pod's namespace + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key to select. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the ConfigMap or its key must be defined + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
fieldPath | +string | +
+ Path of the field to select in the specified API version. + |
+ true | +
apiVersion | +string | +
+ Version of the schema the FieldPath is written in terms of, defaults to "v1". + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
resource | +string | +
+ Required: resource to select + |
+ true | +
containerName | +string | +
+ Container name: required for volumes, optional for env vars + |
+ false | +
divisor | +int or string | +
+ Specifies the output format of the exposed resources, defaults to "1" + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key of the secret to select from. Must be a valid secret key. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the Secret or its key must be defined + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +enum | +
+ + + Enum: flagd + |
+ true | +
credentials | +object | +
+ 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 | +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +
+ API version of the referent. + |
+ false | +
fieldPath | +string | +
+ 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 | +
kind | +string | +
+ Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + |
+ false | +
name | +string | +
+ Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + |
+ false | +
namespace | +string | +
+ Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + |
+ false | +
resourceVersion | +string | +
+ 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 | +
uid | +string | +
+ UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +string | +
+ + |
+ true | +
httpSyncConfiguration | +object | +
+ HttpSyncConfiguration defines the desired configuration for a http sync + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
target | +string | +
+ Target is the target url for flagd to poll + |
+ true | +
bearerToken | +string | +
+ + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +core.openfeature.dev/v1alpha1 | +true | +
kind | +string | +FlagSourceConfiguration | +true | +
metadata | +object | +Refer to the Kubernetes API documentation for the fields of the `metadata` field. | +true | +
spec | +object | +
+ FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration + |
+ false | +
status | +object | +
+ FlagSourceConfigurationStatus defines the observed state of FlagSourceConfiguration + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
sources | +[]object | +
+ Sources defines the syncProviders and associated configuration to be applied to the sidecar + |
+ true | +
debugLogging | +boolean | +
+ DebugLogging defines whether to enable --debug flag of flagd sidecar. Default false (disabled). + |
+ false | +
defaultSyncProvider | +string | +
+ DefaultSyncProvider defines the default sync provider + |
+ false | +
envVarPrefix | +string | +
+ 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 | +
evaluator | +string | +
+ Evaluator sets an evaluator, defaults to 'json' + |
+ false | +
image | +string | +
+ Image allows for the sidecar image to be overridden, defaults to 'ghcr.io/open-feature/flagd' + |
+ false | +
logFormat | +string | +
+ LogFormat allows for the sidecar log format to be overridden, defaults to 'json' + |
+ false | +
metricsPort | +integer | +
+ MetricsPort defines the port to serve metrics on, defaults to 8014 + + Format: int32 + |
+ false | +
port | +integer | +
+ Port defines the port to listen on, defaults to 8013 + + Format: int32 + |
+ false | +
probesEnabled | +boolean | +
+ ProbesEnabled defines whether to enable liveness and readiness probes of flagd sidecar. Default true (enabled). + |
+ false | +
rolloutOnChange | +boolean | +
+ RolloutOnChange dictates whether annotated deployments will be restarted when configuration changes are detected in this CR, defaults to false + |
+ false | +
socketPath | +string | +
+ 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 | +
tag | +string | +
+ Tag to be appended to the sidecar image, defaults to 'main' + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
source | +string | +
+ Source is a URI of the flag sources + |
+ true | +
certPath | +string | +
+ CertPath is a path of a certificate to be used by grpc TLS connection + |
+ false | +
httpSyncBearerToken | +string | +
+ HttpSyncBearerToken is a bearer token. Used by http(s) sync provider only + |
+ false | +
provider | +string | +
+ Provider type - kubernetes, http, grpc or filepath + |
+ false | +
providerID | +string | +
+ ProviderID is an identifier to be used in grpc provider + |
+ false | +
selector | +string | +
+ Selector is a flag configuration selector used by grpc provider + |
+ false | +
tls | +boolean | +
+ TLS - Enable/Disable secure TLS connectivity. Currently used only by GRPC sync + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +string | +
+ Name of the environment variable. Must be a C_IDENTIFIER. + |
+ true | +
value | +string | +
+ 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 | +
valueFrom | +object | +
+ Source for the environment variable's value. Cannot be used if value is not empty. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
configMapKeyRef | +object | +
+ Selects a key of a ConfigMap. + |
+ false | +
fieldRef | +object | +
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels[' + |
+ false | +
resourceFieldRef | +object | +
+ 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 | +
secretKeyRef | +object | +
+ Selects a key of a secret in the pod's namespace + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key to select. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the ConfigMap or its key must be defined + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
fieldPath | +string | +
+ Path of the field to select in the specified API version. + |
+ true | +
apiVersion | +string | +
+ Version of the schema the FieldPath is written in terms of, defaults to "v1". + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
resource | +string | +
+ Required: resource to select + |
+ true | +
containerName | +string | +
+ Container name: required for volumes, optional for env vars + |
+ false | +
divisor | +int or string | +
+ Specifies the output format of the exposed resources, defaults to "1" + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key of the secret to select from. Must be a valid secret key. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the Secret or its key must be defined + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +core.openfeature.dev/v1alpha2 | +true | +
kind | +string | +FeatureFlagConfiguration | +true | +
metadata | +object | +Refer to the Kubernetes API documentation for the fields of the `metadata` field. | +true | +
spec | +object | +
+ FeatureFlagConfigurationSpec defines the desired state of FeatureFlagConfiguration + |
+ false | +
status | +object | +
+ FeatureFlagConfigurationStatus defines the observed state of FeatureFlagConfiguration + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
featureFlagSpec | +object | +
+ FeatureFlagSpec is the structured representation of the feature flag specification + |
+ false | +
flagDSpec | +object | +
+ FlagDSpec [DEPRECATED]: superseded by FlagSourceConfiguration + |
+ false | +
serviceProvider | +object | +
+ ServiceProvider [DEPRECATED]: superseded by FlagSourceConfiguration + |
+ false | +
syncProvider | +object | +
+ SyncProvider [DEPRECATED]: superseded by FlagSourceConfiguration + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
flags | +map[string]object | +
+ + |
+ true | +
$evaluators | +object | +
+ + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
defaultVariant | +string | +
+ + |
+ true | +
state | +enum | +
+ + + Enum: ENABLED, DISABLED + |
+ true | +
variants | +object | +
+ + |
+ true | +
targeting | +object | +
+ Targeting is the json targeting rule + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
envs | +[]object | +
+ + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +string | +
+ Name of the environment variable. Must be a C_IDENTIFIER. + |
+ true | +
value | +string | +
+ 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 | +
valueFrom | +object | +
+ Source for the environment variable's value. Cannot be used if value is not empty. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
configMapKeyRef | +object | +
+ Selects a key of a ConfigMap. + |
+ false | +
fieldRef | +object | +
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels[' + |
+ false | +
resourceFieldRef | +object | +
+ 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 | +
secretKeyRef | +object | +
+ Selects a key of a secret in the pod's namespace + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key to select. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the ConfigMap or its key must be defined + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
fieldPath | +string | +
+ Path of the field to select in the specified API version. + |
+ true | +
apiVersion | +string | +
+ Version of the schema the FieldPath is written in terms of, defaults to "v1". + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
resource | +string | +
+ Required: resource to select + |
+ true | +
containerName | +string | +
+ Container name: required for volumes, optional for env vars + |
+ false | +
divisor | +int or string | +
+ Specifies the output format of the exposed resources, defaults to "1" + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key of the secret to select from. Must be a valid secret key. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the Secret or its key must be defined + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +enum | +
+ + + Enum: flagd + |
+ true | +
credentials | +object | +
+ 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 | +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +
+ API version of the referent. + |
+ false | +
fieldPath | +string | +
+ 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 | +
kind | +string | +
+ Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + |
+ false | +
name | +string | +
+ Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + |
+ false | +
namespace | +string | +
+ Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + |
+ false | +
resourceVersion | +string | +
+ 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 | +
uid | +string | +
+ UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +string | +
+ + |
+ true | +
httpSyncConfiguration | +object | +
+ HttpSyncConfiguration defines the desired configuration for a http sync + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
target | +string | +
+ Target is the target url for flagd to poll + |
+ true | +
bearerToken | +string | +
+ + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +core.openfeature.dev/v1alpha2 | +true | +
kind | +string | +FlagSourceConfiguration | +true | +
metadata | +object | +Refer to the Kubernetes API documentation for the fields of the `metadata` field. | +true | +
spec | +object | +
+ FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration + |
+ false | +
status | +object | +
+ FlagSourceConfigurationStatus defines the observed state of FlagSourceConfiguration + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
defaultSyncProvider | +string | +
+ DefaultSyncProvider defines the default sync provider + |
+ false | +
evaluator | +string | +
+ Evaluator sets an evaluator, defaults to 'json' + |
+ false | +
image | +string | +
+ Image allows for the sidecar image to be overridden, defaults to 'ghcr.io/open-feature/flagd' + |
+ false | +
logFormat | +string | +
+ LogFormat allows for the sidecar log format to be overridden, defaults to 'json' + |
+ false | +
metricsPort | +integer | +
+ MetricsPort defines the port to serve metrics on, defaults to 8013 + + Format: int32 + |
+ false | +
port | +integer | +
+ Port defines the port to listen on, defaults to 8014 + + Format: int32 + |
+ false | +
probesEnabled | +boolean | +
+ ProbesEnabled defines whether to enable liveness and readiness probes of flagd sidecar. Default true (enabled). + |
+ false | +
socketPath | +string | +
+ 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 | +
tag | +string | +
+ Tag to be appended to the sidecar image, defaults to 'main' + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +core.openfeature.dev/v1alpha3 | +true | +
kind | +string | +FlagSourceConfiguration | +true | +
metadata | +object | +Refer to the Kubernetes API documentation for the fields of the `metadata` field. | +true | +
spec | +object | +
+ FlagSourceConfigurationSpec defines the desired state of FlagSourceConfiguration + |
+ false | +
status | +object | +
+ FlagSourceConfigurationStatus defines the observed state of FlagSourceConfiguration + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
sources | +[]object | +
+ SyncProviders define the syncProviders and associated configuration to be applied to the sidecar + |
+ true | +
debugLogging | +boolean | +
+ DebugLogging defines whether to enable --debug flag of flagd sidecar. Default false (disabled). + |
+ false | +
defaultSyncProvider | +string | +
+ DefaultSyncProvider defines the default sync provider + |
+ false | +
envVarPrefix | +string | +
+ 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 | +
evaluator | +string | +
+ Evaluator sets an evaluator, defaults to 'json' + |
+ false | +
image | +string | +
+ Image allows for the sidecar image to be overridden, defaults to 'ghcr.io/open-feature/flagd' + |
+ false | +
logFormat | +string | +
+ LogFormat allows for the sidecar log format to be overridden, defaults to 'json' + |
+ false | +
metricsPort | +integer | +
+ MetricsPort defines the port to serve metrics on, defaults to 8014 + + Format: int32 + |
+ false | +
port | +integer | +
+ Port defines the port to listen on, defaults to 8013 + + Format: int32 + |
+ false | +
probesEnabled | +boolean | +
+ ProbesEnabled defines whether to enable liveness and readiness probes of flagd sidecar. Default true (enabled). + |
+ false | +
rolloutOnChange | +boolean | +
+ RolloutOnChange dictates whether annotated deployments will be restarted when configuration changes are detected in this CR, defaults to false + |
+ false | +
socketPath | +string | +
+ 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 | +
tag | +string | +
+ Tag to be appended to the sidecar image, defaults to 'main' + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
source | +string | +
+ Source is a URI of the flag sources + |
+ true | +
certPath | +string | +
+ CertPath is a path of a certificate to be used by grpc TLS connection + |
+ false | +
httpSyncBearerToken | +string | +
+ HttpSyncBearerToken is a bearer token. Used by http(s) sync provider only + |
+ false | +
provider | +string | +
+ Provider type - kubernetes, http(s), grpc(s) or filepath + |
+ false | +
providerID | +string | +
+ ProviderID is an identifier to be used in grpc provider + |
+ false | +
selector | +string | +
+ Selector is a flag configuration selector used by grpc provider + |
+ false | +
tls | +boolean | +
+ TLS - Enable/Disable secure TLS connectivity. Currently used only by GRPC sync + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
name | +string | +
+ Name of the environment variable. Must be a C_IDENTIFIER. + |
+ true | +
value | +string | +
+ 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 | +
valueFrom | +object | +
+ Source for the environment variable's value. Cannot be used if value is not empty. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
configMapKeyRef | +object | +
+ Selects a key of a ConfigMap. + |
+ false | +
fieldRef | +object | +
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels[' + |
+ false | +
resourceFieldRef | +object | +
+ 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 | +
secretKeyRef | +object | +
+ Selects a key of a secret in the pod's namespace + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key to select. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the ConfigMap or its key must be defined + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
fieldPath | +string | +
+ Path of the field to select in the specified API version. + |
+ true | +
apiVersion | +string | +
+ Version of the schema the FieldPath is written in terms of, defaults to "v1". + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
resource | +string | +
+ Required: resource to select + |
+ true | +
containerName | +string | +
+ Container name: required for volumes, optional for env vars + |
+ false | +
divisor | +int or string | +
+ Specifies the output format of the exposed resources, defaults to "1" + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ The key of the secret to select from. Must be a valid secret key. + |
+ true | +
name | +string | +
+ 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 | +
optional | +boolean | +
+ Specify whether the Secret or its key must be defined + |
+ false | +