From f47ee7ee4386bb45143e7403722f533dbe58f3cb Mon Sep 17 00:00:00 2001 From: odubajDT Date: Fri, 10 Nov 2023 09:49:47 +0100 Subject: [PATCH] update docs Signed-off-by: odubajDT --- docs/concepts/syncs.md | 8 ++-- ...ureflagconfiguration.md => featureflag.md} | 6 +-- ...econfiguration.md => featureflagsource.md} | 38 +++++++++---------- .../openfeature-operator/installation.md | 20 +++++----- .../specifications/in-process-providers.md | 2 +- flagd-proxy/README.md | 2 +- mkdocs.yml | 4 +- 7 files changed, 40 insertions(+), 40 deletions(-) rename docs/reference/openfeature-operator/crds/{featureflagconfiguration.md => featureflag.md} (80%) rename docs/reference/openfeature-operator/crds/{flagsourceconfiguration.md => featureflagsource.md} (67%) diff --git a/docs/concepts/syncs.md b/docs/concepts/syncs.md index 10f1c8d18..861f7c2ba 100644 --- a/docs/concepts/syncs.md +++ b/docs/concepts/syncs.md @@ -50,18 +50,18 @@ See [sync source](../reference/sync-configuration.md#source-configuration) confi ### Kubernetes sync The Kubernetes sync provider allows flagd to connect to a Kubernetes cluster and evaluate flags against a specified -FeatureFlagConfiguration resource as defined within -the [open-feature-operator](https://github.com/open-feature/open-feature-operator/blob/main/apis/core/v1alpha1/featureflagconfiguration_types.go) +FeatureFlag resource as defined within +the [open-feature-operator](https://github.com/open-feature/open-feature-operator/blob/main/apis/core/v1beta1/featureflag_types.go) spec. This configuration is best used in conjunction with the [OpenFeature Operator](https://github.com/open-feature/open-feature-operator). -To use an existing FeatureFlagConfiguration custom resource, start flagd with the following command: +To use an existing FeatureFlag custom resource, start flagd with the following command: ```shell flagd start --uri core.openfeature.dev/default/my_example ``` -In this example, `default/my_example` expected to be a valid FeatureFlagConfiguration resource, where `default` is the +In this example, `default/my_example` expected to be a valid FeatureFlag resource, where `default` is the namespace and `my_example` being the resource name. See [sync source](../reference/sync-configuration.md#source-configuration) configuration for details. diff --git a/docs/reference/openfeature-operator/crds/featureflagconfiguration.md b/docs/reference/openfeature-operator/crds/featureflag.md similarity index 80% rename from docs/reference/openfeature-operator/crds/featureflagconfiguration.md rename to docs/reference/openfeature-operator/crds/featureflag.md index 43e21b983..088c15b71 100644 --- a/docs/reference/openfeature-operator/crds/featureflagconfiguration.md +++ b/docs/reference/openfeature-operator/crds/featureflag.md @@ -1,12 +1,12 @@ # Feature Flag Configuration -The `FeatureFlagConfiguration` version `v1alpha2` CRD defines a CR with the following example structure: +The `FeatureFlag` version `v1beta1` CRD defines a CR with the following example structure: ```yaml apiVersion: core.openfeature.dev/v1alpha2 -kind: FeatureFlagConfiguration +kind: FeatureFlag metadata: - name: featureflagconfiguration-sample + name: featureflag-sample spec: featureFlagSpec: flags: diff --git a/docs/reference/openfeature-operator/crds/flagsourceconfiguration.md b/docs/reference/openfeature-operator/crds/featureflagsource.md similarity index 67% rename from docs/reference/openfeature-operator/crds/flagsourceconfiguration.md rename to docs/reference/openfeature-operator/crds/featureflagsource.md index dd7c89d74..20917fe17 100644 --- a/docs/reference/openfeature-operator/crds/flagsourceconfiguration.md +++ b/docs/reference/openfeature-operator/crds/featureflagsource.md @@ -1,23 +1,23 @@ -# FlagSourceConfigurations +# FeatureFlagSources -`FlagSourceConfiguration` support multiple flag sources. Sources are configured as a list and given below are supported sources and their configurations, +`FeatureFlagSource` support multiple flag sources. Sources are configured as a list and given below are supported sources and their configurations, -## kubernetes aka `FeatureFlagConfiguration` +## kubernetes aka `FeatureFlag` -This is `FeatureFlagConfiguration` custom resource backed flagd feature flag definition. -Read more on the custom resource at the dedicated documentation of [FeatureFlagConfiguration](https://github.com/open-feature/open-feature-operator/blob/main/docs/feature_flag_configuration.md) +This is `FeatureFlag` custom resource backed flagd feature flag definition. +Read more on the custom resource at the dedicated documentation of [FeatureFlag](https://github.com/open-feature/open-feature-operator/blob/main/docs/feature_flag_configuration.md) -To refer this custom resource in `FlagSourceConfiguration`, provider type `kubernetes` is used as below example, +To refer this custom resource in `FlagSource`, provider type `kubernetes` is used as below example, ```yaml sources: - - source: flags/sample-flags # FeatureFlagConfiguration - namespace/custom_resource_name - provider: kubernetes # kubernetes flag source backed by FeatureFlagConfiguration custom resource + - source: flags/sample-flags # FeatureFlag - namespace/custom_resource_name + provider: kubernetes # kubernetes flag source backed by FeatureFlag custom resource ``` ## flagd-proxy -`flagd-proxy` is an alternative to direct resource access on `FeatureFlagConfiguration` custom resources. +`flagd-proxy` is an alternative to direct resource access on `FeatureFlag` custom resources. This source type is useful when there is a need for restricting workload permissions and/or to reduce k8s API load. Read more about proxy approach to access kubernetes resources: [flagd-proxy](https://github.com/open-feature/open-feature-operator/blob/main/docs/flagd_proxy.md) @@ -60,7 +60,7 @@ sources: ## Sidecar configurations -`FlagSourceConfiguration` further allows to provide configurations to the injected flagd sidecar. +`FeatureFlagSource` further allows to provide configurations to the injected flagd sidecar. Table given below is non-exhaustive list of overriding options, | Configuration | Explanation | Default | @@ -82,16 +82,16 @@ If no namespace is provided, it is assumed that the CR is within the same namesp namespace: test-ns annotations: openfeature.dev/enabled: "true" - openfeature.dev/flagsourceconfiguration: "config-A, test-ns-2/config-B" + openfeature.dev/featureflagsource: "config-A, test-ns-2/config-B" ``` In this example, 2 CRs are being used to configure the injected container (by default the operator uses the `flagd:main` image), `config-A` (which is assumed to be in the namespace `test-ns`) and `config-B` from the `test-ns-2` namespace, with `config-B` taking precedence in the configuration merge. -The `FlagSourceConfiguration` version `v1alpha3` CRD defines a CR with the following example structure, the documentation for this CRD can be found [here](https://github.com/open-feature/open-feature-operator/blob/main/docs/crds.md#flagsourceconfiguration): +The `FeatureFlagSource` version `v1alpha3` CRD defines a CR with the following example structure, the documentation for this CRD can be found [here](https://github.com/open-feature/open-feature-operator/blob/main/docs/crds.md#featureflagsource): ```yaml apiVersion: core.openfeature.dev/v1alpha3 -kind: FlagSourceConfiguration +kind: FeatureFlagSource metadata: name: flag-source-sample spec: @@ -114,15 +114,15 @@ spec: debugLogging: false ``` -The relevant `FlagSourceConfigurations` are passed to the operator by setting the `openfeature.dev/flagsourceconfiguration` annotation, and is responsible for providing the full configuration of the injected sidecar. +The relevant `FeatureFlagSources` are passed to the operator by setting the `openfeature.dev/featureflagsource` annotation, and is responsible for providing the full configuration of the injected sidecar. ## Configuration Merging -When multiple `FlagSourceConfigurations` are provided, the configurations are merged. The last `CR` takes precedence over the first, with any configuration from the deprecated `FlagDSpec` field of the `FeatureFlagConfiguration` CRD taking the lowest priority. +When multiple `FeatureFlagSources` are provided, the configurations are merged. The last `CR` takes precedence over the first, with any configuration from the deprecated `FlagDSpec` field of the `FeatureFlag` CRD taking the lowest priority. ```mermaid flowchart LR - FlagSourceConfiguration-values -->|highest priority| environment-variables -->|lowest priority| defaults + FeatureFlagSource-values -->|highest priority| environment-variables -->|lowest priority| defaults ``` An example of this behavior: @@ -131,14 +131,14 @@ An example of this behavior: metadata: annotations: openfeature.dev/enabled: "true" - openfeature.dev/flagsourceconfiguration:"config-A, config-B" + openfeature.dev/featureflagsource:"config-A, config-B" ``` Config-A: ```yaml apiVersion: core.openfeature.dev/v1alpha2 -kind: FlagSourceConfiguration +kind: FeatureFlagSource metadata: name: config-A spec: @@ -150,7 +150,7 @@ Config-B: ```yaml apiVersion: core.openfeature.dev/v1alpha2 -kind: FlagSourceConfiguration +kind: FeatureFlagSource metadata: name: config-B spec: diff --git a/docs/reference/openfeature-operator/installation.md b/docs/reference/openfeature-operator/installation.md index 19d44b830..0ed553185 100644 --- a/docs/reference/openfeature-operator/installation.md +++ b/docs/reference/openfeature-operator/installation.md @@ -27,14 +27,14 @@ Create a namespace to house your flags: kubectl create namespace flags ``` -Next, define your feature flag(s) using the [FeatureFlagConfiguration](./crds/featureflagconfiguration.md) custom resource definition (CRD). +Next, define your feature flag(s) using the [FeatureFlag](./crds/featureflag.md) custom resource definition (CRD). This example specifies one flag called `foo` which has two variants `bar` and `baz`. The `defaultVariant` is `bar`. ```bash kubectl apply -n flags -f - <

diff --git a/mkdocs.yml b/mkdocs.yml index dcc1032ee..fee865456 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -92,8 +92,8 @@ nav: - 'String Comparison Specification': 'reference/specifications/custom-operations/string-comparison-operation-spec.md' - 'OpenFeature Operator': - 'Installation': 'reference/openfeature-operator/installation.md' - - 'FeatureFlagConfiguration': 'reference/openfeature-operator/crds/featureflagconfiguration.md' - - 'FlagSourceConfiguration': 'reference/openfeature-operator/crds/flagsourceconfiguration.md' + - 'FeatureFlag': 'reference/openfeature-operator/crds/featureflag.md' + - 'FeatureFlagSource': 'reference/openfeature-operator/crds/featureflagsource.md' - 'Naming': 'reference/naming.md' - 'FAQ': 'faq.md' - 'Troubleshooting': 'troubleshooting.md'