From 8a8b01b9f434da42b3949592429da27921bbbcf7 Mon Sep 17 00:00:00 2001 From: Ciara Stacke Date: Wed, 24 Sep 2025 18:23:19 +0100 Subject: [PATCH 1/3] Add bundle, update RBAC, use root helm chart --- .../templates/clusterrole.yaml | 22 +- operators/.gitignore | 14 - operators/Dockerfile | 15 +- operators/Makefile | 152 +- operators/PROJECT | 2 +- operators/README.md | 135 + operators/bundle.Dockerfile | 21 + ...gateway.nginx.org_nginxgatewayfabrics.yaml | 104 + ...er-manager-metrics-service_v1_service.yaml | 20 + ...c.authorization.k8s.io_v1_clusterrole.yaml | 10 + ...-gateway-fabric.clusterserviceversion.yaml | 528 ++ operators/bundle/metadata/annotations.yaml | 15 + operators/bundle/tests/scorecard/config.yaml | 70 + ...gateway.nginx.org_nginxgatewayfabrics.yaml | 62 +- operators/config/default/kustomization.yaml | 6 +- operators/config/default/metrics_service.yaml | 4 +- operators/config/manager/kustomization.yaml | 6 + operators/config/manager/manager.yaml | 32 +- ...-gateway-fabric.clusterserviceversion.yaml | 47 + operators/config/manifests/kustomization.yaml | 2 +- .../network-policy/allow-metrics-traffic.yaml | 4 +- operators/config/prometheus/monitor.yaml | 4 +- operators/config/rbac/kustomization.yaml | 8 - .../config/rbac/leader_election_role.yaml | 2 +- .../rbac/leader_election_role_binding.yaml | 2 +- .../rbac/nginxgatewayfabric_admin_role.yaml | 27 - .../rbac/nginxgatewayfabric_editor_role.yaml | 33 - .../rbac/nginxgatewayfabric_viewer_role.yaml | 29 - operators/config/rbac/role.yaml | 168 +- operators/config/rbac/role_binding.yaml | 2 +- operators/config/rbac/service_account.yaml | 2 +- .../gateway_v1alpha1_nginxgatewayfabric.yaml | 10 +- .../nginx-gateway-fabric/.helmignore | 3 - .../nginx-gateway-fabric/Chart.yaml | 18 - .../nginx-gateway-fabric/README.md | 293 - ...eway.nginx.org_clientsettingspolicies.yaml | 453 - .../crds/gateway.nginx.org_nginxgateways.yaml | 133 - .../crds/gateway.nginx.org_nginxproxies.yaml | 8250 ----------------- ...teway.nginx.org_observabilitypolicies.yaml | 941 -- .../gateway.nginx.org_snippetsfilters.yaml | 189 - ...ay.nginx.org_upstreamsettingspolicies.yaml | 448 - .../templates/_helpers.tpl | 112 - .../templates/certs-job.yaml | 172 - .../templates/clusterrole.yaml | 171 - .../templates/clusterrolebinding.yaml | 14 - .../templates/deployment.yaml | 212 - .../templates/gateway.yaml | 41 - .../templates/gatewayclass.yaml | 19 - .../nginx-gateway-fabric/templates/hpa.yaml | 48 - .../templates/nginxgateway.yaml | 15 - .../templates/nginxproxy.yaml | 92 - .../nginx-gateway-fabric/templates/scc.yaml | 80 - .../templates/service.yaml | 23 - .../templates/serviceaccount.yaml | 21 - .../nginx-gateway-fabric/values.schema.json | 1127 --- .../nginx-gateway-fabric/values.yaml | 716 -- operators/scripts/update-bundle.sh | 34 + operators/scripts/update-ngf-img-version.sh | 12 + 58 files changed, 1286 insertions(+), 13909 deletions(-) delete mode 100644 operators/.gitignore create mode 100644 operators/README.md create mode 100644 operators/bundle.Dockerfile create mode 100644 operators/bundle/manifests/gateway.nginx.org_nginxgatewayfabrics.yaml create mode 100644 operators/bundle/manifests/nginx-gateway-fabric-controller-manager-metrics-service_v1_service.yaml create mode 100644 operators/bundle/manifests/nginx-gateway-fabric-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml create mode 100644 operators/bundle/manifests/nginx-gateway-fabric.clusterserviceversion.yaml create mode 100644 operators/bundle/metadata/annotations.yaml create mode 100644 operators/bundle/tests/scorecard/config.yaml create mode 100644 operators/config/manifests/bases/nginx-gateway-fabric.clusterserviceversion.yaml delete mode 100644 operators/config/rbac/nginxgatewayfabric_admin_role.yaml delete mode 100644 operators/config/rbac/nginxgatewayfabric_editor_role.yaml delete mode 100644 operators/config/rbac/nginxgatewayfabric_viewer_role.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/.helmignore delete mode 100644 operators/helm-charts/nginx-gateway-fabric/Chart.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/README.md delete mode 100644 operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_clientsettingspolicies.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxgateways.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxproxies.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_observabilitypolicies.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_snippetsfilters.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_upstreamsettingspolicies.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/_helpers.tpl delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/certs-job.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/clusterrole.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/clusterrolebinding.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/deployment.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/gateway.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/gatewayclass.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/hpa.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/nginxgateway.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/nginxproxy.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/scc.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/service.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/templates/serviceaccount.yaml delete mode 100644 operators/helm-charts/nginx-gateway-fabric/values.schema.json delete mode 100644 operators/helm-charts/nginx-gateway-fabric/values.yaml create mode 100755 operators/scripts/update-bundle.sh create mode 100755 operators/scripts/update-ngf-img-version.sh diff --git a/charts/nginx-gateway-fabric/templates/clusterrole.yaml b/charts/nginx-gateway-fabric/templates/clusterrole.yaml index 8fc4da400e..57c92e4692 100644 --- a/charts/nginx-gateway-fabric/templates/clusterrole.yaml +++ b/charts/nginx-gateway-fabric/templates/clusterrole.yaml @@ -7,15 +7,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/operators/.gitignore b/operators/.gitignore deleted file mode 100644 index 62fd3e3995..0000000000 --- a/operators/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ - -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib -bin - -# editor and IDE paraphernalia -.idea -*.swp -*.swo -*~ diff --git a/operators/Dockerfile b/operators/Dockerfile index 7265464e6b..61d0038b35 100644 --- a/operators/Dockerfile +++ b/operators/Dockerfile @@ -1,7 +1,16 @@ -# Build the manager binary FROM quay.io/operator-framework/helm-operator:v1.41.1 +COPY LICENSE /licenses/LICENSE + +LABEL name="nginx-gateway-fabric-operator" \ + vendor="F5 NGINX" \ + version="1.0.0" \ + release="1" \ + summary="NGINX Gateway Fabric Operator" \ + description="Helm-based operator for NGINX Gateway Fabric" + ENV HOME=/opt/helm -COPY watches.yaml ${HOME}/watches.yaml -COPY helm-charts ${HOME}/helm-charts +COPY operators/watches.yaml ${HOME}/watches.yaml +COPY charts ${HOME}/helm-charts +COPY config ${HOME}/config WORKDIR ${HOME} diff --git a/operators/Makefile b/operators/Makefile index cc3bfd9fec..14a7d8d935 100644 --- a/operators/Makefile +++ b/operators/Makefile @@ -1,77 +1,42 @@ # VERSION defines the project version for the bundle. -# Update this value when you upgrade the version of your project. -# To re-generate a bundle for another specific version without changing the standard setup, you can: -# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) -# - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.0.1 - -# CHANNELS define the bundle channels used in the bundle. -# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") -# To re-generate a bundle for other specific channels without changing the standard setup, you can: -# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=candidate,fast,stable) -# - use environment variables to overwrite this value (e.g export CHANNELS="candidate,fast,stable") +# Update this value when you upgrade the version of the operator. +VERSION ?= 1.0.0 + +# renovate: datasource=github-tags depName=operator-framework/operator-sdk +OPERATOR_SDK_VERSION ?= v1.41.1 + +# renovate: datasource=github-tags depName=kubernetes-sigs/kustomize +KUSTOMIZE_VERSION ?= v5.6.0 + +IMAGE_TAG_BASE ?= nginx-gateway-fabric-operator + +IMG ?= $(IMAGE_TAG_BASE):v$(VERSION) + +## Bundle config + +BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION) + +CHANNELS ?= stable +DEFAULT_CHANNEL ?= stable + ifneq ($(origin CHANNELS), undefined) BUNDLE_CHANNELS := --channels=$(CHANNELS) endif - -# DEFAULT_CHANNEL defines the default channel used in the bundle. -# Add a new line here if you would like to change its default config. (E.g DEFAULT_CHANNEL = "stable") -# To re-generate a bundle for any other default channel without changing the default setup, you can: -# - use the DEFAULT_CHANNEL as arg of the bundle target (e.g make bundle DEFAULT_CHANNEL=stable) -# - use environment variables to overwrite this value (e.g export DEFAULT_CHANNEL="stable") ifneq ($(origin DEFAULT_CHANNEL), undefined) BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL) endif BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) -# IMAGE_TAG_BASE defines the docker.io namespace and part of the image name for remote images. -# This variable is used to construct full image tags for bundle and catalog images. -# -# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both -# nginx.org/operators-bundle:$VERSION and nginx.org/operators-catalog:$VERSION. -IMAGE_TAG_BASE ?= nginx.org/operators - -# BUNDLE_IMG defines the image:tag used for the bundle. -# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:) -BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION) - -# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle command BUNDLE_GEN_FLAGS ?= -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) -# USE_IMAGE_DIGESTS defines if images are resolved via tags or digests -# You can enable this value if you would like to use SHA Based Digests -# To enable set flag to true -USE_IMAGE_DIGESTS ?= false +USE_IMAGE_DIGESTS ?= false # USE_IMAGE_DIGESTS defines if images are resolved via tags or digests ifeq ($(USE_IMAGE_DIGESTS), true) BUNDLE_GEN_FLAGS += --use-image-digests endif -# Set the Operator SDK version to use. By default, what is installed on the system is used. -# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit. -OPERATOR_SDK_VERSION ?= v1.41.1 - -# Container tool to use for building and pushing images -CONTAINER_TOOL ?= docker - -# Image URL to use all building/pushing image targets -IMG ?= controller:latest - .PHONY: all all: docker-build -##@ General - -# The help target prints out all targets with their descriptions organized -# beneath their categories. The categories are represented by '##@' and the -# target descriptions by '##'. The awk commands is responsible for reading the -# entire set of makefiles included in this invocation, looking for lines of the -# file as xyz: ## something, and then pretty-format the target and help. Then, -# if there's a line with ##@ something, that gets pretty-printed as a category. -# More info on the usage of ANSI control characters for terminal formatting: -# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters -# More info on the awk command: -# http://linuxcommand.org/lc3_adv_awk.php - .PHONY: help help: ## Display this help. @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) @@ -84,25 +49,25 @@ run: helm-operator ## Run against the configured Kubernetes cluster in ~/.kube/c .PHONY: docker-build docker-build: ## Build docker image with the manager. - $(CONTAINER_TOOL) build -t ${IMG} . + docker build -f Dockerfile -t ${IMG} .. .PHONY: docker-push docker-push: ## Push docker image with the manager. - $(CONTAINER_TOOL) push ${IMG} + docker push ${IMG} + +.PHONY: docker-load +docker-load: ## Load docker image with the manager to kind. + kind load docker-image ${IMG} # PLATFORMS defines the target platforms for the manager image be build to provide support to multiple -# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: -# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/ -# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/ -# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=> than the export will fail) -# To properly provided solutions that supports more than one platform you should use this option. -PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le +# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). +PLATFORMS ?= linux/arm64,linux/amd64 .PHONY: docker-buildx docker-buildx: ## Build and push docker image for the manager for cross-platform support - - $(CONTAINER_TOOL) buildx create --name project-v3-builder - $(CONTAINER_TOOL) buildx use project-v3-builder - - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile . - - $(CONTAINER_TOOL) buildx rm project-v3-builder + - docker buildx create --name project-v3-builder + docker buildx use project-v3-builder + - docker buildx build --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile .. + - docker buildx rm project-v3-builder ##@ Deployment @@ -134,7 +99,7 @@ ifeq (,$(shell which kustomize 2>/dev/null)) @{ \ set -e ;\ mkdir -p $(dir $(KUSTOMIZE)) ;\ - curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.6.0/kustomize_v5.6.0_$(OS)_$(ARCH).tar.gz | \ + curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/$(KUSTOMIZE_VERSION)/kustomize_$(KUSTOMIZE_VERSION)_$(OS)_$(ARCH).tar.gz | \ tar xzf - -C bin/ ;\ } else @@ -150,7 +115,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null)) @{ \ set -e ;\ mkdir -p $(dir $(HELM_OPERATOR)) ;\ - curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.41.1/helm-operator_$(OS)_$(ARCH) ;\ + curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/helm-operator_$(OS)_$(ARCH) ;\ chmod +x $(HELM_OPERATOR) ;\ } else @@ -174,58 +139,23 @@ OPERATOR_SDK = $(shell which operator-sdk) endif endif - .PHONY: bundle bundle: kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files. $(OPERATOR_SDK) generate kustomize manifests -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS) + ./scripts/update-bundle.sh $(OPERATOR_SDK) bundle validate ./bundle .PHONY: bundle-build bundle-build: ## Build the bundle image. - $(CONTAINER_TOOL) build -f bundle.Dockerfile -t $(BUNDLE_IMG) . + docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . .PHONY: bundle-push bundle-push: ## Push the bundle image. $(MAKE) docker-push IMG=$(BUNDLE_IMG) -.PHONY: opm -OPM = $(LOCALBIN)/opm -opm: ## Download opm locally if necessary. -ifeq (,$(wildcard $(OPM))) -ifeq (,$(shell which opm 2>/dev/null)) - @{ \ - set -e ;\ - mkdir -p $(dir $(OPM)) ;\ - curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.55.0/$(OS)-$(ARCH)-opm ;\ - chmod +x $(OPM) ;\ - } -else -OPM = $(shell which opm) -endif -endif - -# A comma-separated list of bundle images (e.g. make catalog-build BUNDLE_IMGS=example.com/operator-bundle:v0.1.0,example.com/operator-bundle:v0.2.0). -# These images MUST exist in a registry and be pull-able. -BUNDLE_IMGS ?= $(BUNDLE_IMG) - -# The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:v0.2.0). -CATALOG_IMG ?= $(IMAGE_TAG_BASE)-catalog:v$(VERSION) - -# Set CATALOG_BASE_IMG to an existing catalog image tag to add $BUNDLE_IMGS to that image. -ifneq ($(origin CATALOG_BASE_IMG), undefined) -FROM_INDEX_OPT := --from-index $(CATALOG_BASE_IMG) -endif - -# Build a catalog image by adding bundle images to an empty catalog using the operator package manager tool, 'opm'. -# This recipe invokes 'opm' in 'semver' bundle add mode. For more information on add modes, see: -# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator -.PHONY: catalog-build -catalog-build: opm ## Build a catalog image. - $(OPM) index add --container-tool $(CONTAINER_TOOL) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) - -# Push the catalog image. -.PHONY: catalog-push -catalog-push: ## Push a catalog image. - $(MAKE) docker-push IMG=$(CATALOG_IMG) +.PHONY: bundle-release +bundle-release: ## Prepare the bundle manifests and create the bundle using the image digest. + ./scripts/update-ngf-img-version.sh + $(MAKE) bundle USE_IMAGE_DIGESTS=true diff --git a/operators/PROJECT b/operators/PROJECT index 601d7f292a..e960620c21 100644 --- a/operators/PROJECT +++ b/operators/PROJECT @@ -8,7 +8,7 @@ layout: plugins: manifests.sdk.operatorframework.io/v2: {} scorecard.sdk.operatorframework.io/v2: {} -projectName: operators +projectName: nginx-gateway-fabric resources: - api: crdVersion: v1 diff --git a/operators/README.md b/operators/README.md new file mode 100644 index 0000000000..eac63d8a62 --- /dev/null +++ b/operators/README.md @@ -0,0 +1,135 @@ +# NGINX Gateway Fabric Operator + +A Helm-based Kubernetes operator for deploying and managing [NGINX Gateway Fabric](https://github.com/nginx/nginx-gateway-fabric), an implementation of the Gateway API using NGINX as the data plane. + +## Overview + +The NGINX Gateway Fabric Operator simplifies the deployment and lifecycle management of NGINX Gateway Fabric in Kubernetes and OpenShift environments. It leverages the official NGINX Gateway Fabric Helm charts to provide a declarative way to install, configure, and manage Gateway API implementations. + +## Features + +- **Declarative Configuration**: Manage NGINX Gateway Fabric through Kubernetes custom resources +- **Helm Chart Integration**: Uses official NGINX Gateway Fabric Helm charts for reliable deployments +- **OpenShift Compatible**: Certified for Red Hat OpenShift with proper SecurityContextConstraints +- **Full Feature Support**: Supports all NGINX Gateway Fabric configuration options including: + - NGINX Plus integration + - Experimental Gateway API features + - Multiple deployment modes (Deployment/DaemonSet) + +## Prerequisites + +- Kubernetes 1.25+ or OpenShift 4.19+ +- Operator Lifecycle Manager (OLM) installed +- Gateway API CRDs installed + +## Installation + +### OpenShift OperatorHub + +1. Navigate to OperatorHub in your OpenShift console +2. Search for "NGINX Gateway Fabric Operator" +3. Install the operator + +## Usage + +### Basic Installation + +Create a `NginxGatewayFabric` custom resource to deploy NGINX Gateway Fabric: + +```yaml +apiVersion: gateway.nginx.org/v1alpha1 +kind: NginxGatewayFabric +metadata: + name: nginx-gateway-fabric +spec: + nginxGateway: + replicas: 2 + gatewayClassName: nginx + nginx: + service: + type: LoadBalancer +``` + +See [the example here](config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml). + +## Configuration Reference + +The `NginxGatewayFabric` custom resource accepts the same configuration options as the NGINX Gateway Fabric Helm chart. + +For complete configuration options, see the [Helm Chart Documentation](https://github.com/nginx/nginx-gateway-fabric/tree/main/charts/nginx-gateway-fabric/README.md#configuration). + +## Development + +### Building and Testing the Operator Locally + +```bash +# Build the operator image +make docker-build IMG=/nginx-gateway-fabric-operator: + +# Push the image +make docker-push IMG=/nginx-gateway-fabric-operator: + +# Optionally load the image if running on kind +make docker-load IMG=/nginx-gateway-fabric-operator: + +# Generate and push bundle (must be publicly accessible remote registry, e.g. quay.io) +make bundle-build bundle-push IMG=/nginx-gateway-fabric-operator: BUNDLE_IMG=/nginx-gateway-fabric-operator-bundle: + +# Install olm on local cluster if required (e.g. if running on kind) +operator-sdk olm install + +# Run your bundle image +operator-sdk run bundle /nginx-gateway-fabric-operator-bundle: + +# Deploy NGF operand (modify the manifest if required) +kubectl apply -f config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml + +# Deploy test application +kubectl apply -f ../examples/cafe-example/ + +# Run operator-sdk scorecard - optional +make bundle +operator-sdk scorecard bundle/ +``` + +### Releases + +Once NGF has released, we can prepare the Operator release using the published NGF images. + +The Operator image is built using the Helm Chart from the root directory, so those changes are kept in sync by running `make docker-build` from the release branch (to be automated). The Operator image can be published and certified at the same time as the UBI based NGF control plane and OSS data plane images (instructions to follow, to be automated). + +Once the images are certified and published, we can create the bundle for certification. This is mostly a scripted (note: to be automated) process. +However, there are a few items that need to be kept in sync manually: + +1. RBAC: + The Operator requires RBAC rules to include permissions for anything the NGF Helm chart + can deploy (e.g. Pods, ConfigMaps, Gateways, HPAs, etc), and all permissions that NGF + itself has permissions for (e.g. all the Gateway APIs etc). + + If the RBAC permissions either for or of the underlying Helm Chart changes, these need to be updated in [RBAC manifest](config/rbac/role.yaml). + + The next time `make bundle` is ran, these RBAC changes will be reflected in the resulting bundle manifests. + +2. Sample manifest: + The [example manifest](config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml) may need to be updated either to add new important fields, or to change existing entries. + +3. Operator version: + Update the VERSION in the Makefile to reflect the version of the Operator being released. + +When you are ready to release the bundle, run `make release-bundle`. This will update the NGF image version tags, and create the bundle manifests. + +To test the bundle locally, follow the `Building and Testing the Operator Locally` above. + +To submit the bundle for certification, follow TBD. + +## License + +This project is licensed under the Apache License 2.0. See [LICENSE](../LICENSE) for details. + +## Support + +- Documentation: [NGINX Gateway Fabric Docs](https://docs.nginx.com/nginx-gateway-fabric/) +- Issues: [GitHub Issues](https://github.com/nginx/nginx-gateway-fabric/issues) +- Community: [NGINX Community Forum](https://community.nginx.org/c/nginx-gateway-fabric) + +For commercial support, contact [F5 NGINX](https://www.f5.com/products/nginx). diff --git a/operators/bundle.Dockerfile b/operators/bundle.Dockerfile new file mode 100644 index 0000000000..59fbd69cd6 --- /dev/null +++ b/operators/bundle.Dockerfile @@ -0,0 +1,21 @@ +FROM scratch + +# Core bundle labels. +LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 +LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ +LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ +LABEL operators.operatorframework.io.bundle.package.v1=nginx-gateway-fabric +LABEL operators.operatorframework.io.bundle.channels.v1=stable +LABEL operators.operatorframework.io.bundle.channel.default.v1=stable +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.41.1 +LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 +LABEL operators.operatorframework.io.metrics.project_layout=helm.sdk.operatorframework.io/v1 + +# Labels for testing. +LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 +LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ + +# Copy files to locations specified by labels. +COPY bundle/manifests /manifests/ +COPY bundle/metadata /metadata/ +COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/operators/bundle/manifests/gateway.nginx.org_nginxgatewayfabrics.yaml b/operators/bundle/manifests/gateway.nginx.org_nginxgatewayfabrics.yaml new file mode 100644 index 0000000000..d031194f22 --- /dev/null +++ b/operators/bundle/manifests/gateway.nginx.org_nginxgatewayfabrics.yaml @@ -0,0 +1,104 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: nginxgatewayfabrics.gateway.nginx.org +spec: + group: gateway.nginx.org + names: + kind: NginxGatewayFabric + listKind: NginxGatewayFabricList + plural: nginxgatewayfabrics + singular: nginxgatewayfabric + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: NginxGatewayFabric is the Schema for the nginxgatewayfabrics + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec defines the desired state of NginxGatewayFabric and + contains Helm values for the NGF chart + properties: + certGenerator: + description: Certificate generator configuration + type: object + x-kubernetes-preserve-unknown-fields: true + clusterDomain: + description: The DNS cluster domain of your Kubernetes cluster + type: string + gateways: + description: List of Gateway objects to create + items: + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + nginx: + description: Configuration for NGINX data plane deployments + type: object + x-kubernetes-preserve-unknown-fields: true + nginxGateway: + description: Configuration for the NGINX Gateway Fabric control plane + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + x-kubernetes-preserve-unknown-fields: true + status: + description: Status defines the observed state of NginxGatewayFabric + properties: + conditions: + description: Conditions represent the latest available observations + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + type: string + type: object + type: array + phase: + description: Phase represents the current phase + enum: + - Pending + - Installing + - Ready + - Failed + type: string + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: null + storedVersions: null diff --git a/operators/bundle/manifests/nginx-gateway-fabric-controller-manager-metrics-service_v1_service.yaml b/operators/bundle/manifests/nginx-gateway-fabric-controller-manager-metrics-service_v1_service.yaml new file mode 100644 index 0000000000..814eaf57d6 --- /dev/null +++ b/operators/bundle/manifests/nginx-gateway-fabric-controller-manager-metrics-service_v1_service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: nginx-gateway-fabric + control-plane: controller-manager + name: nginx-gateway-fabric-controller-manager-metrics-service +spec: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: 8443 + selector: + app.kubernetes.io/name: nginx-gateway-fabric + control-plane: controller-manager +status: + loadBalancer: {} diff --git a/operators/bundle/manifests/nginx-gateway-fabric-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/operators/bundle/manifests/nginx-gateway-fabric-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml new file mode 100644 index 0000000000..a2e49c36ab --- /dev/null +++ b/operators/bundle/manifests/nginx-gateway-fabric-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -0,0 +1,10 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: nginx-gateway-fabric-metrics-reader +rules: +- nonResourceURLs: + - /metrics + verbs: + - get diff --git a/operators/bundle/manifests/nginx-gateway-fabric.clusterserviceversion.yaml b/operators/bundle/manifests/nginx-gateway-fabric.clusterserviceversion.yaml new file mode 100644 index 0000000000..d953348c65 --- /dev/null +++ b/operators/bundle/manifests/nginx-gateway-fabric.clusterserviceversion.yaml @@ -0,0 +1,528 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "gateway.nginx.org/v1alpha1", + "kind": "NginxGatewayFabric", + "metadata": { + "name": "nginxgatewayfabric-sample" + }, + "spec": { + "certGenerator": { + "affinity": {}, + "agentTLSSecretName": "agent-tls", + "annotations": {}, + "nodeSelector": {}, + "overwrite": false, + "serverTLSSecretName": "server-tls", + "tolerations": [], + "topologySpreadConstraints": [], + "ttlSecondsAfterFinished": 30 + }, + "clusterDomain": "cluster.local", + "gateways": [], + "nginx": { + "autoscaling": { + "enable": false + }, + "config": {}, + "container": { + "hostPorts": [], + "lifecycle": {}, + "readinessProbe": {}, + "resources": {}, + "volumeMounts": [] + }, + "debug": false, + "image": { + "pullPolicy": "IfNotPresent", + "repository": "ghcr.io/nginx/nginx-gateway-fabric/nginx", + "tag": "2.2.0-ubi" + }, + "imagePullSecret": "", + "imagePullSecrets": [], + "kind": "deployment", + "nginxOneConsole": { + "dataplaneKeySecretName": "", + "endpointHost": "agent.connect.nginx.com", + "endpointPort": 443, + "skipVerify": false + }, + "patches": [], + "plus": false, + "pod": {}, + "replicas": 1, + "service": { + "externalTrafficPolicy": "Local", + "loadBalancerClass": "", + "loadBalancerIP": "", + "loadBalancerSourceRanges": [], + "nodePorts": [], + "patches": [], + "type": "LoadBalancer" + }, + "usage": { + "caSecretName": "", + "clientSSLSecretName": "", + "endpoint": "", + "enforceInitialReport": true, + "resolver": "", + "secretName": "nplus-license", + "skipVerify": false + } + }, + "nginxGateway": { + "affinity": {}, + "autoscaling": { + "enable": false + }, + "config": { + "logging": { + "level": "info" + } + }, + "configAnnotations": {}, + "extraVolumeMounts": [], + "extraVolumes": [], + "gatewayClassAnnotations": {}, + "gatewayClassName": "nginx", + "gatewayControllerName": "gateway.nginx.org/nginx-gateway-controller", + "gwAPIExperimentalFeatures": { + "enable": false + }, + "image": { + "pullPolicy": "IfNotPresent", + "repository": "ghcr.io/nginx/nginx-gateway-fabric", + "tag": "2.2.0-ubi" + }, + "kind": "deployment", + "labels": {}, + "leaderElection": { + "enable": true, + "lockName": "" + }, + "lifecycle": {}, + "metrics": { + "enable": true, + "port": 9113, + "secure": false + }, + "name": "", + "nodeSelector": {}, + "podAnnotations": {}, + "productTelemetry": { + "enable": true + }, + "readinessProbe": { + "enable": true, + "initialDelaySeconds": 3, + "port": 8081 + }, + "replicas": 1, + "resources": {}, + "service": { + "annotations": {}, + "labels": {} + }, + "serviceAccount": { + "annotations": {}, + "imagePullSecret": "", + "imagePullSecrets": [], + "name": "" + }, + "snippetsFilters": { + "enable": false + }, + "terminationGracePeriodSeconds": 30, + "tolerations": [], + "topologySpreadConstraints": [] + } + } + } + ] + capabilities: Basic Install + createdAt: "2025-09-25T13:06:47Z" + operators.operatorframework.io/builder: operator-sdk-v1.41.1 + operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1 + name: nginx-gateway-fabric.v1.0.0 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - kind: NginxGatewayFabric + name: nginxgatewayfabrics.gateway.nginx.org + version: v1alpha1 + resources: + - kind: Deployment + name: "" + version: v1 + - kind: Service + name: "" + version: v1 + - kind: ConfigMap + name: "" + version: v1 + - kind: Secret + name: "" + version: v1 + - kind: ServiceAccount + name: "" + version: v1 + - kind: ClusterRole + name: "" + version: v1 + - kind: ClusterRoleBinding + name: "" + version: v1 + specDescriptors: + - path: clusterDomain + displayName: Cluster Domain + description: The DNS cluster domain of your Kubernetes cluster + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:text + - path: nginxGateway + displayName: NGINX Gateway Configuration + description: Configuration for the NGINX Gateway Fabric control plane + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:fieldGroup:NGINX Gateway + - path: nginx + displayName: NGINX Configuration + description: Configuration for NGINX data plane deployments + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:fieldGroup:NGINX + - path: gateways + displayName: Gateways + description: List of Gateway objects to create + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:fieldGroup:Gateways + - path: certGenerator + displayName: Certificate Generator + description: Configuration for TLS certificate generation + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:fieldGroup:Certificate Generator + description: NGINX Gateway Fabric provides an implementation of the Gateway API using NGINX as the data plane + displayName: NGINX Gateway Fabric + icon: + - base64data: "" + mediatype: "" + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - "" + resources: + - namespaces + - nodes + - pods + - services + - services/finalizers + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + - serviceaccounts + verbs: + - '*' + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + - roles + - rolebindings + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - gateway.networking.k8s.io + resources: + - gatewayclasses + - gateways + - httproutes + - referencegrants + - grpcroutes + - backendtlspolicies + - tlsroutes + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - gateway.networking.k8s.io + resources: + - httproutes/status + - gateways/status + - gatewayclasses/status + - grpcroutes/status + - backendtlspolicies/status + - tlsroutes/status + verbs: + - update + - apiGroups: + - gateway.nginx.org + resources: + - nginxgatewayfabrics + - nginxgatewayfabrics/status + - nginxgatewayfabrics/finalizers + - nginxgateways + - nginxgateways/status + - nginxgateways/finalizers + - nginxproxies + - nginxproxies/status + - nginxproxies/finalizers + - clientsettingspolicies + - observabilitypolicies + - upstreamsettingspolicies + - snippetsfilters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - gateway.nginx.org + resources: + - clientsettingspolicies/status + - observabilitypolicies/status + - upstreamsettingspolicies/status + - snippetsfilters/status + verbs: + - update + - apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - list + - watch + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - update + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - create + - delete + - get + - list + - patch + - update + - use + - watch + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create + serviceAccountName: nginx-gateway-fabric-controller-manager + deployments: + - label: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: nginx-gateway-fabric + control-plane: controller-manager + name: nginx-gateway-fabric-controller-manager + spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: nginx-gateway-fabric + control-plane: controller-manager + strategy: {} + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + app.kubernetes.io/name: nginx-gateway-fabric + control-plane: controller-manager + spec: + containers: + - args: + - --metrics-require-rbac + - --metrics-secure + - --metrics-bind-address=:8443 + - --leader-elect + - --leader-election-id=nginx-gateway-fabric + - --health-probe-bind-address=:8081 + image: nginx-gateway-fabric-operator:v1.0.0 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 50m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + securityContext: + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: nginx-gateway-fabric-controller-manager + terminationGracePeriodSeconds: 10 + permissions: + - rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + serviceAccountName: nginx-gateway-fabric-controller-manager + strategy: deployment + installModes: + - supported: false + type: OwnNamespace + - supported: false + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - nginx + - gateway + - kubernetes + - networking + links: + - name: Nginx Gateway Fabric + url: https://nginx-gateway-fabric.domain + maintainers: + - email: kubernetes@nginx.com + name: F5NGINX + maturity: alpha + minKubeVersion: 1.25.0 + provider: + name: F5 NGINX + url: https://www.f5.com/go/product/welcome-to-nginx + version: 1.0.0 diff --git a/operators/bundle/metadata/annotations.yaml b/operators/bundle/metadata/annotations.yaml new file mode 100644 index 0000000000..b9684eacb3 --- /dev/null +++ b/operators/bundle/metadata/annotations.yaml @@ -0,0 +1,15 @@ +annotations: + # Core bundle annotations. + operators.operatorframework.io.bundle.mediatype.v1: registry+v1 + operators.operatorframework.io.bundle.manifests.v1: manifests/ + operators.operatorframework.io.bundle.metadata.v1: metadata/ + operators.operatorframework.io.bundle.package.v1: nginx-gateway-fabric + operators.operatorframework.io.bundle.channels.v1: stable + operators.operatorframework.io.bundle.channel.default.v1: stable + operators.operatorframework.io.metrics.builder: operator-sdk-v1.41.1 + operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 + operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1 + + # Annotations for testing. + operators.operatorframework.io.test.mediatype.v1: scorecard+v1 + operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/operators/bundle/tests/scorecard/config.yaml b/operators/bundle/tests/scorecard/config.yaml new file mode 100644 index 0000000000..6ffe8227fa --- /dev/null +++ b/operators/bundle/tests/scorecard/config.yaml @@ -0,0 +1,70 @@ +apiVersion: scorecard.operatorframework.io/v1alpha3 +kind: Configuration +metadata: + name: config +stages: +- parallel: true + tests: + - entrypoint: + - scorecard-test + - basic-check-spec + image: quay.io/operator-framework/scorecard-test:v1.41.1 + labels: + suite: basic + test: basic-check-spec-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-bundle-validation + image: quay.io/operator-framework/scorecard-test:v1.41.1 + labels: + suite: olm + test: olm-bundle-validation-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-crds-have-validation + image: quay.io/operator-framework/scorecard-test:v1.41.1 + labels: + suite: olm + test: olm-crds-have-validation-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-crds-have-resources + image: quay.io/operator-framework/scorecard-test:v1.41.1 + labels: + suite: olm + test: olm-crds-have-resources-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-spec-descriptors + image: quay.io/operator-framework/scorecard-test:v1.41.1 + labels: + suite: olm + test: olm-spec-descriptors-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-status-descriptors + image: quay.io/operator-framework/scorecard-test:v1.41.1 + labels: + suite: olm + test: olm-status-descriptors-test + storage: + spec: + mountPath: {} +storage: + spec: + mountPath: {} diff --git a/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml b/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml index f10a3a16a9..4406876fda 100644 --- a/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml +++ b/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml @@ -13,32 +13,74 @@ spec: scope: Namespaced versions: - name: v1alpha1 + served: true + storage: true schema: openAPIV3Schema: + type: object description: NginxGatewayFabric is the Schema for the nginxgatewayfabrics API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: - description: Spec defines the desired state of NginxGatewayFabric + description: Spec defines the desired state of NginxGatewayFabric and contains Helm values for the NGF chart type: object x-kubernetes-preserve-unknown-fields: true + properties: + clusterDomain: + description: The DNS cluster domain of your Kubernetes cluster + type: string + nginxGateway: + description: Configuration for the NGINX Gateway Fabric control plane + type: object + x-kubernetes-preserve-unknown-fields: true + nginx: + description: Configuration for NGINX data plane deployments + type: object + x-kubernetes-preserve-unknown-fields: true + gateways: + description: List of Gateway objects to create + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + certGenerator: + description: Certificate generator configuration + type: object + x-kubernetes-preserve-unknown-fields: true status: description: Status defines the observed state of NginxGatewayFabric type: object x-kubernetes-preserve-unknown-fields: true - type: object - served: true - storage: true + properties: + conditions: + description: Conditions represent the latest available observations + type: array + items: + type: object + properties: + type: + type: string + status: + type: string + enum: ["True", "False", "Unknown"] + lastTransitionTime: + type: string + format: date-time + reason: + type: string + message: + type: string + phase: + description: Phase represents the current phase + type: string + enum: ["Pending", "Installing", "Ready", "Failed"] subresources: status: {} + \ No newline at end of file diff --git a/operators/config/default/kustomization.yaml b/operators/config/default/kustomization.yaml index 8a2680fcef..3b3732ee1d 100644 --- a/operators/config/default/kustomization.yaml +++ b/operators/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: operators-system +namespace: nginx-gateway-fabric-system # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: operators- +namePrefix: nginx-gateway-fabric- # Labels to add to all resources and selectors. #labels: @@ -35,5 +35,3 @@ patches: - path: manager_metrics_patch.yaml target: kind: Deployment - - diff --git a/operators/config/default/metrics_service.yaml b/operators/config/default/metrics_service.yaml index adfa37331a..d428e3ff32 100644 --- a/operators/config/default/metrics_service.yaml +++ b/operators/config/default/metrics_service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system @@ -15,4 +15,4 @@ spec: targetPort: 8443 selector: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric diff --git a/operators/config/manager/kustomization.yaml b/operators/config/manager/kustomization.yaml index 5c5f0b84cb..37bf8df3c3 100644 --- a/operators/config/manager/kustomization.yaml +++ b/operators/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: ghcr.io/nginx/nginx-gateway-fabric + newTag: v1.0.0 diff --git a/operators/config/manager/manager.yaml b/operators/config/manager/manager.yaml index 82b398e3f6..6b20b20a5e 100644 --- a/operators/config/manager/manager.yaml +++ b/operators/config/manager/manager.yaml @@ -3,7 +3,7 @@ kind: Namespace metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: system --- @@ -14,13 +14,13 @@ metadata: namespace: system labels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize spec: selector: matchLabels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric replicas: 1 template: metadata: @@ -28,28 +28,8 @@ spec: kubectl.kubernetes.io/default-container: manager labels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric spec: - # TODO(user): Uncomment the following code to configure the nodeAffinity expression - # according to the platforms which are supported by your solution. - # It is considered best practice to support multiple architectures. You can - # build your manager image using the makefile target docker-buildx. - # affinity: - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchExpressions: - # - key: kubernetes.io/arch - # operator: In - # values: - # - amd64 - # - arm64 - # - ppc64le - # - s390x - # - key: kubernetes.io/os - # operator: In - # values: - # - linux securityContext: # Projects are configured by default to adhere to the "restricted" Pod Security Standards. # This ensures that deployments meet the highest security requirements for Kubernetes. @@ -60,7 +40,7 @@ spec: containers: - args: - --leader-elect - - --leader-election-id=operators + - --leader-election-id=nginx-gateway-fabric - --health-probe-bind-address=:8081 image: controller:latest name: manager @@ -89,7 +69,7 @@ spec: cpu: 500m memory: 128Mi requests: - cpu: 10m + cpu: 50m memory: 64Mi volumeMounts: [] volumes: [] diff --git a/operators/config/manifests/bases/nginx-gateway-fabric.clusterserviceversion.yaml b/operators/config/manifests/bases/nginx-gateway-fabric.clusterserviceversion.yaml new file mode 100644 index 0000000000..278681ad81 --- /dev/null +++ b/operators/config/manifests/bases/nginx-gateway-fabric.clusterserviceversion.yaml @@ -0,0 +1,47 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[]' + capabilities: Basic Install + name: nginx-gateway-fabric.v0.0.0 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: {} + description: NGINX Gateway Fabric provides an implementation of the Gateway API + using NGINX as the data plane + displayName: NGINX Gateway Fabric + icon: + - base64data: "" + mediatype: "" + install: + spec: + deployments: null + strategy: "" + installModes: + - supported: false + type: OwnNamespace + - supported: false + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - nginx + - gateway + - kubernetes + - networking + links: + - name: Nginx Gateway Fabric + url: https://nginx-gateway-fabric.domain + maintainers: + - email: kubernetes@nginx.com + name: F5NGINX + maturity: alpha + minKubeVersion: 1.25.0 + provider: + name: F5 NGINX + url: https://www.f5.com/go/product/welcome-to-nginx + version: 0.0.0 diff --git a/operators/config/manifests/kustomization.yaml b/operators/config/manifests/kustomization.yaml index 76f297ed32..9107763129 100644 --- a/operators/config/manifests/kustomization.yaml +++ b/operators/config/manifests/kustomization.yaml @@ -1,7 +1,7 @@ # These resources constitute the fully configured set of manifests # used to generate the 'manifests/' directory in a bundle. resources: -- bases/operators.clusterserviceversion.yaml +- bases/nginx-gateway-fabric.clusterserviceversion.yaml - ../default - ../samples - ../scorecard diff --git a/operators/config/network-policy/allow-metrics-traffic.yaml b/operators/config/network-policy/allow-metrics-traffic.yaml index 81afc99a20..44e662426a 100644 --- a/operators/config/network-policy/allow-metrics-traffic.yaml +++ b/operators/config/network-policy/allow-metrics-traffic.yaml @@ -5,7 +5,7 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: labels: - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: allow-metrics-traffic namespace: system @@ -13,7 +13,7 @@ spec: podSelector: matchLabels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric policyTypes: - Ingress ingress: diff --git a/operators/config/prometheus/monitor.yaml b/operators/config/prometheus/monitor.yaml index 76d3246b46..318393fb35 100644 --- a/operators/config/prometheus/monitor.yaml +++ b/operators/config/prometheus/monitor.yaml @@ -4,7 +4,7 @@ kind: ServiceMonitor metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system @@ -24,4 +24,4 @@ spec: selector: matchLabels: control-plane: controller-manager - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric diff --git a/operators/config/rbac/kustomization.yaml b/operators/config/rbac/kustomization.yaml index 431902c300..5619aa0094 100644 --- a/operators/config/rbac/kustomization.yaml +++ b/operators/config/rbac/kustomization.yaml @@ -18,11 +18,3 @@ resources: - metrics_auth_role.yaml - metrics_auth_role_binding.yaml - metrics_reader_role.yaml -# For each CRD, "Admin", "Editor" and "Viewer" roles are scaffolded by -# default, aiding admins in cluster management. Those roles are -# not used by the operators itself. You can comment the following lines -# if you do not want those helpers be installed with your Project. -- nginxgatewayfabric_admin_role.yaml -- nginxgatewayfabric_editor_role.yaml -- nginxgatewayfabric_viewer_role.yaml - diff --git a/operators/config/rbac/leader_election_role.yaml b/operators/config/rbac/leader_election_role.yaml index 5e42ebaf97..f45d6da4c7 100644 --- a/operators/config/rbac/leader_election_role.yaml +++ b/operators/config/rbac/leader_election_role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: diff --git a/operators/config/rbac/leader_election_role_binding.yaml b/operators/config/rbac/leader_election_role_binding.yaml index 8014c86645..d4b412edae 100644 --- a/operators/config/rbac/leader_election_role_binding.yaml +++ b/operators/config/rbac/leader_election_role_binding.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: diff --git a/operators/config/rbac/nginxgatewayfabric_admin_role.yaml b/operators/config/rbac/nginxgatewayfabric_admin_role.yaml deleted file mode 100644 index 7d9dec42ef..0000000000 --- a/operators/config/rbac/nginxgatewayfabric_admin_role.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# This rule is not used by the project operators itself. -# It is provided to allow the cluster admin to help manage permissions for users. -# -# Grants full permissions ('*') over gateway.nginx.org. -# This role is intended for users authorized to modify roles and bindings within the cluster, -# enabling them to delegate specific permissions to other users or groups as needed. - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: operators - app.kubernetes.io/managed-by: kustomize - name: nginxgatewayfabric-admin-role -rules: -- apiGroups: - - gateway.nginx.org - resources: - - nginxgatewayfabrics - verbs: - - '*' -- apiGroups: - - gateway.nginx.org - resources: - - nginxgatewayfabrics/status - verbs: - - get diff --git a/operators/config/rbac/nginxgatewayfabric_editor_role.yaml b/operators/config/rbac/nginxgatewayfabric_editor_role.yaml deleted file mode 100644 index 7f04bfd665..0000000000 --- a/operators/config/rbac/nginxgatewayfabric_editor_role.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# This rule is not used by the project operators itself. -# It is provided to allow the cluster admin to help manage permissions for users. -# -# Grants permissions to create, update, and delete resources within the gateway.nginx.org. -# This role is intended for users who need to manage these resources -# but should not control RBAC or manage permissions for others. - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: operators - app.kubernetes.io/managed-by: kustomize - name: nginxgatewayfabric-editor-role -rules: -- apiGroups: - - gateway.nginx.org - resources: - - nginxgatewayfabrics - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - gateway.nginx.org - resources: - - nginxgatewayfabrics/status - verbs: - - get diff --git a/operators/config/rbac/nginxgatewayfabric_viewer_role.yaml b/operators/config/rbac/nginxgatewayfabric_viewer_role.yaml deleted file mode 100644 index b900d9b6ad..0000000000 --- a/operators/config/rbac/nginxgatewayfabric_viewer_role.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This rule is not used by the project operators itself. -# It is provided to allow the cluster admin to help manage permissions for users. -# -# Grants read-only access to gateway.nginx.org resources. -# This role is intended for users who need visibility into these resources -# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing. - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: operators - app.kubernetes.io/managed-by: kustomize - name: nginxgatewayfabric-viewer-role -rules: -- apiGroups: - - gateway.nginx.org - resources: - - nginxgatewayfabrics - verbs: - - get - - list - - watch -- apiGroups: - - gateway.nginx.org - resources: - - nginxgatewayfabrics/status - verbs: - - get diff --git a/operators/config/rbac/role.yaml b/operators/config/rbac/role.yaml index 62a6734b40..5dcd5a0937 100644 --- a/operators/config/rbac/role.yaml +++ b/operators/config/rbac/role.yaml @@ -3,40 +3,65 @@ kind: ClusterRole metadata: name: manager-role rules: -## -## Base operator rules -## -# We need to get namespaces so the operator can read namespaces to ensure they exist - apiGroups: - "" resources: - namespaces + - nodes + - pods + - services + - services/finalizers + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + - serviceaccounts verbs: + - "*" +- apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - create + - delete - get -# We need to manage Helm release secrets + - list + - patch + - update + - watch - apiGroups: - - "" + - autoscaling resources: - - secrets + - horizontalpodautoscalers verbs: - - "*" -# We need to create events on CRs about things happening during reconciliation + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - - "" + - batch resources: - - events + - jobs verbs: - create - -## -## Rules for gateway.nginx.org/v1alpha1, Kind: NginxGatewayFabric -## + - delete + - get + - list + - patch + - update + - watch - apiGroups: - - gateway.nginx.org + - apiextensions.k8s.io resources: - - nginxgatewayfabrics - - nginxgatewayfabrics/status - - nginxgatewayfabrics/finalizers + - customresourcedefinitions verbs: - create - delete @@ -46,16 +71,12 @@ rules: - update - watch - apiGroups: - - "" + - rbac.authorization.k8s.io resources: - - pods - - services - - services/finalizers - - endpoints - - persistentvolumeclaims - - events - - configmaps - - secrets + - clusterroles + - clusterrolebindings + - roles + - rolebindings verbs: - create - delete @@ -65,12 +86,92 @@ rules: - update - watch - apiGroups: - - apps + - gateway.networking.k8s.io resources: - - deployments - - daemonsets - - replicasets - - statefulsets + - gatewayclasses + - gateways + - httproutes + - referencegrants + - grpcroutes + - backendtlspolicies + - tlsroutes + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - gateway.networking.k8s.io + resources: + - httproutes/status + - gateways/status + - gatewayclasses/status + - grpcroutes/status + - backendtlspolicies/status + - tlsroutes/status + verbs: + - update +- apiGroups: + - gateway.nginx.org + resources: + - nginxgatewayfabrics + - nginxgatewayfabrics/status + - nginxgatewayfabrics/finalizers + - nginxgateways + - nginxgateways/status + - nginxgateways/finalizers + - nginxproxies + - nginxproxies/status + - nginxproxies/finalizers + - clientsettingspolicies + - observabilitypolicies + - upstreamsettingspolicies + - snippetsfilters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - gateway.nginx.org + resources: + - clientsettingspolicies/status + - observabilitypolicies/status + - upstreamsettingspolicies/status + - snippetsfilters/status + verbs: + - update +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - list + - watch +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - update +- apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints verbs: - create - delete @@ -78,6 +179,7 @@ rules: - list - patch - update + - use - watch # +kubebuilder:scaffold:rules diff --git a/operators/config/rbac/role_binding.yaml b/operators/config/rbac/role_binding.yaml index 66361d0555..e718c442fe 100644 --- a/operators/config/rbac/role_binding.yaml +++ b/operators/config/rbac/role_binding.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: diff --git a/operators/config/rbac/service_account.yaml b/operators/config/rbac/service_account.yaml index b24408f8ae..1e60df5111 100644 --- a/operators/config/rbac/service_account.yaml +++ b/operators/config/rbac/service_account.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app.kubernetes.io/name: operators + app.kubernetes.io/name: nginx-gateway-fabric app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/operators/config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml b/operators/config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml index 40afb80936..c52e22e49d 100644 --- a/operators/config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml +++ b/operators/config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml @@ -28,9 +28,9 @@ spec: volumeMounts: [] debug: false image: - pullPolicy: Always + pullPolicy: IfNotPresent repository: ghcr.io/nginx/nginx-gateway-fabric/nginx - tag: edge + tag: 2.2.0-ubi imagePullSecret: "" imagePullSecrets: [] kind: deployment @@ -75,9 +75,9 @@ spec: gwAPIExperimentalFeatures: enable: false image: - pullPolicy: Always + pullPolicy: IfNotPresent repository: ghcr.io/nginx/nginx-gateway-fabric - tag: edge + tag: 2.2.0-ubi kind: deployment labels: {} leaderElection: @@ -112,5 +112,3 @@ spec: terminationGracePeriodSeconds: 30 tolerations: [] topologySpreadConstraints: [] - - diff --git a/operators/helm-charts/nginx-gateway-fabric/.helmignore b/operators/helm-charts/nginx-gateway-fabric/.helmignore deleted file mode 100644 index 8612fd290e..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/.helmignore +++ /dev/null @@ -1,3 +0,0 @@ -# Patterns to ignore when building packages. -*.png -*.gotmpl diff --git a/operators/helm-charts/nginx-gateway-fabric/Chart.yaml b/operators/helm-charts/nginx-gateway-fabric/Chart.yaml deleted file mode 100644 index f560f03229..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v2 -appVersion: edge -description: NGINX Gateway Fabric -home: https://github.com/nginx/nginx-gateway-fabric -icon: https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/main/charts/nginx-gateway-fabric/chart-icon.png -keywords: -- kubernetes -- gateway -- nginx -kubeVersion: '>= 1.25.0-0' -maintainers: -- email: kubernetes@nginx.com - name: nginx/nginx-gateway-fabric -name: nginx-gateway-fabric -sources: -- https://github.com/nginx/nginx-gateway-fabric/tree/main/charts/nginx-gateway-fabric -type: application -version: 2.1.1 diff --git a/operators/helm-charts/nginx-gateway-fabric/README.md b/operators/helm-charts/nginx-gateway-fabric/README.md deleted file mode 100644 index eb7f3ce114..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/README.md +++ /dev/null @@ -1,293 +0,0 @@ - -# NGINX Gateway Fabric Helm Chart - -![Version: 2.1.1](https://img.shields.io/badge/Version-2.1.1-informational?style=flat-square) ![AppVersion: edge](https://img.shields.io/badge/AppVersion-edge-informational?style=flat-square) - -- [NGINX Gateway Fabric Helm Chart](#nginx-gateway-fabric-helm-chart) - - [Introduction](#introduction) - - [Prerequisites](#prerequisites) - - [Installing the Gateway API resources](#installing-the-gateway-api-resources) - - [Requirements](#requirements) - - [Installing the Chart](#installing-the-chart) - - [Installing the Chart from the OCI Registry](#installing-the-chart-from-the-oci-registry) - - [Installing the Chart via Sources](#installing-the-chart-via-sources) - - [Pulling the Chart](#pulling-the-chart) - - [Installing the Chart](#installing-the-chart-1) - - [Custom installation options](#custom-installation-options) - - [Service type](#service-type) - - [Upgrading the Chart](#upgrading-the-chart) - - [Upgrading the Gateway Resources](#upgrading-the-gateway-resources) - - [Upgrading the CRDs](#upgrading-the-crds) - - [Upgrading the Chart from the OCI Registry](#upgrading-the-chart-from-the-oci-registry) - - [Upgrading the Chart from the Sources](#upgrading-the-chart-from-the-sources) - - [Uninstalling the Chart](#uninstalling-the-chart) - - [Uninstalling the Gateway Resources](#uninstalling-the-gateway-resources) - - [Configuration](#configuration) - -## Introduction - -This chart deploys the NGINX Gateway Fabric in your Kubernetes cluster. - -## Prerequisites - -- [Helm 3.0+](https://helm.sh/docs/intro/install/) -- [kubectl](https://kubernetes.io/docs/tasks/tools/) - -### Installing the Gateway API resources - -> [!NOTE] -> -> The [Gateway API resources](https://github.com/kubernetes-sigs/gateway-api) from the standard channel must be -> installed before deploying NGINX Gateway Fabric. If they are already installed in your cluster, please ensure -> they are the correct version as supported by the NGINX Gateway Fabric - -> [see the Technical Specifications](https://github.com/nginx/nginx-gateway-fabric/blob/main/README.md#technical-specifications). - -```shell -kubectl kustomize https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard | kubectl apply -f - -``` - -## Requirements - -Kubernetes: `>= 1.25.0-0` - -## Installing the Chart - -### Installing the Chart from the OCI Registry - -To install the latest stable release of NGINX Gateway Fabric in the `nginx-gateway` namespace, run the following command: - -```shell -helm install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway -``` - -`ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name. - -If the namespace already exists, you can omit the optional `--create-namespace` flag. If you want the latest version from the `main` branch, add `--version 0.0.0-edge` to your install command. - -To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run -the following after installing: - -```shell -kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available -``` - -### Installing the Chart via Sources - -#### Pulling the Chart - -```shell -helm pull oci://ghcr.io/nginx/charts/nginx-gateway-fabric --untar -cd nginx-gateway-fabric -``` - -This will pull the latest stable release. To pull the latest version from the `main` branch, specify the -`--version 0.0.0-edge` flag when pulling. - -#### Installing the Chart - -To install the chart into the `nginx-gateway` namespace, run the following command. - -```shell -helm install ngf . --create-namespace -n nginx-gateway -``` - -`ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name. - -If the namespace already exists, you can omit the optional `--create-namespace` flag. - -To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run -the following after installing: - -```shell -kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available -``` - -### Custom installation options - -#### Service type - -By default, the NGINX Gateway Fabric helm chart deploys a LoadBalancer Service. - -To use a NodePort Service instead: - -```shell -helm install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway --set nginx.service.type=NodePort -``` - -## Upgrading the Chart - -### Upgrading the Gateway Resources - -Before you upgrade a release, ensure the Gateway API resources are the correct version as supported by the NGINX -Gateway Fabric - [see the Technical Specifications](https://github.com/nginx/nginx-gateway-fabric/blob/main/README.md#technical-specifications).: - -To upgrade the Gateway CRDs from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run: - -```shell -kubectl kustomize https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard | kubectl apply -f - -``` - -### Upgrading the CRDs - -Helm does not upgrade the NGINX Gateway Fabric CRDs during a release upgrade. Before you upgrade a release, you -must [pull the chart](#pulling-the-chart) from GitHub and run the following command to upgrade the CRDs: - -```shell -kubectl apply --server-side -f crds/ -``` - -The following warning is expected and can be ignored: - -```text -Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply. -``` - -### Upgrading the Chart from the OCI Registry - -To upgrade the release `ngf`, run: - -```shell -helm upgrade ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric -n nginx-gateway -``` - -This will upgrade to the latest stable release. To upgrade to the latest version from the `main` branch, specify -the `--version 0.0.0-edge` flag when upgrading. - -### Upgrading the Chart from the Sources - -Pull the chart sources as described in [Pulling the Chart](#pulling-the-chart), if not already present. Then, to upgrade -the release `ngf`, run: - -```shell -helm upgrade ngf . -n nginx-gateway -``` - -## Uninstalling the Chart - -To uninstall/delete the release `ngf`: - -```shell -helm uninstall ngf -n nginx-gateway -kubectl delete ns nginx-gateway -kubectl delete -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/main/deploy/crds.yaml -``` - -These commands remove all the Kubernetes components associated with the release and deletes the release. - -### Uninstalling the Gateway Resources - -> **Warning: This command will delete all the corresponding custom resources in your cluster across all namespaces! -> Please ensure there are no custom resources that you want to keep and there are no other Gateway API implementations -> running in the cluster!** - -To delete the Gateway API CRDs from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run: - -```shell -kubectl kustomize https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard | kubectl delete -f - -``` - -## Configuration - -The following table lists the configurable parameters of the NGINX Gateway Fabric chart and their default values. - -> More granular configuration options may not show up in this table. -> Viewing the `values.yaml` file directly can show all available options. - -| Key | Description | Type | Default | -|-----|-------------|------|---------| -| `certGenerator` | The certGenerator section contains the configuration for the cert-generator Job. | object | `{"affinity":{},"agentTLSSecretName":"agent-tls","annotations":{},"nodeSelector":{},"overwrite":false,"serverTLSSecretName":"server-tls","tolerations":[],"topologySpreadConstraints":[],"ttlSecondsAfterFinished":30}` | -| `certGenerator.affinity` | The affinity of the cert-generator pod. | object | `{}` | -| `certGenerator.agentTLSSecretName` | The name of the base Secret containing TLS CA, certificate, and key for the NGINX Agent to securely communicate with the NGINX Gateway Fabric control plane. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"agent-tls"` | -| `certGenerator.annotations` | The annotations of the cert-generator Job. | object | `{}` | -| `certGenerator.nodeSelector` | The nodeSelector of the cert-generator pod. | object | `{}` | -| `certGenerator.overwrite` | Overwrite existing TLS Secrets on startup. | bool | `false` | -| `certGenerator.serverTLSSecretName` | The name of the Secret containing TLS CA, certificate, and key for the NGINX Gateway Fabric control plane to securely communicate with the NGINX Agent. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"server-tls"` | -| `certGenerator.tolerations` | Tolerations for the cert-generator pod. | list | `[]` | -| `certGenerator.topologySpreadConstraints` | The topology spread constraints for the cert-generator pod. | list | `[]` | -| `certGenerator.ttlSecondsAfterFinished` | How long to wait after the cert generator job has finished before it is removed by the job controller. | int | `30` | -| `clusterDomain` | The DNS cluster domain of your Kubernetes cluster. | string | `"cluster.local"` | -| `gateways` | A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference. | list | `[]` | -| `nginx` | The nginx section contains the configuration for all NGINX data plane deployments installed by the NGINX Gateway Fabric control plane. | object | `{"autoscaling":{"enable":false},"config":{},"container":{"hostPorts":[],"lifecycle":{},"readinessProbe":{},"resources":{},"volumeMounts":[]},"debug":false,"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric/nginx","tag":"edge"},"imagePullSecret":"","imagePullSecrets":[],"kind":"deployment","nginxOneConsole":{"dataplaneKeySecretName":"","endpointHost":"agent.connect.nginx.com","endpointPort":443,"skipVerify":false},"patches":[],"plus":false,"pod":{},"replicas":1,"service":{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"patches":[],"type":"LoadBalancer"},"usage":{"caSecretName":"","clientSSLSecretName":"","endpoint":"","enforceInitialReport":true,"resolver":"","secretName":"nplus-license","skipVerify":false}}` | -| `nginx.autoscaling` | Autoscaling configuration for the NGINX data plane. | object | `{"enable":false}` | -| `nginx.autoscaling.enable` | Enable or disable Horizontal Pod Autoscaler for the NGINX data plane. | bool | `false` | -| `nginx.config` | The configuration for the data plane that is contained in the NginxProxy resource. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{}` | -| `nginx.container` | The container configuration for the NGINX container. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{"hostPorts":[],"lifecycle":{},"readinessProbe":{},"resources":{},"volumeMounts":[]}` | -| `nginx.container.hostPorts` | A list of HostPorts to expose on the host. This configuration allows containers to bind to a specific port on the host node, enabling external network traffic to reach the container directly through the host's IP address and port. Use this option when you need to expose container ports on the host for direct access, such as for debugging, legacy integrations, or when NodePort/LoadBalancer services are not suitable. Note: Using hostPort may have security and scheduling implications, as it ties pods to specific nodes and ports. | list | `[]` | -| `nginx.container.lifecycle` | The lifecycle of the NGINX container. | object | `{}` | -| `nginx.container.resources` | The resource requirements of the NGINX container. You should set this value if you want to use dataplane Autoscaling(HPA). | object | `{}` | -| `nginx.container.volumeMounts` | volumeMounts are the additional volume mounts for the NGINX container. | list | `[]` | -| `nginx.debug` | Enable debugging for NGINX. Uses the nginx-debug binary. The NGINX error log level should be set to debug in the NginxProxy resource. | bool | `false` | -| `nginx.image.repository` | The NGINX image to use. | string | `"ghcr.io/nginx/nginx-gateway-fabric/nginx"` | -| `nginx.imagePullSecret` | The name of the secret containing docker registry credentials. Secret must exist in the same namespace as the helm release. The control plane will copy this secret into any namespace where NGINX is deployed. | string | `""` | -| `nginx.imagePullSecrets` | A list of secret names containing docker registry credentials. Secrets must exist in the same namespace as the helm release. The control plane will copy these secrets into any namespace where NGINX is deployed. | list | `[]` | -| `nginx.kind` | The kind of NGINX deployment. | string | `"deployment"` | -| `nginx.nginxOneConsole` | Configuration for NGINX One Console. | object | `{"dataplaneKeySecretName":"","endpointHost":"agent.connect.nginx.com","endpointPort":443,"skipVerify":false}` | -| `nginx.nginxOneConsole.dataplaneKeySecretName` | Name of the secret which holds the dataplane key that is required to authenticate with the NGINX One Console. Secret must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `""` | -| `nginx.nginxOneConsole.endpointHost` | The Endpoint host that the NGINX One Console telemetry metrics will be sent to. | string | `"agent.connect.nginx.com"` | -| `nginx.nginxOneConsole.endpointPort` | The endpoint port that the NGINX One Console telemetry metrics will be sent to. | int | `443` | -| `nginx.nginxOneConsole.skipVerify` | Skip TLS verification for NGINX One Console connections. | bool | `false` | -| `nginx.patches` | Custom patches to apply to the NGINX Deployment/DaemonSet. | list | `[]` | -| `nginx.plus` | Is NGINX Plus image being used. | bool | `false` | -| `nginx.pod` | The pod configuration for the NGINX data plane pod. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{}` | -| `nginx.replicas` | The number of replicas of the NGINX Deployment. This value is ignored if autoscaling.enable is true. | int | `1` | -| `nginx.service` | The service configuration for the NGINX data plane. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"patches":[],"type":"LoadBalancer"}` | -| `nginx.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | string | `"Local"` | -| `nginx.service.loadBalancerClass` | LoadBalancerClass is the class of the load balancer implementation this Service belongs to. Requires nginx.service.type set to LoadBalancer. | string | `""` | -| `nginx.service.loadBalancerIP` | The static IP address for the load balancer. Requires nginx.service.type set to LoadBalancer. | string | `""` | -| `nginx.service.loadBalancerSourceRanges` | The IP ranges (CIDR) that are allowed to access the load balancer. Requires nginx.service.type set to LoadBalancer. | list | `[]` | -| `nginx.service.nodePorts` | A list of NodePorts to expose on the NGINX data plane service. Each NodePort MUST map to a Gateway listener port, otherwise it will be ignored. The default NodePort range enforced by Kubernetes is 30000-32767. | list | `[]` | -| `nginx.service.patches` | Custom patches to apply to the NGINX Service. | list | `[]` | -| `nginx.service.type` | The type of service to create for the NGINX data plane. | string | `"LoadBalancer"` | -| `nginx.usage.caSecretName` | The name of the Secret containing the NGINX Instance Manager CA certificate. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `""` | -| `nginx.usage.clientSSLSecretName` | The name of the Secret containing the client certificate and key for authenticating with NGINX Instance Manager. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `""` | -| `nginx.usage.endpoint` | The endpoint of the NGINX Plus usage reporting server. Default: product.connect.nginx.com | string | `""` | -| `nginx.usage.enforceInitialReport` | Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced. | bool | `true` | -| `nginx.usage.resolver` | The nameserver used to resolve the NGINX Plus usage reporting endpoint. Used with NGINX Instance Manager. | string | `""` | -| `nginx.usage.secretName` | The name of the Secret containing the JWT for NGINX Plus usage reporting. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"nplus-license"` | -| `nginx.usage.skipVerify` | Disable client verification of the NGINX Plus usage reporting server certificate. | bool | `false` | -| `nginxGateway` | The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment. | object | `{"affinity":{},"autoscaling":{"enable":false},"config":{"logging":{"level":"info"}},"configAnnotations":{},"extraVolumeMounts":[],"extraVolumes":[],"gatewayClassAnnotations":{},"gatewayClassName":"nginx","gatewayControllerName":"gateway.nginx.org/nginx-gateway-controller","gwAPIExperimentalFeatures":{"enable":false},"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric","tag":"edge"},"kind":"deployment","labels":{},"leaderElection":{"enable":true,"lockName":""},"lifecycle":{},"metrics":{"enable":true,"port":9113,"secure":false},"name":"","nodeSelector":{},"podAnnotations":{},"productTelemetry":{"enable":true},"readinessProbe":{"enable":true,"initialDelaySeconds":3,"port":8081},"replicas":1,"resources":{},"service":{"annotations":{},"labels":{}},"serviceAccount":{"annotations":{},"imagePullSecret":"","imagePullSecrets":[],"name":""},"snippetsFilters":{"enable":false},"terminationGracePeriodSeconds":30,"tolerations":[],"topologySpreadConstraints":[]}` | -| `nginxGateway.affinity` | The affinity of the NGINX Gateway Fabric control plane pod. | object | `{}` | -| `nginxGateway.autoscaling` | Autoscaling configuration for the NGINX Gateway Fabric control plane. | object | `{"enable":false}` | -| `nginxGateway.autoscaling.enable` | Enable or disable Horizontal Pod Autoscaler for the control plane. | bool | `false` | -| `nginxGateway.config.logging.level` | Log level. | string | `"info"` | -| `nginxGateway.configAnnotations` | Set of custom annotations for NginxGateway objects. | object | `{}` | -| `nginxGateway.extraVolumeMounts` | extraVolumeMounts are the additional volume mounts for the nginx-gateway container. | list | `[]` | -| `nginxGateway.extraVolumes` | extraVolumes for the NGINX Gateway Fabric control plane pod. Use in conjunction with nginxGateway.extraVolumeMounts mount additional volumes to the container. | list | `[]` | -| `nginxGateway.gatewayClassAnnotations` | Set of custom annotations for GatewayClass objects. | object | `{}` | -| `nginxGateway.gatewayClassName` | The name of the GatewayClass that will be created as part of this release. Every NGINX Gateway Fabric must have a unique corresponding GatewayClass resource. NGINX Gateway Fabric only processes resources that belong to its class - i.e. have the "gatewayClassName" field resource equal to the class. | string | `"nginx"` | -| `nginxGateway.gatewayControllerName` | The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain is gateway.nginx.org. | string | `"gateway.nginx.org/nginx-gateway-controller"` | -| `nginxGateway.gwAPIExperimentalFeatures.enable` | Enable the experimental features of Gateway API which are supported by NGINX Gateway Fabric. Requires the Gateway APIs installed from the experimental channel. | bool | `false` | -| `nginxGateway.image` | The image configuration for the NGINX Gateway Fabric control plane. | object | `{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric","tag":"edge"}` | -| `nginxGateway.image.repository` | The NGINX Gateway Fabric image to use | string | `"ghcr.io/nginx/nginx-gateway-fabric"` | -| `nginxGateway.kind` | The kind of the NGINX Gateway Fabric installation - currently, only deployment is supported. | string | `"deployment"` | -| `nginxGateway.labels` | Set of labels to be added for NGINX Gateway Fabric deployment. | object | `{}` | -| `nginxGateway.leaderElection.enable` | Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric reporting the status of the Gateway API resources. If not enabled, all replicas of NGINX Gateway Fabric will update the statuses of the Gateway API resources. | bool | `true` | -| `nginxGateway.leaderElection.lockName` | The name of the leader election lock. A Lease object with this name will be created in the same Namespace as the controller. | string | Autogenerated if not set or set to "". | -| `nginxGateway.lifecycle` | The lifecycle of the nginx-gateway container. | object | `{}` | -| `nginxGateway.metrics.enable` | Enable exposing metrics in the Prometheus format. | bool | `true` | -| `nginxGateway.metrics.port` | Set the port where the Prometheus metrics are exposed. | int | `9113` | -| `nginxGateway.metrics.secure` | Enable serving metrics via https. By default metrics are served via http. Please note that this endpoint will be secured with a self-signed certificate. | bool | `false` | -| `nginxGateway.name` | The name of the NGINX Gateway Fabric deployment - if not present, then by default uses release name given during installation. | string | `""` | -| `nginxGateway.nodeSelector` | The nodeSelector of the NGINX Gateway Fabric control plane pod. | object | `{}` | -| `nginxGateway.podAnnotations` | Set of custom annotations for the NGINX Gateway Fabric pods. | object | `{}` | -| `nginxGateway.productTelemetry.enable` | Enable the collection of product telemetry. | bool | `true` | -| `nginxGateway.readinessProbe.enable` | Enable the /readyz endpoint on the control plane. | bool | `true` | -| `nginxGateway.readinessProbe.initialDelaySeconds` | The number of seconds after the Pod has started before the readiness probes are initiated. | int | `3` | -| `nginxGateway.readinessProbe.port` | Port in which the readiness endpoint is exposed. | int | `8081` | -| `nginxGateway.replicas` | The number of replicas of the NGINX Gateway Fabric Deployment. This value is ignored if autoscaling.enable is true. | int | `1` | -| `nginxGateway.resources` | The resource requests and/or limits of the nginx-gateway container. | object | `{}` | -| `nginxGateway.service` | The service configuration for the NGINX Gateway Fabric control plane. | object | `{"annotations":{},"labels":{}}` | -| `nginxGateway.service.annotations` | The annotations of the NGINX Gateway Fabric control plane service. | object | `{}` | -| `nginxGateway.service.labels` | The labels of the NGINX Gateway Fabric control plane service. | object | `{}` | -| `nginxGateway.serviceAccount` | The serviceaccount configuration for the NGINX Gateway Fabric control plane. | object | `{"annotations":{},"imagePullSecret":"","imagePullSecrets":[],"name":""}` | -| `nginxGateway.serviceAccount.annotations` | Set of custom annotations for the NGINX Gateway Fabric control plane service account. | object | `{}` | -| `nginxGateway.serviceAccount.imagePullSecret` | The name of the secret containing docker registry credentials for the control plane. Secret must exist in the same namespace as the helm release. | string | `""` | -| `nginxGateway.serviceAccount.imagePullSecrets` | A list of secret names containing docker registry credentials for the control plane. Secrets must exist in the same namespace as the helm release. | list | `[]` | -| `nginxGateway.serviceAccount.name` | The name of the service account of the NGINX Gateway Fabric control plane pods. Used for RBAC. | string | Autogenerated if not set or set to "" | -| `nginxGateway.snippetsFilters.enable` | Enable SnippetsFilters feature. SnippetsFilters allow inserting NGINX configuration into the generated NGINX config for HTTPRoute and GRPCRoute resources. | bool | `false` | -| `nginxGateway.terminationGracePeriodSeconds` | The termination grace period of the NGINX Gateway Fabric control plane pod. | int | `30` | -| `nginxGateway.tolerations` | Tolerations for the NGINX Gateway Fabric control plane pod. | list | `[]` | -| `nginxGateway.topologySpreadConstraints` | The topology spread constraints for the NGINX Gateway Fabric control plane pod. | list | `[]` | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_clientsettingspolicies.yaml b/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_clientsettingspolicies.yaml deleted file mode 100644 index c6e223692c..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_clientsettingspolicies.yaml +++ /dev/null @@ -1,453 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.19.0 - labels: - gateway.networking.k8s.io/policy: inherited - name: clientsettingspolicies.gateway.nginx.org -spec: - group: gateway.nginx.org - names: - categories: - - nginx-gateway-fabric - kind: ClientSettingsPolicy - listKind: ClientSettingsPolicyList - plural: clientsettingspolicies - shortNames: - - cspolicy - singular: clientsettingspolicy - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - ClientSettingsPolicy is an Inherited Attached Policy. It provides a way to configure the behavior of the connection - between the client and NGINX Gateway Fabric. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of the ClientSettingsPolicy. - properties: - body: - description: Body defines the client request body settings. - properties: - maxSize: - description: |- - MaxSize sets the maximum allowed size of the client request body. - If the size in a request exceeds the configured value, - the 413 (Request Entity Too Large) error is returned to the client. - Setting size to 0 disables checking of client request body size. - Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size. - pattern: ^\d{1,4}(k|m|g)?$ - type: string - timeout: - description: |- - Timeout defines a timeout for reading client request body. The timeout is set only for a period between - two successive read operations, not for the transmission of the whole request body. - If a client does not transmit anything within this time, the request is terminated with the - 408 (Request Time-out) error. - Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout. - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - type: object - keepAlive: - description: KeepAlive defines the keep-alive settings. - properties: - requests: - description: |- - Requests sets the maximum number of requests that can be served through one keep-alive connection. - After the maximum number of requests are made, the connection is closed. Closing connections periodically - is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests - is not recommended as it can lead to excessive memory usage. - Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests. - format: int32 - minimum: 0 - type: integer - time: - description: |- - Time defines the maximum time during which requests can be processed through one keep-alive connection. - After this time is reached, the connection is closed following the subsequent request processing. - Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_time. - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - timeout: - description: Timeout defines the keep-alive timeouts for clients. - properties: - header: - description: 'Header sets the timeout in the "Keep-Alive: - timeout=time" response header field.' - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - server: - description: |- - Server sets the timeout during which a keep-alive client connection will stay open on the server side. - Setting this value to 0 disables keep-alive client connections. - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - type: object - x-kubernetes-validations: - - message: header can only be specified if server is specified - rule: '!(has(self.header) && !has(self.server))' - type: object - targetRef: - description: |- - TargetRef identifies an API object to apply the policy to. - Object must be in the same namespace as the policy. - Support: Gateway, HTTPRoute, GRPCRoute. - properties: - group: - description: Group is the group of the target resource. - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - description: Kind is kind of the target resource. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: Name is the name of the target resource. - maxLength: 253 - minLength: 1 - type: string - required: - - group - - kind - - name - type: object - x-kubernetes-validations: - - message: 'TargetRef Kind must be one of: Gateway, HTTPRoute, or - GRPCRoute' - rule: (self.kind=='Gateway' || self.kind=='HTTPRoute' || self.kind=='GRPCRoute') - - message: TargetRef Group must be gateway.networking.k8s.io. - rule: (self.group=='gateway.networking.k8s.io') - required: - - targetRef - type: object - status: - description: Status defines the state of the ClientSettingsPolicy. - properties: - ancestors: - description: |- - Ancestors is a list of ancestor resources (usually Gateways) that are - associated with the policy, and the status of the policy with respect to - each ancestor. When this policy attaches to a parent, the controller that - manages the parent and the ancestors MUST add an entry to this list when - the controller first sees the policy and SHOULD update the entry as - appropriate when the relevant ancestor is modified. - - Note that choosing the relevant ancestor is left to the Policy designers; - an important part of Policy design is designing the right object level at - which to namespace this status. - - Note also that implementations MUST ONLY populate ancestor status for - the Ancestor resources they are responsible for. Implementations MUST - use the ControllerName field to uniquely identify the entries in this list - that they are responsible for. - - Note that to achieve this, the list of PolicyAncestorStatus structs - MUST be treated as a map with a composite key, made up of the AncestorRef - and ControllerName fields combined. - - A maximum of 16 ancestors will be represented in this list. An empty list - means the Policy is not relevant for any ancestors. - - If this slice is full, implementations MUST NOT add further entries. - Instead they MUST consider the policy unimplementable and signal that - on any related resources such as the ancestor that would be referenced - here. For example, if this list was full on BackendTLSPolicy, no - additional Gateways would be able to reference the Service targeted by - the BackendTLSPolicy. - items: - description: |- - PolicyAncestorStatus describes the status of a route with respect to an - associated Ancestor. - - Ancestors refer to objects that are either the Target of a policy or above it - in terms of object hierarchy. For example, if a policy targets a Service, the - Policy's Ancestors are, in order, the Service, the HTTPRoute, the Gateway, and - the GatewayClass. Almost always, in this hierarchy, the Gateway will be the most - useful object to place Policy status on, so we recommend that implementations - SHOULD use Gateway as the PolicyAncestorStatus object unless the designers - have a _very_ good reason otherwise. - - In the context of policy attachment, the Ancestor is used to distinguish which - resource results in a distinct application of this policy. For example, if a policy - targets a Service, it may have a distinct result per attached Gateway. - - Policies targeting the same resource may have different effects depending on the - ancestors of those resources. For example, different Gateways targeting the same - Service may have different capabilities, especially if they have different underlying - implementations. - - For example, in BackendTLSPolicy, the Policy attaches to a Service that is - used as a backend in a HTTPRoute that is itself attached to a Gateway. - In this case, the relevant object for status is the Gateway, and that is the - ancestor object referred to in this status. - - Note that a parent is also an ancestor, so for objects where the parent is the - relevant object for status, this struct SHOULD still be used. - - This struct is intended to be used in a slice that's effectively a map, - with a composite key made up of the AncestorRef and the ControllerName. - properties: - ancestorRef: - description: |- - AncestorRef corresponds with a ParentRef in the spec that this - PolicyAncestorStatus struct describes the status of. - properties: - group: - default: gateway.networking.k8s.io - description: |- - Group is the group of the referent. - When unspecified, "gateway.networking.k8s.io" is inferred. - To set the core API group (such as for a "Service" kind referent), - Group must be explicitly set to "" (empty string). - - Support: Core - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Gateway - description: |- - Kind is kind of the referent. - - There are two kinds of parent resources with "Core" support: - - * Gateway (Gateway conformance profile) - * Service (Mesh conformance profile, ClusterIP Services only) - - Support for other resources is Implementation-Specific. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: |- - Name is the name of the referent. - - Support: Core - maxLength: 253 - minLength: 1 - type: string - namespace: - description: |- - Namespace is the namespace of the referent. When unspecified, this refers - to the local namespace of the Route. - - Note that there are specific rules for ParentRefs which cross namespace - boundaries. Cross-namespace references are only valid if they are explicitly - allowed by something in the namespace they are referring to. For example: - Gateway has the AllowedRoutes field, and ReferenceGrant provides a - generic way to enable any other kind of cross-namespace reference. - - - ParentRefs from a Route to a Service in the same namespace are "producer" - routes, which apply default routing rules to inbound connections from - any namespace to the Service. - - ParentRefs from a Route to a Service in a different namespace are - "consumer" routes, and these routing rules are only applied to outbound - connections originating from the same namespace as the Route, for which - the intended destination of the connections are a Service targeted as a - ParentRef of the Route. - - - Support: Core - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - port: - description: |- - Port is the network port this Route targets. It can be interpreted - differently based on the type of parent resource. - - When the parent resource is a Gateway, this targets all listeners - listening on the specified port that also support this kind of Route(and - select this Route). It's not recommended to set `Port` unless the - networking behaviors specified in a Route must apply to a specific port - as opposed to a listener(s) whose port(s) may be changed. When both Port - and SectionName are specified, the name and port of the selected listener - must match both specified values. - - - When the parent resource is a Service, this targets a specific port in the - Service spec. When both Port (experimental) and SectionName are specified, - the name and port of the selected port must match both specified values. - - - Implementations MAY choose to support other parent resources. - Implementations supporting other types of parent resources MUST clearly - document how/if Port is interpreted. - - For the purpose of status, an attachment is considered successful as - long as the parent resource accepts it partially. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment - from the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, - the Route MUST be considered detached from the Gateway. - - Support: Extended - format: int32 - maximum: 65535 - minimum: 1 - type: integer - sectionName: - description: |- - SectionName is the name of a section within the target resource. In the - following resources, SectionName is interpreted as the following: - - * Gateway: Listener name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - * Service: Port name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - - Implementations MAY choose to support attaching Routes to other resources. - If that is the case, they MUST clearly document how SectionName is - interpreted. - - When unspecified (empty string), this will reference the entire resource. - For the purpose of status, an attachment is considered successful if at - least one section in the parent resource accepts it. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, the - Route MUST be considered detached from the Gateway. - - Support: Core - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - required: - - name - type: object - conditions: - description: Conditions describes the status of the Policy with - respect to the given Ancestor. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - maxItems: 8 - minItems: 1 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - controllerName: - description: |- - ControllerName is a domain/path string that indicates the name of the - controller that wrote this status. This corresponds with the - controllerName field on GatewayClass. - - Example: "example.net/gateway-controller". - - The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are - valid Kubernetes names - (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). - - Controllers MUST populate this field when writing status. Controllers should ensure that - entries to status populated with their ControllerName are cleaned up when they are no - longer necessary. - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$ - type: string - required: - - ancestorRef - - controllerName - type: object - maxItems: 16 - type: array - required: - - ancestors - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxgateways.yaml b/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxgateways.yaml deleted file mode 100644 index 270ee73dd2..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxgateways.yaml +++ /dev/null @@ -1,133 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.19.0 - name: nginxgateways.gateway.nginx.org -spec: - group: gateway.nginx.org - names: - categories: - - nginx-gateway-fabric - kind: NginxGateway - listKind: NginxGatewayList - plural: nginxgateways - singular: nginxgateway - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: NginxGateway represents the dynamic configuration for an NGINX - Gateway Fabric control plane. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: NginxGatewaySpec defines the desired state of the NginxGateway. - properties: - logging: - description: Logging defines logging related settings for the control - plane. - properties: - level: - default: info - description: Level defines the logging level. - enum: - - info - - debug - - error - type: string - type: object - type: object - status: - description: NginxGatewayStatus defines the state of the NginxGateway. - properties: - conditions: - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - maxItems: 8 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxproxies.yaml b/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxproxies.yaml deleted file mode 100644 index 89de827bd4..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_nginxproxies.yaml +++ /dev/null @@ -1,8250 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.19.0 - name: nginxproxies.gateway.nginx.org -spec: - group: gateway.nginx.org - names: - categories: - - nginx-gateway-fabric - kind: NginxProxy - listKind: NginxProxyList - plural: nginxproxies - singular: nginxproxy - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha2 - schema: - openAPIV3Schema: - description: |- - NginxProxy is a configuration object that can be referenced from a GatewayClass parametersRef - or a Gateway infrastructure.parametersRef. It provides a way to configure data plane settings. - If referenced from a GatewayClass, the settings apply to all Gateways attached to the GatewayClass. - If referenced from a Gateway, the settings apply to that Gateway alone. If both a Gateway and its GatewayClass - reference an NginxProxy, the settings are merged. Settings specified on the Gateway NginxProxy override those - set on the GatewayClass NginxProxy. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of the NginxProxy. - properties: - disableHTTP2: - description: |- - DisableHTTP2 defines if http2 should be disabled for all servers. - If not specified, or set to false, http2 will be enabled for all servers. - type: boolean - disableSNIHostValidation: - description: |- - DisableSNIHostValidation disables the validation that ensures the SNI hostname - matches the Host header in HTTPS requests. When disabled, HTTPS connections can - be reused for requests to different hostnames covered by the same certificate. - This resolves HTTP/2 connection coalescing issues with wildcard certificates but - introduces security risks as described in Gateway API GEP-3567. - If not specified, defaults to false (validation enabled). - type: boolean - dnsResolver: - description: |- - DNSResolver specifies the DNS resolver configuration for external name resolution. - This enables support for routing to ExternalName Services. - properties: - addresses: - description: |- - Addresses specifies the list of DNS server addresses. - Each address can be an IP address or hostname. - Example: [{"type": "IPAddress", "value": "8.8.8.8"}, {"type": "Hostname", "value": "dns.google"}] - items: - description: DNSResolverAddress specifies the address type and - value for a DNS resolver address. - properties: - type: - description: Type specifies the type of address. - enum: - - IPAddress - - Hostname - type: string - value: - description: |- - Value specifies the address value. - When Type is "IPAddress", this must be a valid IPv4 or IPv6 address. - When Type is "Hostname", this must be a valid hostname. - maxLength: 253 - minLength: 1 - type: string - required: - - type - - value - type: object - maxItems: 16 - minItems: 1 - type: array - cacheTTL: - description: CacheTTL specifies how long to cache DNS responses. - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - disableIPv6: - description: |- - DisableIPv6 disables IPv6 lookups. - If not specified, or set to false, IPv6 lookups will be enabled. - type: boolean - timeout: - description: Timeout specifies the timeout for name resolution. - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - required: - - addresses - type: object - ipFamily: - default: dual - description: |- - IPFamily specifies the IP family to be used by the NGINX. - Default is "dual", meaning the server will use both IPv4 and IPv6. - enum: - - dual - - ipv4 - - ipv6 - type: string - kubernetes: - description: Kubernetes contains the configuration for the NGINX Deployment - and Service Kubernetes objects. - properties: - daemonSet: - description: DaemonSet is the configuration for the NGINX DaemonSet. - properties: - container: - description: Container defines container fields for the NGINX - container. - properties: - debug: - description: Debug enables debugging for NGINX by using - the nginx-debug binary. - type: boolean - hostPorts: - description: HostPorts are the list of ports to expose - on the host. - items: - description: HostPort exposes an nginx container port - on the host. - properties: - containerPort: - description: ContainerPort is the port on the nginx - container to map to the HostPort. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - port: - description: Port to expose on the host. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - containerPort - - port - type: object - type: array - image: - description: Image is the NGINX image to use. - properties: - pullPolicy: - default: IfNotPresent - description: PullPolicy describes a policy for if/when - to pull a container image. - enum: - - Always - - Never - - IfNotPresent - type: string - repository: - description: |- - Repository is the image path. - Default is ghcr.io/nginx/nginx-gateway-fabric/nginx. - type: string - tag: - description: Tag is the image tag to use. Default - matches the tag of the control plane. - type: string - type: object - lifecycle: - description: |- - Lifecycle describes actions that the management system should take in response to container lifecycle - events. For the PostStart and PreStop lifecycle handlers, management of the container blocks - until the action is complete, unless the container process fails, in which case the handler is aborted. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP GET request - to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration that - the container should sleep. - properties: - seconds: - description: Seconds is the number of seconds - to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP GET request - to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration that - the container should sleep. - properties: - seconds: - description: Seconds is the number of seconds - to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - readinessProbe: - description: ReadinessProbe defines the readiness probe - for the NGINX container. - properties: - initialDelaySeconds: - description: |- - InitialDelaySeconds is the number of seconds after the container has - started before the readiness probe is initiated. - If not specified, the default is 3 seconds. - format: int32 - maximum: 3600 - minimum: 0 - type: integer - port: - description: |- - Port is the port on which the readiness endpoint is exposed. - If not specified, the default port is 8081. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - type: object - resources: - description: Resources describes the compute resource - requirements. - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry - in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - volumeMounts: - description: VolumeMounts describe the mounting of Volumes - within a container. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - type: object - patches: - description: Patches are custom patches to apply to the NGINX - DaemonSet. - items: - description: Patch defines a patch to apply to a Kubernetes - object. - properties: - type: - default: StrategicMerge - description: Type is the type of patch. Defaults to - StrategicMerge. - enum: - - StrategicMerge - - Merge - - JSONPatch - type: string - value: - description: |- - Value is the patch data as raw JSON. - For StrategicMerge and Merge patches, this should be a JSON object. - For JSONPatch patches, this should be a JSON array of patch operations. - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - pod: - description: Pod defines Pod-specific fields. - properties: - affinity: - description: Affinity is the pod's scheduling constraints. - properties: - nodeAffinity: - description: Describes node affinity scheduling rules - for the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated - with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector - requirements by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching - the corresponding nodeSelectorTerm, in - the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector - terms. The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector - requirements by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules - (e.g. co-locate this pod in the same node, zone, - etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added per-node - to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling - rules (e.g. avoid putting this pod in the same node, - zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and subtracting - "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added per-node - to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - nodeSelector: - additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - type: object - terminationGracePeriodSeconds: - description: |- - TerminationGracePeriodSeconds is the optional duration in seconds the pod needs to terminate gracefully. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - If this value is nil, the default grace period will be used instead. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - Defaults to 30 seconds. - format: int64 - type: integer - tolerations: - description: Tolerations allow the scheduler to schedule - Pods with matching taints. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints describes how a group of Pods ought to spread across topology - domains. Scheduler will schedule Pods in a way which abides by the constraints. - All topologySpreadConstraints are ANDed. - items: - description: TopologySpreadConstraint specifies how - to spread matching pods among the given topology. - properties: - labelSelector: - description: |- - LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine the number of pods - in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select the pods over which - spreading will be calculated. The keys are used to lookup values from the - incoming pod labels, those key-value labels are ANDed with labelSelector - to select the group of existing pods over which spreading will be calculated - for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - MatchLabelKeys cannot be set when LabelSelector isn't set. - Keys that don't exist in the incoming pod labels will - be ignored. A null or empty list means only match against labelSelector. - - This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: |- - MaxSkew describes the degree to which pods may be unevenly distributed. - When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference - between the number of matching pods in the target topology and the global minimum. - The global minimum is the minimum number of matching pods in an eligible domain - or zero if the number of eligible domains is less than MinDomains. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 2/2/1: - In this case, the global minimum is 1. - | zone1 | zone2 | zone3 | - | P P | P P | P | - - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) - violate MaxSkew(1). - - if MaxSkew is 2, incoming pod can be scheduled onto any zone. - When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence - to topologies that satisfy it. - It's a required field. Default value is 1 and 0 is not allowed. - format: int32 - type: integer - minDomains: - description: |- - MinDomains indicates a minimum number of eligible domains. - When the number of eligible domains with matching topology keys is less than minDomains, - Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - And when the number of eligible domains with matching topology keys equals or greater than minDomains, - this value has no effect on scheduling. - As a result, when the number of eligible domains is less than minDomains, - scheduler won't schedule more than maxSkew Pods to those domains. - If value is nil, the constraint behaves as if MinDomains is equal to 1. - Valid values are integers greater than 0. - When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - - For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - labelSelector spread as 2/2/2: - | zone1 | zone2 | zone3 | - | P P | P P | P P | - The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - In this situation, new pod with the same labelSelector cannot be scheduled, - because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - it will violate MaxSkew. - format: int32 - type: integer - nodeAffinityPolicy: - description: |- - NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector - when calculating pod topology spread skew. Options are: - - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. - - If this value is nil, the behavior is equivalent to the Honor policy. - type: string - nodeTaintsPolicy: - description: |- - NodeTaintsPolicy indicates how we will treat node taints when calculating - pod topology spread skew. Options are: - - Honor: nodes without taints, along with tainted nodes for which the incoming pod - has a toleration, are included. - - Ignore: node taints are ignored. All nodes are included. - - If this value is nil, the behavior is equivalent to the Ignore policy. - type: string - topologyKey: - description: |- - TopologyKey is the key of node labels. Nodes that have a label with this key - and identical values are considered to be in the same topology. - We consider each as a "bucket", and try to put balanced number - of pods into each bucket. - We define a domain as a particular instance of a topology. - Also, we define an eligible domain as a domain whose nodes meet the requirements of - nodeAffinityPolicy and nodeTaintsPolicy. - e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. - It's a required field. - type: string - whenUnsatisfiable: - description: |- - WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy - the spread constraint. - - DoNotSchedule (default) tells the scheduler not to schedule it. - - ScheduleAnyway tells the scheduler to schedule the pod in any location, - but giving higher precedence to topologies that would help reduce the - skew. - A constraint is considered "Unsatisfiable" for an incoming pod - if and only if every possible node assignment for that pod would violate - "MaxSkew" on some topology. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 3/1/1: - | zone1 | zone2 | zone3 | - | P P P | P | P | - If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled - to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies - MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler - won't make it *more* imbalanced. - It's a required field. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - volumes: - description: Volumes represents named volumes in a pod - that may be accessed by any container in the pod. - items: - description: Volume represents a named volume in a pod - that may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: |- - awsElasticBlockStore represents an AWS Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree - awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - properties: - fsType: - description: |- - fsType is the filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: string - partition: - description: |- - partition is the partition in the volume that you want to mount. - If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition as "1". - Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - format: int32 - type: integer - readOnly: - description: |- - readOnly value true will force the readOnly setting in VolumeMounts. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: boolean - volumeID: - description: |- - volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: string - required: - - volumeID - type: object - azureDisk: - description: |- - azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type - are redirected to the disk.csi.azure.com CSI driver. - properties: - cachingMode: - description: 'cachingMode is the Host Caching - mode: None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data - disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk - in the blob storage - type: string - fsType: - default: ext4 - description: |- - fsType is Filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are Shared: - multiple blob disks per storage account Dedicated: - single blob disk per storage account Managed: - azure managed data disk (only in managed availability - set). defaults to shared' - type: string - readOnly: - default: false - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: |- - azureFile represents an Azure File Service mount on the host and bind mount to the pod. - Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type - are redirected to the file.csi.azure.com CSI driver. - properties: - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret - that contains Azure Storage Account Name and - Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: |- - cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. - Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. - properties: - monitors: - description: |- - monitors is Required: Monitors is a collection of Ceph monitors - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - path: - description: 'path is Optional: Used as the - mounted root, rather than the full Ceph tree, - default is /' - type: string - readOnly: - description: |- - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - type: boolean - secretFile: - description: |- - secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - type: string - secretRef: - description: |- - secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: |- - user is optional: User is the rados user name, default is admin - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - type: string - required: - - monitors - type: object - cinder: - description: |- - cinder represents a cinder volume attached and mounted on kubelets host machine. - Deprecated: Cinder is deprecated. All operations for the in-tree cinder type - are redirected to the cinder.csi.openstack.org CSI driver. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: boolean - secretRef: - description: |- - secretRef is optional: points to a secret object containing parameters used to connect - to OpenStack. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: |- - volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that - should populate this volume - properties: - defaultMode: - description: |- - defaultMode is optional: mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - Defaults to 0644. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - items: - description: |- - items if unspecified, each key-value pair in the Data field of the referenced - ConfigMap will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents - ephemeral storage that is handled by certain external - CSI drivers. - properties: - driver: - description: |- - driver is the name of the CSI driver that handles this volume. - Consult with your admin for the correct name as registered in the cluster. - type: string - fsType: - description: |- - fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the associated CSI driver - which will determine the default filesystem to apply. - type: string - nodePublishSecretRef: - description: |- - nodePublishSecretRef is a reference to the secret object containing - sensitive information to pass to the CSI driver to complete the CSI - NodePublishVolume and NodeUnpublishVolume calls. - This field is optional, and may be empty if no secret is required. If the - secret object contains more than one secret, all secret references are passed. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: |- - readOnly specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: |- - volumeAttributes stores driver-specific properties that are passed to the CSI - driver. Consult your driver's documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API - about the pod that should populate this volume - properties: - defaultMode: - description: |- - Optional: mode bits to use on created files by default. Must be a - Optional: mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - Defaults to 0644. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - items: - description: Items is a list of downward API - volume file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name, namespace and uid are supported.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: |- - Optional: mode bits used to set permissions on this file, must be an octal value - between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. - Must not be absolute or contain the - ''..'' path. Must be utf-8 encoded. - The first item of the relative path - must not start with ''..''' - type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - x-kubernetes-list-type: atomic - type: object - emptyDir: - description: |- - emptyDir represents a temporary directory that shares a pod's lifetime. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: |- - ephemeral represents a volume that is handled by a cluster storage driver. - The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, - and deleted when the pod is removed. - - Use this if: - a) the volume is only needed while the pod runs, - b) features of normal volumes like restoring from snapshot or capacity - tracking are needed, - c) the storage driver is specified through a storage class, and - d) the storage driver supports dynamic volume provisioning through - a PersistentVolumeClaim (see EphemeralVolumeSource for more - information on the connection between this volume type - and PersistentVolumeClaim). - - Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. - - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to - be used that way - see the documentation of the driver for - more information. - - A pod can use both types of ephemeral volumes and - persistent volumes at the same time. - properties: - volumeClaimTemplate: - description: |- - Will be used to create a stand-alone PVC to provision the volume. - The pod in which this EphemeralVolumeSource is embedded will be the - owner of the PVC, i.e. the PVC will be deleted together with the - pod. The name of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` array - entry. Pod validation will reject the pod if the concatenated name - is not valid for a PVC (for example, too long). - - An existing PVC with that name that is not owned by the pod - will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC is - meant to be used by the pod, the PVC has to updated with an - owner reference to the pod once the pod exists. Normally - this should not be necessary, but it may be useful when - manually reconstructing a broken cluster. - - This field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. - - Required, must not be nil. - properties: - metadata: - description: |- - May contain labels and annotations that will be copied into the PVC - when creating it. No other fields are allowed and will be rejected during - validation. - type: object - spec: - description: |- - The specification for the PersistentVolumeClaim. The entire content is - copied unchanged into the PVC that gets created from this - template. The same fields as in a PersistentVolumeClaim - are also valid here. - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of - resource being referenced - type: string - name: - description: Name is the name of - resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of - resource being referenced - type: string - name: - description: Name is the name of - resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query - over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding - reference to the PersistentVolume - backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource - that is attached to a kubelet's host machine and - then exposed to the pod. - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - lun: - description: 'lun is Optional: FC target lun - number' - format: int32 - type: integer - readOnly: - description: |- - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target - worldwide names (WWNs)' - items: - type: string - type: array - x-kubernetes-list-type: atomic - wwids: - description: |- - wwids Optional: FC volume world wide identifiers (wwids) - Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - flexVolume: - description: |- - flexVolume represents a generic volume resource that is - provisioned/attached using an exec based plugin. - Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. - properties: - driver: - description: driver is the name of the driver - to use for this volume. - type: string - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field - holds extra command options if any.' - type: object - readOnly: - description: |- - readOnly is Optional: defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef is Optional: secretRef is reference to the secret object containing - sensitive information to pass to the plugin scripts. This may be - empty if no secret object is specified. If the secret object - contains more than one secret, all secrets are passed to the plugin - scripts. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: |- - flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. - Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. - properties: - datasetName: - description: |- - datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker - should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the - dataset. This is unique identifier of a Flocker - dataset - type: string - type: object - gcePersistentDisk: - description: |- - gcePersistentDisk represents a GCE Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree - gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - properties: - fsType: - description: |- - fsType is filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: string - partition: - description: |- - partition is the partition in the volume that you want to mount. - If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition as "1". - Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - format: int32 - type: integer - pdName: - description: |- - pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: string - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: boolean - required: - - pdName - type: object - gitRepo: - description: |- - gitRepo represents a git repository at a particular revision. - Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an - EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir - into the Pod's container. - properties: - directory: - description: |- - directory is the target directory name. - Must not contain or start with '..'. If '.' is supplied, the volume directory will be the - git repository. Otherwise, if specified, the volume will contain the git repository in - the subdirectory with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for - the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: |- - glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. - Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. - properties: - endpoints: - description: endpoints is the endpoint name - that details Glusterfs topology. - type: string - path: - description: |- - path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - type: string - readOnly: - description: |- - readOnly here will force the Glusterfs volume to be mounted with read-only permissions. - Defaults to false. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: |- - hostPath represents a pre-existing file or directory on the host - machine that is directly exposed to the container. This is generally - used for system agents or other privileged things that are allowed - to see the host machine. Most containers will NOT need this. - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - properties: - path: - description: |- - path of the directory on the host. - If the path is a symlink, it will follow the link to the real path. - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - type: string - type: - description: |- - type for HostPath Volume - Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - type: string - required: - - path - type: object - image: - description: |- - image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. - The volume is resolved at pod startup depending on which PullPolicy value is provided: - - - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - - The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. - A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. - The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. - The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. - The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. - The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. - properties: - pullPolicy: - description: |- - Policy for pulling OCI objects. Possible values are: - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. - type: string - reference: - description: |- - Required: Image or artifact reference to be used. - Behaves in the same way as pod.spec.containers[*].image. - Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. - More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management to default or override - container images in workload controllers like Deployments and StatefulSets. - type: string - type: object - iscsi: - description: |- - iscsi represents an ISCSI Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether - support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether - support iSCSI Session CHAP authentication - type: boolean - fsType: - description: |- - fsType is the filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - type: string - initiatorName: - description: |- - initiatorName is the custom iSCSI Initiator Name. - If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified - Name. - type: string - iscsiInterface: - default: default - description: |- - iscsiInterface is the interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun - number. - format: int32 - type: integer - portals: - description: |- - portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port - is other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - x-kubernetes-list-type: atomic - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for - iSCSI target and initiator authentication - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: |- - targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port - is other than default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: |- - name of the volume. - Must be a DNS_LABEL and unique within the pod. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - nfs: - description: |- - nfs represents an NFS mount on the host that shares a pod's lifetime - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - properties: - path: - description: |- - path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - readOnly: - description: |- - readOnly here will force the NFS export to be mounted with read-only permissions. - Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: boolean - server: - description: |- - server is the hostname or IP address of the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: |- - persistentVolumeClaimVolumeSource represents a reference to a - PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - claimName: - description: |- - claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - type: string - readOnly: - description: |- - readOnly Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: |- - photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. - Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: pdID is the ID that identifies - Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: |- - portworxVolume represents a portworx volume attached and mounted on kubelets host machine. - Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type - are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate - is on. - properties: - fsType: - description: |- - fSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a - Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources - secrets, configmaps, and downward API - properties: - defaultMode: - description: |- - defaultMode are the mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - sources: - description: |- - sources is the list of volume projections. Each entry in this list - handles one source. - items: - description: |- - Projection that may be projected along with other supported volume types. - Exactly one of these fields must be set. - properties: - clusterTrustBundle: - description: |- - ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field - of ClusterTrustBundle objects in an auto-updating file. - - Alpha, gated by the ClusterTrustBundleProjection feature gate. - - ClusterTrustBundle objects can either be selected by name, or by the - combination of signer name and a label selector. - - Kubelet performs aggressive normalization of the PEM contents written - into the pod filesystem. Esoteric PEM features such as inter-block - comments and block headers are stripped. Certificates are deduplicated. - The ordering of certificates within the file is arbitrary, and Kubelet - may change the order over time. - properties: - labelSelector: - description: |- - Select all ClusterTrustBundles that match this label selector. Only has - effect if signerName is set. Mutually-exclusive with name. If unset, - interpreted as "match nothing". If set but empty, interpreted as "match - everything". - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: |- - Select a single ClusterTrustBundle by object name. Mutually-exclusive - with signerName and labelSelector. - type: string - optional: - description: |- - If true, don't block pod startup if the referenced ClusterTrustBundle(s) - aren't available. If using name, then the named ClusterTrustBundle is - allowed not to exist. If using signerName, then the combination of - signerName and labelSelector is allowed to match zero - ClusterTrustBundles. - type: boolean - path: - description: Relative path from the - volume root to write the bundle. - type: string - signerName: - description: |- - Select all ClusterTrustBundles that match this signer name. - Mutually-exclusive with name. The contents of all selected - ClusterTrustBundles will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information about - the configMap data to project - properties: - items: - description: |- - items if unspecified, each key-value pair in the Data field of the referenced - ConfigMap will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to - a path within a volume. - properties: - key: - description: key is the key - to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: optional specify whether - the ConfigMap or its keys must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about - the downwardAPI data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile - represents information to create - the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only annotations, - labels, name, namespace and - uid are supported.' - properties: - apiVersion: - description: Version of - the schema the FieldPath - is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the - field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: |- - Optional: mode bits used to set permissions on this file, must be an octal value - between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: Path - is the relative path name - of the file to be created. - Must not be absolute or contain - the ''..'' path. Must be utf-8 - encoded. The first item of - the relative path must not - start with ''..''' - type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container - name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the - output format of the exposed - resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podCertificate: - description: |- - Projects an auto-rotating credential bundle (private key and certificate - chain) that the pod can use either as a TLS client or server. - - Kubelet generates a private key and uses it to send a - PodCertificateRequest to the named signer. Once the signer approves the - request and issues a certificate chain, Kubelet writes the key and - certificate chain to the pod filesystem. The pod does not start until - certificates have been issued for each podCertificate projected volume - source in its spec. - - Kubelet will begin trying to rotate the certificate at the time indicated - by the signer using the PodCertificateRequest.Status.BeginRefreshAt - timestamp. - - Kubelet can write a single file, indicated by the credentialBundlePath - field, or separate files, indicated by the keyPath and - certificateChainPath fields. - - The credential bundle is a single file in PEM format. The first PEM - entry is the private key (in PKCS#8 format), and the remaining PEM - entries are the certificate chain issued by the signer (typically, - signers will return their certificate chain in leaf-to-root order). - - Prefer using the credential bundle format, since your application code - can read it atomically. If you use keyPath and certificateChainPath, - your application must make two separate file reads. If these coincide - with a certificate rotation, it is possible that the private key and leaf - certificate you read may not correspond to each other. Your application - will need to check for this condition, and re-read until they are - consistent. - - The named signer controls chooses the format of the certificate it - issues; consult the signer implementation's documentation to learn how to - use the certificates it issues. - properties: - certificateChainPath: - description: |- - Write the certificate chain at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - credentialBundlePath: - description: |- - Write the credential bundle at this path in the projected volume. - - The credential bundle is a single file that contains multiple PEM blocks. - The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private - key. - - The remaining blocks are CERTIFICATE blocks, containing the issued - certificate chain from the signer (leaf and any intermediates). - - Using credentialBundlePath lets your Pod's application code make a single - atomic read that retrieves a consistent key and certificate chain. If you - project them to separate files, your application code will need to - additionally check that the leaf certificate was issued to the key. - type: string - keyPath: - description: |- - Write the key at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - keyType: - description: |- - The type of keypair Kubelet will generate for the pod. - - Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", - "ECDSAP521", and "ED25519". - type: string - maxExpirationSeconds: - description: |- - maxExpirationSeconds is the maximum lifetime permitted for the - certificate. - - Kubelet copies this value verbatim into the PodCertificateRequests it - generates for this projection. - - If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver - will reject values shorter than 3600 (1 hour). The maximum allowable - value is 7862400 (91 days). - - The signer implementation is then free to issue a certificate with any - lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 - seconds (1 hour). This constraint is enforced by kube-apiserver. - `kubernetes.io` signers will never issue certificates with a lifetime - longer than 24 hours. - format: int32 - type: integer - signerName: - description: Kubelet's generated CSRs - will be addressed to this signer. - type: string - required: - - keyType - - signerName - type: object - secret: - description: secret information about - the secret data to project - properties: - items: - description: |- - items if unspecified, each key-value pair in the Data field of the referenced - Secret will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to - a path within a volume. - properties: - key: - description: key is the key - to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: optional field specify - whether the Secret or its key must - be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information - about the serviceAccountToken data to - project - properties: - audience: - description: |- - audience is the intended audience of the token. A recipient of a token - must identify itself with an identifier specified in the audience of the - token, and otherwise should reject the token. The audience defaults to the - identifier of the apiserver. - type: string - expirationSeconds: - description: |- - expirationSeconds is the requested duration of validity of the service - account token. As the token approaches expiration, the kubelet volume - plugin will proactively rotate the service account token. The kubelet will - start trying to rotate the token if the token is older than 80 percent of - its time to live or if the token is older than 24 hours.Defaults to 1 hour - and must be at least 10 minutes. - format: int64 - type: integer - path: - description: |- - path is the path relative to the mount point of the file to project the - token into. - type: string - required: - - path - type: object - type: object - type: array - x-kubernetes-list-type: atomic - type: object - quobyte: - description: |- - quobyte represents a Quobyte mount on the host that shares a pod's lifetime. - Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. - properties: - group: - description: |- - group to map volume access to - Default is no group - type: string - readOnly: - description: |- - readOnly here will force the Quobyte volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: |- - registry represents a single or multiple Quobyte Registry services - specified as a string as host:port pair (multiple entries are separated with commas) - which acts as the central registry for volumes - type: string - tenant: - description: |- - tenant owning the given Quobyte volume in the Backend - Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: |- - user to map volume access to - Defaults to serivceaccount user - type: string - volume: - description: volume is a string that references - an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: |- - rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. - Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. - properties: - fsType: - description: |- - fsType is the filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - type: string - image: - description: |- - image is the rados image name. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - keyring: - default: /etc/ceph/keyring - description: |- - keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - monitors: - description: |- - monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - pool: - default: rbd - description: |- - pool is the rados pool name. - Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: boolean - secretRef: - description: |- - secretRef is name of the authentication secret for RBDUser. If provided - overrides keyring. - Default is nil. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - user: - default: admin - description: |- - user is the rados user name. - Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - required: - - image - - monitors - type: object - scaleIO: - description: |- - scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. - properties: - fsType: - default: xfs - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". - Default is "xfs". - type: string - gateway: - description: gateway is the host address of - the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of - the ScaleIO Protection Domain for the configured - storage. - type: string - readOnly: - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef references to the secret for ScaleIO user and other - sensitive information. If this is not provided, Login operation will fail. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable - SSL communication with Gateway, default false - type: boolean - storageMode: - default: ThinProvisioned - description: |- - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage - Pool associated with the protection domain. - type: string - system: - description: system is the name of the storage - system as configured in ScaleIO. - type: string - volumeName: - description: |- - volumeName is the name of a volume already created in the ScaleIO system - that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: |- - secret represents a secret that should populate this volume. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - properties: - defaultMode: - description: |- - defaultMode is Optional: mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values - for mode bits. Defaults to 0644. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - items: - description: |- - items If unspecified, each key-value pair in the Data field of the referenced - Secret will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - optional: - description: optional field specify whether - the Secret or its keys must be defined - type: boolean - secretName: - description: |- - secretName is the name of the secret in the pod's namespace to use. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - type: string - type: object - storageos: - description: |- - storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef specifies the secret to use for obtaining the StorageOS API - credentials. If not specified, default values will be attempted. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: |- - volumeName is the human-readable name of the StorageOS volume. Volume - names are only unique within a namespace. - type: string - volumeNamespace: - description: |- - volumeNamespace specifies the scope of the volume within StorageOS. If no - namespace is specified then the Pod's namespace will be used. This allows the - Kubernetes name scoping to be mirrored within StorageOS for tighter integration. - Set VolumeName to any name to override the default behaviour. - Set to "default" if you are not using namespaces within StorageOS. - Namespaces that do not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: |- - vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. - Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type - are redirected to the csi.vsphere.vmware.com CSI driver. - properties: - fsType: - description: |- - fsType is filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage - Policy Based Management (SPBM) profile ID - associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage - Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies - vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - type: object - deployment: - description: |- - Deployment is the configuration for the NGINX Deployment. - This is the default deployment option. - properties: - autoscaling: - description: Autoscaling defines the configuration for Horizontal - Pod Autoscaling. - properties: - behavior: - description: |- - Behavior configures the scaling behavior of the target - in both Up and Down directions (scaleUp and scaleDown fields respectively). - If not set, the default HPAScalingRules for scale up and scale down are used. - properties: - scaleDown: - description: |- - scaleDown is scaling policy for scaling Down. - If not set, the default value is to allow to scale down to minReplicas pods, with a - 300 second stabilization window (i.e., the highest recommendation for - the last 300sec is used). - properties: - policies: - description: |- - policies is a list of potential scaling polices which can be used during scaling. - If not set, use the default values: - - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - - For scale down: allow all pods to be removed in a 15s window. - items: - description: HPAScalingPolicy is a single policy - which must hold true for a specified past - interval. - properties: - periodSeconds: - description: |- - periodSeconds specifies the window of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the - scaling policy. - type: string - value: - description: |- - value contains the amount of change which is permitted by the policy. - It must be greater than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: |- - selectPolicy is used to specify which policy should be used. - If not set, the default value Max is used. - type: string - stabilizationWindowSeconds: - description: |- - stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. - StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). - If not set, use the default values: - - For scale up: 0 (i.e. no stabilization is done). - - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - format: int32 - type: integer - tolerance: - anyOf: - - type: integer - - type: string - description: |- - tolerance is the tolerance on the ratio between the current and desired - metric value under which no updates are made to the desired number of - replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not - set, the default cluster-wide tolerance is applied (by default 10%). - - For example, if autoscaling is configured with a memory consumption target of 100Mi, - and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be - triggered when the actual consumption falls below 95Mi or exceeds 101Mi. - - This is an alpha field and requires enabling the HPAConfigurableTolerance - feature gate. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - scaleUp: - description: |- - scaleUp is scaling policy for scaling Up. - If not set, the default value is the higher of: - * increase no more than 4 pods per 60 seconds - * double the number of pods per 60 seconds - No stabilization is used. - properties: - policies: - description: |- - policies is a list of potential scaling polices which can be used during scaling. - If not set, use the default values: - - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - - For scale down: allow all pods to be removed in a 15s window. - items: - description: HPAScalingPolicy is a single policy - which must hold true for a specified past - interval. - properties: - periodSeconds: - description: |- - periodSeconds specifies the window of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the - scaling policy. - type: string - value: - description: |- - value contains the amount of change which is permitted by the policy. - It must be greater than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: |- - selectPolicy is used to specify which policy should be used. - If not set, the default value Max is used. - type: string - stabilizationWindowSeconds: - description: |- - stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. - StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). - If not set, use the default values: - - For scale up: 0 (i.e. no stabilization is done). - - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - format: int32 - type: integer - tolerance: - anyOf: - - type: integer - - type: string - description: |- - tolerance is the tolerance on the ratio between the current and desired - metric value under which no updates are made to the desired number of - replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not - set, the default cluster-wide tolerance is applied (by default 10%). - - For example, if autoscaling is configured with a memory consumption target of 100Mi, - and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be - triggered when the actual consumption falls below 95Mi or exceeds 101Mi. - - This is an alpha field and requires enabling the HPAConfigurableTolerance - feature gate. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - enable: - description: Enable or disable Horizontal Pod Autoscaler. - type: boolean - maxReplicas: - description: Maximum number of replicas. - format: int32 - minimum: 1 - type: integer - metrics: - description: Metrics configures additional metrics options. - items: - description: |- - MetricSpec specifies how to scale based on a single metric - (only `type` and one other matching field should be set at once). - properties: - containerResource: - description: |- - containerResource refers to a resource metric (such as those specified in - requests and limits) known to Kubernetes describing a single container in - each pod of the current scale target (e.g. CPU or memory). Such metrics are - built in to Kubernetes, and have special scaling options on top of those - available to normal per-pod metrics using the "pods" source. - properties: - container: - description: container is the name of the container - in the pods of the scaling target - type: string - name: - description: name is the name of the resource - in question. - type: string - target: - description: target specifies the target value - for the given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the - metric type is Utilization, Value, or - AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of - the metric (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - container - - name - - target - type: object - external: - description: |- - external refers to a global metric that is not associated - with any Kubernetes object. It allows autoscaling based on information - coming from components running outside of cluster - (for example length of queue in cloud messaging service, or - QPS from loadbalancer running outside of cluster). - properties: - metric: - description: metric identifies the target metric - by name and selector - properties: - name: - description: name is the name of the given - metric - type: string - selector: - description: |- - selector is the string-encoded form of a standard kubernetes label selector for the given metric - When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. - When unset, just the metricName will be used to gather metrics. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value - for the given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the - metric type is Utilization, Value, or - AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of - the metric (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - object: - description: |- - object refers to a metric describing a single kubernetes object - (for example, hits-per-second on an Ingress object). - properties: - describedObject: - description: describedObject specifies the descriptions - of a object,such as kind,name apiVersion - properties: - apiVersion: - description: apiVersion is the API version - of the referent - type: string - kind: - description: 'kind is the kind of the referent; - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'name is the name of the referent; - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - required: - - kind - - name - type: object - metric: - description: metric identifies the target metric - by name and selector - properties: - name: - description: name is the name of the given - metric - type: string - selector: - description: |- - selector is the string-encoded form of a standard kubernetes label selector for the given metric - When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. - When unset, just the metricName will be used to gather metrics. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value - for the given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the - metric type is Utilization, Value, or - AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of - the metric (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - describedObject - - metric - - target - type: object - pods: - description: |- - pods refers to a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). The values will be - averaged together before being compared to the target value. - properties: - metric: - description: metric identifies the target metric - by name and selector - properties: - name: - description: name is the name of the given - metric - type: string - selector: - description: |- - selector is the string-encoded form of a standard kubernetes label selector for the given metric - When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. - When unset, just the metricName will be used to gather metrics. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value - for the given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the - metric type is Utilization, Value, or - AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of - the metric (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - resource: - description: |- - resource refers to a resource metric (such as those specified in - requests and limits) known to Kubernetes describing each pod in the - current scale target (e.g. CPU or memory). Such metrics are built in to - Kubernetes, and have special scaling options on top of those available - to normal per-pod metrics using the "pods" source. - properties: - name: - description: name is the name of the resource - in question. - type: string - target: - description: target specifies the target value - for the given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the - metric type is Utilization, Value, or - AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of - the metric (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - name - - target - type: object - type: - description: |- - type is the type of metric source. It should be one of "ContainerResource", "External", - "Object", "Pods" or "Resource", each mapping to a matching field in the object. - type: string - required: - - type - type: object - type: array - minReplicas: - description: Minimum number of replicas. - format: int32 - minimum: 1 - type: integer - targetCPUUtilizationPercentage: - description: Target cpu utilization percentage of HPA. - format: int32 - maximum: 100 - minimum: 1 - type: integer - targetMemoryUtilizationPercentage: - description: Target memory utilization percentage of HPA. - format: int32 - maximum: 100 - minimum: 1 - type: integer - required: - - enable - - maxReplicas - type: object - x-kubernetes-validations: - - message: minReplicas must be less than or equal to maxReplicas - rule: (!has(self.minReplicas)) || (self.minReplicas <= self.maxReplicas) - container: - description: Container defines container fields for the NGINX - container. - properties: - debug: - description: Debug enables debugging for NGINX by using - the nginx-debug binary. - type: boolean - hostPorts: - description: HostPorts are the list of ports to expose - on the host. - items: - description: HostPort exposes an nginx container port - on the host. - properties: - containerPort: - description: ContainerPort is the port on the nginx - container to map to the HostPort. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - port: - description: Port to expose on the host. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - containerPort - - port - type: object - type: array - image: - description: Image is the NGINX image to use. - properties: - pullPolicy: - default: IfNotPresent - description: PullPolicy describes a policy for if/when - to pull a container image. - enum: - - Always - - Never - - IfNotPresent - type: string - repository: - description: |- - Repository is the image path. - Default is ghcr.io/nginx/nginx-gateway-fabric/nginx. - type: string - tag: - description: Tag is the image tag to use. Default - matches the tag of the control plane. - type: string - type: object - lifecycle: - description: |- - Lifecycle describes actions that the management system should take in response to container lifecycle - events. For the PostStart and PreStop lifecycle handlers, management of the container blocks - until the action is complete, unless the container process fails, in which case the handler is aborted. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP GET request - to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration that - the container should sleep. - properties: - seconds: - description: Seconds is the number of seconds - to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP GET request - to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the - request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom - header to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration that - the container should sleep. - properties: - seconds: - description: Seconds is the number of seconds - to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name to connect - to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - readinessProbe: - description: ReadinessProbe defines the readiness probe - for the NGINX container. - properties: - initialDelaySeconds: - description: |- - InitialDelaySeconds is the number of seconds after the container has - started before the readiness probe is initiated. - If not specified, the default is 3 seconds. - format: int32 - maximum: 3600 - minimum: 0 - type: integer - port: - description: |- - Port is the port on which the readiness endpoint is exposed. - If not specified, the default port is 8081. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - type: object - resources: - description: Resources describes the compute resource - requirements. - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry - in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - volumeMounts: - description: VolumeMounts describe the mounting of Volumes - within a container. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - type: object - patches: - description: Patches are custom patches to apply to the NGINX - Deployment. - items: - description: Patch defines a patch to apply to a Kubernetes - object. - properties: - type: - default: StrategicMerge - description: Type is the type of patch. Defaults to - StrategicMerge. - enum: - - StrategicMerge - - Merge - - JSONPatch - type: string - value: - description: |- - Value is the patch data as raw JSON. - For StrategicMerge and Merge patches, this should be a JSON object. - For JSONPatch patches, this should be a JSON array of patch operations. - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - pod: - description: Pod defines Pod-specific fields. - properties: - affinity: - description: Affinity is the pod's scheduling constraints. - properties: - nodeAffinity: - description: Describes node affinity scheduling rules - for the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated - with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector - requirements by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching - the corresponding nodeSelectorTerm, in - the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector - terms. The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector - requirements by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules - (e.g. co-locate this pod in the same node, zone, - etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added per-node - to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling - rules (e.g. avoid putting this pod in the same node, - zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and subtracting - "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added per-node - to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - nodeSelector: - additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - type: object - terminationGracePeriodSeconds: - description: |- - TerminationGracePeriodSeconds is the optional duration in seconds the pod needs to terminate gracefully. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - If this value is nil, the default grace period will be used instead. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - Defaults to 30 seconds. - format: int64 - type: integer - tolerations: - description: Tolerations allow the scheduler to schedule - Pods with matching taints. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints describes how a group of Pods ought to spread across topology - domains. Scheduler will schedule Pods in a way which abides by the constraints. - All topologySpreadConstraints are ANDed. - items: - description: TopologySpreadConstraint specifies how - to spread matching pods among the given topology. - properties: - labelSelector: - description: |- - LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine the number of pods - in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select the pods over which - spreading will be calculated. The keys are used to lookup values from the - incoming pod labels, those key-value labels are ANDed with labelSelector - to select the group of existing pods over which spreading will be calculated - for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - MatchLabelKeys cannot be set when LabelSelector isn't set. - Keys that don't exist in the incoming pod labels will - be ignored. A null or empty list means only match against labelSelector. - - This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: |- - MaxSkew describes the degree to which pods may be unevenly distributed. - When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference - between the number of matching pods in the target topology and the global minimum. - The global minimum is the minimum number of matching pods in an eligible domain - or zero if the number of eligible domains is less than MinDomains. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 2/2/1: - In this case, the global minimum is 1. - | zone1 | zone2 | zone3 | - | P P | P P | P | - - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) - violate MaxSkew(1). - - if MaxSkew is 2, incoming pod can be scheduled onto any zone. - When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence - to topologies that satisfy it. - It's a required field. Default value is 1 and 0 is not allowed. - format: int32 - type: integer - minDomains: - description: |- - MinDomains indicates a minimum number of eligible domains. - When the number of eligible domains with matching topology keys is less than minDomains, - Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - And when the number of eligible domains with matching topology keys equals or greater than minDomains, - this value has no effect on scheduling. - As a result, when the number of eligible domains is less than minDomains, - scheduler won't schedule more than maxSkew Pods to those domains. - If value is nil, the constraint behaves as if MinDomains is equal to 1. - Valid values are integers greater than 0. - When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - - For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - labelSelector spread as 2/2/2: - | zone1 | zone2 | zone3 | - | P P | P P | P P | - The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - In this situation, new pod with the same labelSelector cannot be scheduled, - because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - it will violate MaxSkew. - format: int32 - type: integer - nodeAffinityPolicy: - description: |- - NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector - when calculating pod topology spread skew. Options are: - - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. - - If this value is nil, the behavior is equivalent to the Honor policy. - type: string - nodeTaintsPolicy: - description: |- - NodeTaintsPolicy indicates how we will treat node taints when calculating - pod topology spread skew. Options are: - - Honor: nodes without taints, along with tainted nodes for which the incoming pod - has a toleration, are included. - - Ignore: node taints are ignored. All nodes are included. - - If this value is nil, the behavior is equivalent to the Ignore policy. - type: string - topologyKey: - description: |- - TopologyKey is the key of node labels. Nodes that have a label with this key - and identical values are considered to be in the same topology. - We consider each as a "bucket", and try to put balanced number - of pods into each bucket. - We define a domain as a particular instance of a topology. - Also, we define an eligible domain as a domain whose nodes meet the requirements of - nodeAffinityPolicy and nodeTaintsPolicy. - e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. - It's a required field. - type: string - whenUnsatisfiable: - description: |- - WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy - the spread constraint. - - DoNotSchedule (default) tells the scheduler not to schedule it. - - ScheduleAnyway tells the scheduler to schedule the pod in any location, - but giving higher precedence to topologies that would help reduce the - skew. - A constraint is considered "Unsatisfiable" for an incoming pod - if and only if every possible node assignment for that pod would violate - "MaxSkew" on some topology. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 3/1/1: - | zone1 | zone2 | zone3 | - | P P P | P | P | - If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled - to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies - MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler - won't make it *more* imbalanced. - It's a required field. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - volumes: - description: Volumes represents named volumes in a pod - that may be accessed by any container in the pod. - items: - description: Volume represents a named volume in a pod - that may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: |- - awsElasticBlockStore represents an AWS Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree - awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - properties: - fsType: - description: |- - fsType is the filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: string - partition: - description: |- - partition is the partition in the volume that you want to mount. - If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition as "1". - Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - format: int32 - type: integer - readOnly: - description: |- - readOnly value true will force the readOnly setting in VolumeMounts. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: boolean - volumeID: - description: |- - volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: string - required: - - volumeID - type: object - azureDisk: - description: |- - azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type - are redirected to the disk.csi.azure.com CSI driver. - properties: - cachingMode: - description: 'cachingMode is the Host Caching - mode: None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data - disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk - in the blob storage - type: string - fsType: - default: ext4 - description: |- - fsType is Filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are Shared: - multiple blob disks per storage account Dedicated: - single blob disk per storage account Managed: - azure managed data disk (only in managed availability - set). defaults to shared' - type: string - readOnly: - default: false - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: |- - azureFile represents an Azure File Service mount on the host and bind mount to the pod. - Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type - are redirected to the file.csi.azure.com CSI driver. - properties: - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret - that contains Azure Storage Account Name and - Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: |- - cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. - Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. - properties: - monitors: - description: |- - monitors is Required: Monitors is a collection of Ceph monitors - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - path: - description: 'path is Optional: Used as the - mounted root, rather than the full Ceph tree, - default is /' - type: string - readOnly: - description: |- - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - type: boolean - secretFile: - description: |- - secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - type: string - secretRef: - description: |- - secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: |- - user is optional: User is the rados user name, default is admin - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - type: string - required: - - monitors - type: object - cinder: - description: |- - cinder represents a cinder volume attached and mounted on kubelets host machine. - Deprecated: Cinder is deprecated. All operations for the in-tree cinder type - are redirected to the cinder.csi.openstack.org CSI driver. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: boolean - secretRef: - description: |- - secretRef is optional: points to a secret object containing parameters used to connect - to OpenStack. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: |- - volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that - should populate this volume - properties: - defaultMode: - description: |- - defaultMode is optional: mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - Defaults to 0644. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - items: - description: |- - items if unspecified, each key-value pair in the Data field of the referenced - ConfigMap will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents - ephemeral storage that is handled by certain external - CSI drivers. - properties: - driver: - description: |- - driver is the name of the CSI driver that handles this volume. - Consult with your admin for the correct name as registered in the cluster. - type: string - fsType: - description: |- - fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the associated CSI driver - which will determine the default filesystem to apply. - type: string - nodePublishSecretRef: - description: |- - nodePublishSecretRef is a reference to the secret object containing - sensitive information to pass to the CSI driver to complete the CSI - NodePublishVolume and NodeUnpublishVolume calls. - This field is optional, and may be empty if no secret is required. If the - secret object contains more than one secret, all secret references are passed. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: |- - readOnly specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: |- - volumeAttributes stores driver-specific properties that are passed to the CSI - driver. Consult your driver's documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API - about the pod that should populate this volume - properties: - defaultMode: - description: |- - Optional: mode bits to use on created files by default. Must be a - Optional: mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - Defaults to 0644. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - items: - description: Items is a list of downward API - volume file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name, namespace and uid are supported.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: |- - Optional: mode bits used to set permissions on this file, must be an octal value - between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. - Must not be absolute or contain the - ''..'' path. Must be utf-8 encoded. - The first item of the relative path - must not start with ''..''' - type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - x-kubernetes-list-type: atomic - type: object - emptyDir: - description: |- - emptyDir represents a temporary directory that shares a pod's lifetime. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: |- - ephemeral represents a volume that is handled by a cluster storage driver. - The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, - and deleted when the pod is removed. - - Use this if: - a) the volume is only needed while the pod runs, - b) features of normal volumes like restoring from snapshot or capacity - tracking are needed, - c) the storage driver is specified through a storage class, and - d) the storage driver supports dynamic volume provisioning through - a PersistentVolumeClaim (see EphemeralVolumeSource for more - information on the connection between this volume type - and PersistentVolumeClaim). - - Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. - - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to - be used that way - see the documentation of the driver for - more information. - - A pod can use both types of ephemeral volumes and - persistent volumes at the same time. - properties: - volumeClaimTemplate: - description: |- - Will be used to create a stand-alone PVC to provision the volume. - The pod in which this EphemeralVolumeSource is embedded will be the - owner of the PVC, i.e. the PVC will be deleted together with the - pod. The name of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` array - entry. Pod validation will reject the pod if the concatenated name - is not valid for a PVC (for example, too long). - - An existing PVC with that name that is not owned by the pod - will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC is - meant to be used by the pod, the PVC has to updated with an - owner reference to the pod once the pod exists. Normally - this should not be necessary, but it may be useful when - manually reconstructing a broken cluster. - - This field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. - - Required, must not be nil. - properties: - metadata: - description: |- - May contain labels and annotations that will be copied into the PVC - when creating it. No other fields are allowed and will be rejected during - validation. - type: object - spec: - description: |- - The specification for the PersistentVolumeClaim. The entire content is - copied unchanged into the PVC that gets created from this - template. The same fields as in a PersistentVolumeClaim - are also valid here. - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of - resource being referenced - type: string - name: - description: Name is the name of - resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of - resource being referenced - type: string - name: - description: Name is the name of - resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query - over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding - reference to the PersistentVolume - backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource - that is attached to a kubelet's host machine and - then exposed to the pod. - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - lun: - description: 'lun is Optional: FC target lun - number' - format: int32 - type: integer - readOnly: - description: |- - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target - worldwide names (WWNs)' - items: - type: string - type: array - x-kubernetes-list-type: atomic - wwids: - description: |- - wwids Optional: FC volume world wide identifiers (wwids) - Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - flexVolume: - description: |- - flexVolume represents a generic volume resource that is - provisioned/attached using an exec based plugin. - Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. - properties: - driver: - description: driver is the name of the driver - to use for this volume. - type: string - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field - holds extra command options if any.' - type: object - readOnly: - description: |- - readOnly is Optional: defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef is Optional: secretRef is reference to the secret object containing - sensitive information to pass to the plugin scripts. This may be - empty if no secret object is specified. If the secret object - contains more than one secret, all secrets are passed to the plugin - scripts. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: |- - flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. - Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. - properties: - datasetName: - description: |- - datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker - should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the - dataset. This is unique identifier of a Flocker - dataset - type: string - type: object - gcePersistentDisk: - description: |- - gcePersistentDisk represents a GCE Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree - gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - properties: - fsType: - description: |- - fsType is filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: string - partition: - description: |- - partition is the partition in the volume that you want to mount. - If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition as "1". - Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - format: int32 - type: integer - pdName: - description: |- - pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: string - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: boolean - required: - - pdName - type: object - gitRepo: - description: |- - gitRepo represents a git repository at a particular revision. - Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an - EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir - into the Pod's container. - properties: - directory: - description: |- - directory is the target directory name. - Must not contain or start with '..'. If '.' is supplied, the volume directory will be the - git repository. Otherwise, if specified, the volume will contain the git repository in - the subdirectory with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for - the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: |- - glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. - Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. - properties: - endpoints: - description: endpoints is the endpoint name - that details Glusterfs topology. - type: string - path: - description: |- - path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - type: string - readOnly: - description: |- - readOnly here will force the Glusterfs volume to be mounted with read-only permissions. - Defaults to false. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: |- - hostPath represents a pre-existing file or directory on the host - machine that is directly exposed to the container. This is generally - used for system agents or other privileged things that are allowed - to see the host machine. Most containers will NOT need this. - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - properties: - path: - description: |- - path of the directory on the host. - If the path is a symlink, it will follow the link to the real path. - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - type: string - type: - description: |- - type for HostPath Volume - Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - type: string - required: - - path - type: object - image: - description: |- - image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. - The volume is resolved at pod startup depending on which PullPolicy value is provided: - - - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - - The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. - A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. - The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. - The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. - The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. - The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. - properties: - pullPolicy: - description: |- - Policy for pulling OCI objects. Possible values are: - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. - type: string - reference: - description: |- - Required: Image or artifact reference to be used. - Behaves in the same way as pod.spec.containers[*].image. - Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. - More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management to default or override - container images in workload controllers like Deployments and StatefulSets. - type: string - type: object - iscsi: - description: |- - iscsi represents an ISCSI Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether - support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether - support iSCSI Session CHAP authentication - type: boolean - fsType: - description: |- - fsType is the filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - type: string - initiatorName: - description: |- - initiatorName is the custom iSCSI Initiator Name. - If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified - Name. - type: string - iscsiInterface: - default: default - description: |- - iscsiInterface is the interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun - number. - format: int32 - type: integer - portals: - description: |- - portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port - is other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - x-kubernetes-list-type: atomic - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for - iSCSI target and initiator authentication - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: |- - targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port - is other than default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: |- - name of the volume. - Must be a DNS_LABEL and unique within the pod. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - nfs: - description: |- - nfs represents an NFS mount on the host that shares a pod's lifetime - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - properties: - path: - description: |- - path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - readOnly: - description: |- - readOnly here will force the NFS export to be mounted with read-only permissions. - Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: boolean - server: - description: |- - server is the hostname or IP address of the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: |- - persistentVolumeClaimVolumeSource represents a reference to a - PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - claimName: - description: |- - claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - type: string - readOnly: - description: |- - readOnly Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: |- - photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. - Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: pdID is the ID that identifies - Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: |- - portworxVolume represents a portworx volume attached and mounted on kubelets host machine. - Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type - are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate - is on. - properties: - fsType: - description: |- - fSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a - Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources - secrets, configmaps, and downward API - properties: - defaultMode: - description: |- - defaultMode are the mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - sources: - description: |- - sources is the list of volume projections. Each entry in this list - handles one source. - items: - description: |- - Projection that may be projected along with other supported volume types. - Exactly one of these fields must be set. - properties: - clusterTrustBundle: - description: |- - ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field - of ClusterTrustBundle objects in an auto-updating file. - - Alpha, gated by the ClusterTrustBundleProjection feature gate. - - ClusterTrustBundle objects can either be selected by name, or by the - combination of signer name and a label selector. - - Kubelet performs aggressive normalization of the PEM contents written - into the pod filesystem. Esoteric PEM features such as inter-block - comments and block headers are stripped. Certificates are deduplicated. - The ordering of certificates within the file is arbitrary, and Kubelet - may change the order over time. - properties: - labelSelector: - description: |- - Select all ClusterTrustBundles that match this label selector. Only has - effect if signerName is set. Mutually-exclusive with name. If unset, - interpreted as "match nothing". If set but empty, interpreted as "match - everything". - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: |- - Select a single ClusterTrustBundle by object name. Mutually-exclusive - with signerName and labelSelector. - type: string - optional: - description: |- - If true, don't block pod startup if the referenced ClusterTrustBundle(s) - aren't available. If using name, then the named ClusterTrustBundle is - allowed not to exist. If using signerName, then the combination of - signerName and labelSelector is allowed to match zero - ClusterTrustBundles. - type: boolean - path: - description: Relative path from the - volume root to write the bundle. - type: string - signerName: - description: |- - Select all ClusterTrustBundles that match this signer name. - Mutually-exclusive with name. The contents of all selected - ClusterTrustBundles will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information about - the configMap data to project - properties: - items: - description: |- - items if unspecified, each key-value pair in the Data field of the referenced - ConfigMap will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to - a path within a volume. - properties: - key: - description: key is the key - to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: optional specify whether - the ConfigMap or its keys must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about - the downwardAPI data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile - represents information to create - the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only annotations, - labels, name, namespace and - uid are supported.' - properties: - apiVersion: - description: Version of - the schema the FieldPath - is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the - field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: |- - Optional: mode bits used to set permissions on this file, must be an octal value - between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: Path - is the relative path name - of the file to be created. - Must not be absolute or contain - the ''..'' path. Must be utf-8 - encoded. The first item of - the relative path must not - start with ''..''' - type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container - name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the - output format of the exposed - resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podCertificate: - description: |- - Projects an auto-rotating credential bundle (private key and certificate - chain) that the pod can use either as a TLS client or server. - - Kubelet generates a private key and uses it to send a - PodCertificateRequest to the named signer. Once the signer approves the - request and issues a certificate chain, Kubelet writes the key and - certificate chain to the pod filesystem. The pod does not start until - certificates have been issued for each podCertificate projected volume - source in its spec. - - Kubelet will begin trying to rotate the certificate at the time indicated - by the signer using the PodCertificateRequest.Status.BeginRefreshAt - timestamp. - - Kubelet can write a single file, indicated by the credentialBundlePath - field, or separate files, indicated by the keyPath and - certificateChainPath fields. - - The credential bundle is a single file in PEM format. The first PEM - entry is the private key (in PKCS#8 format), and the remaining PEM - entries are the certificate chain issued by the signer (typically, - signers will return their certificate chain in leaf-to-root order). - - Prefer using the credential bundle format, since your application code - can read it atomically. If you use keyPath and certificateChainPath, - your application must make two separate file reads. If these coincide - with a certificate rotation, it is possible that the private key and leaf - certificate you read may not correspond to each other. Your application - will need to check for this condition, and re-read until they are - consistent. - - The named signer controls chooses the format of the certificate it - issues; consult the signer implementation's documentation to learn how to - use the certificates it issues. - properties: - certificateChainPath: - description: |- - Write the certificate chain at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - credentialBundlePath: - description: |- - Write the credential bundle at this path in the projected volume. - - The credential bundle is a single file that contains multiple PEM blocks. - The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private - key. - - The remaining blocks are CERTIFICATE blocks, containing the issued - certificate chain from the signer (leaf and any intermediates). - - Using credentialBundlePath lets your Pod's application code make a single - atomic read that retrieves a consistent key and certificate chain. If you - project them to separate files, your application code will need to - additionally check that the leaf certificate was issued to the key. - type: string - keyPath: - description: |- - Write the key at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - keyType: - description: |- - The type of keypair Kubelet will generate for the pod. - - Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", - "ECDSAP521", and "ED25519". - type: string - maxExpirationSeconds: - description: |- - maxExpirationSeconds is the maximum lifetime permitted for the - certificate. - - Kubelet copies this value verbatim into the PodCertificateRequests it - generates for this projection. - - If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver - will reject values shorter than 3600 (1 hour). The maximum allowable - value is 7862400 (91 days). - - The signer implementation is then free to issue a certificate with any - lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 - seconds (1 hour). This constraint is enforced by kube-apiserver. - `kubernetes.io` signers will never issue certificates with a lifetime - longer than 24 hours. - format: int32 - type: integer - signerName: - description: Kubelet's generated CSRs - will be addressed to this signer. - type: string - required: - - keyType - - signerName - type: object - secret: - description: secret information about - the secret data to project - properties: - items: - description: |- - items if unspecified, each key-value pair in the Data field of the referenced - Secret will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to - a path within a volume. - properties: - key: - description: key is the key - to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: optional field specify - whether the Secret or its key must - be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information - about the serviceAccountToken data to - project - properties: - audience: - description: |- - audience is the intended audience of the token. A recipient of a token - must identify itself with an identifier specified in the audience of the - token, and otherwise should reject the token. The audience defaults to the - identifier of the apiserver. - type: string - expirationSeconds: - description: |- - expirationSeconds is the requested duration of validity of the service - account token. As the token approaches expiration, the kubelet volume - plugin will proactively rotate the service account token. The kubelet will - start trying to rotate the token if the token is older than 80 percent of - its time to live or if the token is older than 24 hours.Defaults to 1 hour - and must be at least 10 minutes. - format: int64 - type: integer - path: - description: |- - path is the path relative to the mount point of the file to project the - token into. - type: string - required: - - path - type: object - type: object - type: array - x-kubernetes-list-type: atomic - type: object - quobyte: - description: |- - quobyte represents a Quobyte mount on the host that shares a pod's lifetime. - Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. - properties: - group: - description: |- - group to map volume access to - Default is no group - type: string - readOnly: - description: |- - readOnly here will force the Quobyte volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: |- - registry represents a single or multiple Quobyte Registry services - specified as a string as host:port pair (multiple entries are separated with commas) - which acts as the central registry for volumes - type: string - tenant: - description: |- - tenant owning the given Quobyte volume in the Backend - Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: |- - user to map volume access to - Defaults to serivceaccount user - type: string - volume: - description: volume is a string that references - an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: |- - rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. - Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. - properties: - fsType: - description: |- - fsType is the filesystem type of the volume that you want to mount. - Tip: Ensure that the filesystem type is supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - type: string - image: - description: |- - image is the rados image name. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - keyring: - default: /etc/ceph/keyring - description: |- - keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - monitors: - description: |- - monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - pool: - default: rbd - description: |- - pool is the rados pool name. - Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: boolean - secretRef: - description: |- - secretRef is name of the authentication secret for RBDUser. If provided - overrides keyring. - Default is nil. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - user: - default: admin - description: |- - user is the rados user name. - Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - required: - - image - - monitors - type: object - scaleIO: - description: |- - scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. - properties: - fsType: - default: xfs - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". - Default is "xfs". - type: string - gateway: - description: gateway is the host address of - the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of - the ScaleIO Protection Domain for the configured - storage. - type: string - readOnly: - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef references to the secret for ScaleIO user and other - sensitive information. If this is not provided, Login operation will fail. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable - SSL communication with Gateway, default false - type: boolean - storageMode: - default: ThinProvisioned - description: |- - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage - Pool associated with the protection domain. - type: string - system: - description: system is the name of the storage - system as configured in ScaleIO. - type: string - volumeName: - description: |- - volumeName is the name of a volume already created in the ScaleIO system - that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: |- - secret represents a secret that should populate this volume. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - properties: - defaultMode: - description: |- - defaultMode is Optional: mode bits used to set permissions on created files by default. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values - for mode bits. Defaults to 0644. - Directories within the path are not affected by this setting. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - items: - description: |- - items If unspecified, each key-value pair in the Data field of the referenced - Secret will be projected into the volume as a file whose name is the - key and content is the value. If specified, the listed keys will be - projected into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: |- - mode is Optional: mode bits used to set permissions on this file. - Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - If not specified, the volume defaultMode will be used. - This might be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - path: - description: |- - path is the relative path of the file to map the key to. - May not be an absolute path. - May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - optional: - description: optional field specify whether - the Secret or its keys must be defined - type: boolean - secretName: - description: |- - secretName is the name of the secret in the pod's namespace to use. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - type: string - type: object - storageos: - description: |- - storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. - properties: - fsType: - description: |- - fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef specifies the secret to use for obtaining the StorageOS API - credentials. If not specified, default values will be attempted. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: |- - volumeName is the human-readable name of the StorageOS volume. Volume - names are only unique within a namespace. - type: string - volumeNamespace: - description: |- - volumeNamespace specifies the scope of the volume within StorageOS. If no - namespace is specified then the Pod's namespace will be used. This allows the - Kubernetes name scoping to be mirrored within StorageOS for tighter integration. - Set VolumeName to any name to override the default behaviour. - Set to "default" if you are not using namespaces within StorageOS. - Namespaces that do not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: |- - vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. - Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type - are redirected to the csi.vsphere.vmware.com CSI driver. - properties: - fsType: - description: |- - fsType is filesystem type to mount. - Must be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage - Policy Based Management (SPBM) profile ID - associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage - Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies - vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - replicas: - description: Number of desired Pods. - format: int32 - type: integer - type: object - service: - description: Service is the configuration for the NGINX Service. - properties: - externalTrafficPolicy: - default: Local - description: |- - ExternalTrafficPolicy describes how nodes distribute service traffic they - receive on one of the Service's "externally-facing" addresses (NodePorts, ExternalIPs, - and LoadBalancer IPs. - enum: - - Cluster - - Local - type: string - loadBalancerClass: - description: |- - LoadBalancerClass is the class of the load balancer implementation this Service belongs to. - Requires service type to be LoadBalancer. - type: string - loadBalancerIP: - description: LoadBalancerIP is a static IP address for the - load balancer. Requires service type to be LoadBalancer. - type: string - loadBalancerSourceRanges: - description: |- - LoadBalancerSourceRanges are the IP ranges (CIDR) that are allowed to access the load balancer. - Requires service type to be LoadBalancer. - items: - type: string - type: array - nodePorts: - description: |- - NodePorts are the list of NodePorts to expose on the NGINX data plane service. - Each NodePort MUST map to a Gateway listener port, otherwise it will be ignored. - The default NodePort range enforced by Kubernetes is 30000-32767. - items: - description: |- - NodePort creates a port on each node on which the NGINX data plane service is exposed. The NodePort MUST - map to a Gateway listener port, otherwise it will be ignored. If not specified, Kubernetes allocates a NodePort - automatically if required. The default NodePort range enforced by Kubernetes is 30000-32767. - properties: - listenerPort: - description: ListenerPort is the Gateway listener port - that this NodePort maps to. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - port: - description: Port is the NodePort to expose. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - listenerPort - - port - type: object - type: array - patches: - description: Patches are custom patches to apply to the NGINX - Service. - items: - description: Patch defines a patch to apply to a Kubernetes - object. - properties: - type: - default: StrategicMerge - description: Type is the type of patch. Defaults to - StrategicMerge. - enum: - - StrategicMerge - - Merge - - JSONPatch - type: string - value: - description: |- - Value is the patch data as raw JSON. - For StrategicMerge and Merge patches, this should be a JSON object. - For JSONPatch patches, this should be a JSON array of patch operations. - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - type: - default: LoadBalancer - description: ServiceType describes ingress method for the - Service. - enum: - - ClusterIP - - LoadBalancer - - NodePort - type: string - type: object - type: object - x-kubernetes-validations: - - message: only one of deployment or daemonSet can be set - rule: (!has(self.deployment) && !has(self.daemonSet)) || ((has(self.deployment) - && !has(self.daemonSet)) || (!has(self.deployment) && has(self.daemonSet))) - logging: - description: Logging defines logging related settings for NGINX. - properties: - agentLevel: - default: info - description: |- - AgentLevel defines the log level of the NGINX agent process. Changing this value results in a - re-roll of the NGINX deployment. - enum: - - debug - - info - - error - - panic - - fatal - type: string - errorLevel: - default: info - description: |- - ErrorLevel defines the error log level. Possible log levels listed in order of increasing severity are - debug, info, notice, warn, error, crit, alert, and emerg. Setting a certain log level will cause all messages - of the specified and more severe log levels to be logged. For example, the log level 'error' will cause error, - crit, alert, and emerg messages to be logged. https://nginx.org/en/docs/ngx_core_module.html#error_log - enum: - - debug - - info - - notice - - warn - - error - - crit - - alert - - emerg - type: string - type: object - metrics: - description: |- - Metrics defines the configuration for Prometheus scraping metrics. Changing this value results in a - re-roll of the NGINX deployment. - properties: - disable: - description: Disable serving Prometheus metrics on the listen - port. - type: boolean - port: - description: Port where the Prometheus metrics are exposed. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - type: object - nginxPlus: - description: NginxPlus specifies NGINX Plus additional settings. - properties: - allowedAddresses: - description: AllowedAddresses specifies IPAddresses or CIDR blocks - to the allow list for accessing the NGINX Plus API. - items: - description: NginxPlusAllowAddress specifies the address type - and value for an NginxPlus allow address. - properties: - type: - description: Type specifies the type of address. - enum: - - CIDR - - IPAddress - type: string - value: - description: Value specifies the address value. - type: string - required: - - type - - value - type: object - type: array - type: object - rewriteClientIP: - description: RewriteClientIP defines configuration for rewriting the - client IP to the original client's IP. - properties: - mode: - description: |- - Mode defines how NGINX will rewrite the client's IP address. - There are two possible modes: - - ProxyProtocol: NGINX will rewrite the client's IP using the PROXY protocol header. - - XForwardedFor: NGINX will rewrite the client's IP using the X-Forwarded-For header. - Sets NGINX directive real_ip_header: https://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header - enum: - - ProxyProtocol - - XForwardedFor - type: string - setIPRecursively: - description: |- - SetIPRecursively configures whether recursive search is used when selecting the client's address from - the X-Forwarded-For header. It is used in conjunction with TrustedAddresses. - If enabled, NGINX will recurse on the values in X-Forwarded-Header from the end of array - to start of array and select the first untrusted IP. - For example, if X-Forwarded-For is [11.11.11.11, 22.22.22.22, 55.55.55.1], - and TrustedAddresses is set to 55.55.55.1/32, NGINX will rewrite the client IP to 22.22.22.22. - If disabled, NGINX will select the IP at the end of the array. - In the previous example, 55.55.55.1 would be selected. - Sets NGINX directive real_ip_recursive: https://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_recursive - type: boolean - trustedAddresses: - description: |- - TrustedAddresses specifies the addresses that are trusted to send correct client IP information. - If a request comes from a trusted address, NGINX will rewrite the client IP information, - and forward it to the backend in the X-Forwarded-For* and X-Real-IP headers. - If the request does not come from a trusted address, NGINX will not rewrite the client IP information. - To trust all addresses (not recommended for production), set to 0.0.0.0/0. - If no addresses are provided, NGINX will not rewrite the client IP information. - Sets NGINX directive set_real_ip_from: https://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from - This field is required if mode is set. - items: - description: RewriteClientIPAddress specifies the address type - and value for a RewriteClientIP address. - properties: - type: - description: Type specifies the type of address. - enum: - - CIDR - - IPAddress - - Hostname - type: string - value: - description: Value specifies the address value. - type: string - required: - - type - - value - type: object - maxItems: 16 - type: array - type: object - x-kubernetes-validations: - - message: if mode is set, trustedAddresses is a required field - rule: '!(has(self.mode) && (!has(self.trustedAddresses) || size(self.trustedAddresses) - == 0))' - telemetry: - description: Telemetry specifies the OpenTelemetry configuration. - properties: - disabledFeatures: - description: DisabledFeatures specifies OpenTelemetry features - to be disabled. - items: - description: DisableTelemetryFeature is a telemetry feature - that can be disabled. - enum: - - DisableTracing - type: string - type: array - exporter: - description: Exporter specifies OpenTelemetry export parameters. - properties: - batchCount: - description: |- - BatchCount is the number of pending batches per worker, spans exceeding the limit are dropped. - Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter - format: int32 - minimum: 0 - type: integer - batchSize: - description: |- - BatchSize is the maximum number of spans to be sent in one batch per worker. - Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter - format: int32 - minimum: 0 - type: integer - endpoint: - description: |- - Endpoint is the address of OTLP/gRPC endpoint that will accept telemetry data. - Format: alphanumeric hostname with optional http scheme and optional port. - pattern: ^(?:http?:\/\/)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(?::\d{1,5})?$ - type: string - interval: - description: |- - Interval is the maximum interval between two exports. - Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - type: object - serviceName: - description: |- - ServiceName is the "service.name" attribute of the OpenTelemetry resource. - Default is 'ngf::'. If a value is provided by the user, - then the default becomes a prefix to that value. - maxLength: 127 - pattern: ^[a-zA-Z0-9_-]+$ - type: string - spanAttributes: - description: SpanAttributes are custom key/value attributes that - are added to each span. - items: - description: SpanAttribute is a key value pair to be added to - a tracing span. - properties: - key: - description: |- - Key is the key for a span attribute. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - value: - description: |- - Value is the value for a span attribute. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - required: - - key - - value - type: object - maxItems: 64 - type: array - x-kubernetes-list-map-keys: - - key - x-kubernetes-list-type: map - type: object - workerConnections: - description: |- - WorkerConnections specifies the maximum number of simultaneous connections that can be opened by a worker process. - Default is 1024. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: {} diff --git a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_observabilitypolicies.yaml b/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_observabilitypolicies.yaml deleted file mode 100644 index cfdb8a5e2c..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_observabilitypolicies.yaml +++ /dev/null @@ -1,941 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.19.0 - labels: - gateway.networking.k8s.io/policy: direct - name: observabilitypolicies.gateway.nginx.org -spec: - group: gateway.nginx.org - names: - categories: - - nginx-gateway-fabric - kind: ObservabilityPolicy - listKind: ObservabilityPolicyList - plural: observabilitypolicies - singular: observabilitypolicy - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - deprecationWarning: The 'v1alpha1' version of ObservabilityPolicy API is deprecated, - please migrate to 'v1alpha2'. - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - ObservabilityPolicy is a Direct Attached Policy. It provides a way to configure observability settings for - the NGINX Gateway Fabric data plane. Used in conjunction with the NginxProxy CRD that is attached to the - GatewayClass parametersRef. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of the ObservabilityPolicy. - properties: - targetRefs: - description: |- - TargetRefs identifies the API object(s) to apply the policy to. - Objects must be in the same namespace as the policy. - Support: HTTPRoute, GRPCRoute. - items: - description: |- - LocalPolicyTargetReference identifies an API object to apply a direct or - inherited policy to. This should be used as part of Policy resources - that can target Gateway API resources. For more information on how this - policy attachment model works, and a sample Policy resource, refer to - the policy attachment documentation for Gateway API. - properties: - group: - description: Group is the group of the target resource. - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - description: Kind is kind of the target resource. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: Name is the name of the target resource. - maxLength: 253 - minLength: 1 - type: string - required: - - group - - kind - - name - type: object - maxItems: 16 - minItems: 1 - type: array - x-kubernetes-validations: - - message: 'TargetRef Kind must be: HTTPRoute or GRPCRoute' - rule: (self.exists(t, t.kind=='HTTPRoute') || self.exists(t, t.kind=='GRPCRoute')) - - message: TargetRef Group must be gateway.networking.k8s.io - rule: self.all(t, t.group=='gateway.networking.k8s.io') - tracing: - description: Tracing allows for enabling and configuring tracing. - properties: - context: - description: |- - Context specifies how to propagate traceparent/tracestate headers. - Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_trace_context - enum: - - extract - - inject - - propagate - - ignore - type: string - ratio: - description: |- - Ratio is the percentage of traffic that should be sampled. Integer from 0 to 100. - By default, 100% of http requests are traced. Not applicable for parent-based tracing. - If ratio is set to 0, tracing is disabled. - format: int32 - maximum: 100 - minimum: 0 - type: integer - spanAttributes: - description: SpanAttributes are custom key/value attributes that - are added to each span. - items: - description: SpanAttribute is a key value pair to be added to - a tracing span. - properties: - key: - description: |- - Key is the key for a span attribute. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - value: - description: |- - Value is the value for a span attribute. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - required: - - key - - value - type: object - maxItems: 64 - type: array - x-kubernetes-list-map-keys: - - key - x-kubernetes-list-type: map - spanName: - description: |- - SpanName defines the name of the Otel span. By default is the name of the location for a request. - If specified, applies to all locations that are created for a route. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - Examples of invalid names: some-$value, quoted-"value"-name, unescaped\ - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - strategy: - description: Strategy defines if tracing is ratio-based or parent-based. - enum: - - ratio - - parent - type: string - required: - - strategy - type: object - x-kubernetes-validations: - - message: ratio can only be specified if strategy is of type ratio - rule: '!(has(self.ratio) && self.strategy != ''ratio'')' - required: - - targetRefs - type: object - status: - description: Status defines the state of the ObservabilityPolicy. - properties: - ancestors: - description: |- - Ancestors is a list of ancestor resources (usually Gateways) that are - associated with the policy, and the status of the policy with respect to - each ancestor. When this policy attaches to a parent, the controller that - manages the parent and the ancestors MUST add an entry to this list when - the controller first sees the policy and SHOULD update the entry as - appropriate when the relevant ancestor is modified. - - Note that choosing the relevant ancestor is left to the Policy designers; - an important part of Policy design is designing the right object level at - which to namespace this status. - - Note also that implementations MUST ONLY populate ancestor status for - the Ancestor resources they are responsible for. Implementations MUST - use the ControllerName field to uniquely identify the entries in this list - that they are responsible for. - - Note that to achieve this, the list of PolicyAncestorStatus structs - MUST be treated as a map with a composite key, made up of the AncestorRef - and ControllerName fields combined. - - A maximum of 16 ancestors will be represented in this list. An empty list - means the Policy is not relevant for any ancestors. - - If this slice is full, implementations MUST NOT add further entries. - Instead they MUST consider the policy unimplementable and signal that - on any related resources such as the ancestor that would be referenced - here. For example, if this list was full on BackendTLSPolicy, no - additional Gateways would be able to reference the Service targeted by - the BackendTLSPolicy. - items: - description: |- - PolicyAncestorStatus describes the status of a route with respect to an - associated Ancestor. - - Ancestors refer to objects that are either the Target of a policy or above it - in terms of object hierarchy. For example, if a policy targets a Service, the - Policy's Ancestors are, in order, the Service, the HTTPRoute, the Gateway, and - the GatewayClass. Almost always, in this hierarchy, the Gateway will be the most - useful object to place Policy status on, so we recommend that implementations - SHOULD use Gateway as the PolicyAncestorStatus object unless the designers - have a _very_ good reason otherwise. - - In the context of policy attachment, the Ancestor is used to distinguish which - resource results in a distinct application of this policy. For example, if a policy - targets a Service, it may have a distinct result per attached Gateway. - - Policies targeting the same resource may have different effects depending on the - ancestors of those resources. For example, different Gateways targeting the same - Service may have different capabilities, especially if they have different underlying - implementations. - - For example, in BackendTLSPolicy, the Policy attaches to a Service that is - used as a backend in a HTTPRoute that is itself attached to a Gateway. - In this case, the relevant object for status is the Gateway, and that is the - ancestor object referred to in this status. - - Note that a parent is also an ancestor, so for objects where the parent is the - relevant object for status, this struct SHOULD still be used. - - This struct is intended to be used in a slice that's effectively a map, - with a composite key made up of the AncestorRef and the ControllerName. - properties: - ancestorRef: - description: |- - AncestorRef corresponds with a ParentRef in the spec that this - PolicyAncestorStatus struct describes the status of. - properties: - group: - default: gateway.networking.k8s.io - description: |- - Group is the group of the referent. - When unspecified, "gateway.networking.k8s.io" is inferred. - To set the core API group (such as for a "Service" kind referent), - Group must be explicitly set to "" (empty string). - - Support: Core - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Gateway - description: |- - Kind is kind of the referent. - - There are two kinds of parent resources with "Core" support: - - * Gateway (Gateway conformance profile) - * Service (Mesh conformance profile, ClusterIP Services only) - - Support for other resources is Implementation-Specific. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: |- - Name is the name of the referent. - - Support: Core - maxLength: 253 - minLength: 1 - type: string - namespace: - description: |- - Namespace is the namespace of the referent. When unspecified, this refers - to the local namespace of the Route. - - Note that there are specific rules for ParentRefs which cross namespace - boundaries. Cross-namespace references are only valid if they are explicitly - allowed by something in the namespace they are referring to. For example: - Gateway has the AllowedRoutes field, and ReferenceGrant provides a - generic way to enable any other kind of cross-namespace reference. - - - ParentRefs from a Route to a Service in the same namespace are "producer" - routes, which apply default routing rules to inbound connections from - any namespace to the Service. - - ParentRefs from a Route to a Service in a different namespace are - "consumer" routes, and these routing rules are only applied to outbound - connections originating from the same namespace as the Route, for which - the intended destination of the connections are a Service targeted as a - ParentRef of the Route. - - - Support: Core - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - port: - description: |- - Port is the network port this Route targets. It can be interpreted - differently based on the type of parent resource. - - When the parent resource is a Gateway, this targets all listeners - listening on the specified port that also support this kind of Route(and - select this Route). It's not recommended to set `Port` unless the - networking behaviors specified in a Route must apply to a specific port - as opposed to a listener(s) whose port(s) may be changed. When both Port - and SectionName are specified, the name and port of the selected listener - must match both specified values. - - - When the parent resource is a Service, this targets a specific port in the - Service spec. When both Port (experimental) and SectionName are specified, - the name and port of the selected port must match both specified values. - - - Implementations MAY choose to support other parent resources. - Implementations supporting other types of parent resources MUST clearly - document how/if Port is interpreted. - - For the purpose of status, an attachment is considered successful as - long as the parent resource accepts it partially. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment - from the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, - the Route MUST be considered detached from the Gateway. - - Support: Extended - format: int32 - maximum: 65535 - minimum: 1 - type: integer - sectionName: - description: |- - SectionName is the name of a section within the target resource. In the - following resources, SectionName is interpreted as the following: - - * Gateway: Listener name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - * Service: Port name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - - Implementations MAY choose to support attaching Routes to other resources. - If that is the case, they MUST clearly document how SectionName is - interpreted. - - When unspecified (empty string), this will reference the entire resource. - For the purpose of status, an attachment is considered successful if at - least one section in the parent resource accepts it. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, the - Route MUST be considered detached from the Gateway. - - Support: Core - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - required: - - name - type: object - conditions: - description: Conditions describes the status of the Policy with - respect to the given Ancestor. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - maxItems: 8 - minItems: 1 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - controllerName: - description: |- - ControllerName is a domain/path string that indicates the name of the - controller that wrote this status. This corresponds with the - controllerName field on GatewayClass. - - Example: "example.net/gateway-controller". - - The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are - valid Kubernetes names - (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). - - Controllers MUST populate this field when writing status. Controllers should ensure that - entries to status populated with their ControllerName are cleaned up when they are no - longer necessary. - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$ - type: string - required: - - ancestorRef - - controllerName - type: object - maxItems: 16 - type: array - required: - - ancestors - type: object - required: - - spec - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha2 - schema: - openAPIV3Schema: - description: |- - ObservabilityPolicy is a Direct Attached Policy. It provides a way to configure observability settings for - the NGINX Gateway Fabric data plane. Used in conjunction with the NginxProxy CRD that is attached to the - GatewayClass parametersRef. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of the ObservabilityPolicy. - properties: - targetRefs: - description: |- - TargetRefs identifies the API object(s) to apply the policy to. - Objects must be in the same namespace as the policy. - Support: HTTPRoute, GRPCRoute. - - TargetRefs must be _distinct_. This means that the multi-part key defined by `kind` and `name` must - be unique across all targetRef entries in the ObservabilityPolicy. - items: - description: |- - LocalPolicyTargetReference identifies an API object to apply a direct or - inherited policy to. This should be used as part of Policy resources - that can target Gateway API resources. For more information on how this - policy attachment model works, and a sample Policy resource, refer to - the policy attachment documentation for Gateway API. - properties: - group: - description: Group is the group of the target resource. - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - description: Kind is kind of the target resource. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: Name is the name of the target resource. - maxLength: 253 - minLength: 1 - type: string - required: - - group - - kind - - name - type: object - maxItems: 16 - minItems: 1 - type: array - x-kubernetes-validations: - - message: 'TargetRef Kind must be: HTTPRoute or GRPCRoute' - rule: (self.exists(t, t.kind=='HTTPRoute') || self.exists(t, t.kind=='GRPCRoute')) - - message: TargetRef Group must be gateway.networking.k8s.io - rule: self.all(t, t.group=='gateway.networking.k8s.io') - - message: TargetRef Kind and Name combination must be unique - rule: self.all(p1, self.exists_one(p2, (p1.name == p2.name) && (p1.kind - == p2.kind))) - tracing: - description: Tracing allows for enabling and configuring tracing. - properties: - context: - description: |- - Context specifies how to propagate traceparent/tracestate headers. - Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_trace_context - enum: - - extract - - inject - - propagate - - ignore - type: string - ratio: - description: |- - Ratio is the percentage of traffic that should be sampled. Integer from 0 to 100. - By default, 100% of http requests are traced. Not applicable for parent-based tracing. - If ratio is set to 0, tracing is disabled. - format: int32 - maximum: 100 - minimum: 0 - type: integer - spanAttributes: - description: SpanAttributes are custom key/value attributes that - are added to each span. - items: - description: SpanAttribute is a key value pair to be added to - a tracing span. - properties: - key: - description: |- - Key is the key for a span attribute. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - value: - description: |- - Value is the value for a span attribute. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - required: - - key - - value - type: object - maxItems: 64 - type: array - x-kubernetes-list-map-keys: - - key - x-kubernetes-list-type: map - spanName: - description: |- - SpanName defines the name of the Otel span. By default is the name of the location for a request. - If specified, applies to all locations that are created for a route. - Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' - Examples of invalid names: some-$value, quoted-"value"-name, unescaped\ - maxLength: 255 - minLength: 1 - pattern: ^([^"$\\]|\\[^$])*$ - type: string - strategy: - description: Strategy defines if tracing is ratio-based or parent-based. - enum: - - ratio - - parent - type: string - required: - - strategy - type: object - x-kubernetes-validations: - - message: ratio can only be specified if strategy is of type ratio - rule: '!(has(self.ratio) && self.strategy != ''ratio'')' - required: - - targetRefs - type: object - status: - description: Status defines the state of the ObservabilityPolicy. - properties: - ancestors: - description: |- - Ancestors is a list of ancestor resources (usually Gateways) that are - associated with the policy, and the status of the policy with respect to - each ancestor. When this policy attaches to a parent, the controller that - manages the parent and the ancestors MUST add an entry to this list when - the controller first sees the policy and SHOULD update the entry as - appropriate when the relevant ancestor is modified. - - Note that choosing the relevant ancestor is left to the Policy designers; - an important part of Policy design is designing the right object level at - which to namespace this status. - - Note also that implementations MUST ONLY populate ancestor status for - the Ancestor resources they are responsible for. Implementations MUST - use the ControllerName field to uniquely identify the entries in this list - that they are responsible for. - - Note that to achieve this, the list of PolicyAncestorStatus structs - MUST be treated as a map with a composite key, made up of the AncestorRef - and ControllerName fields combined. - - A maximum of 16 ancestors will be represented in this list. An empty list - means the Policy is not relevant for any ancestors. - - If this slice is full, implementations MUST NOT add further entries. - Instead they MUST consider the policy unimplementable and signal that - on any related resources such as the ancestor that would be referenced - here. For example, if this list was full on BackendTLSPolicy, no - additional Gateways would be able to reference the Service targeted by - the BackendTLSPolicy. - items: - description: |- - PolicyAncestorStatus describes the status of a route with respect to an - associated Ancestor. - - Ancestors refer to objects that are either the Target of a policy or above it - in terms of object hierarchy. For example, if a policy targets a Service, the - Policy's Ancestors are, in order, the Service, the HTTPRoute, the Gateway, and - the GatewayClass. Almost always, in this hierarchy, the Gateway will be the most - useful object to place Policy status on, so we recommend that implementations - SHOULD use Gateway as the PolicyAncestorStatus object unless the designers - have a _very_ good reason otherwise. - - In the context of policy attachment, the Ancestor is used to distinguish which - resource results in a distinct application of this policy. For example, if a policy - targets a Service, it may have a distinct result per attached Gateway. - - Policies targeting the same resource may have different effects depending on the - ancestors of those resources. For example, different Gateways targeting the same - Service may have different capabilities, especially if they have different underlying - implementations. - - For example, in BackendTLSPolicy, the Policy attaches to a Service that is - used as a backend in a HTTPRoute that is itself attached to a Gateway. - In this case, the relevant object for status is the Gateway, and that is the - ancestor object referred to in this status. - - Note that a parent is also an ancestor, so for objects where the parent is the - relevant object for status, this struct SHOULD still be used. - - This struct is intended to be used in a slice that's effectively a map, - with a composite key made up of the AncestorRef and the ControllerName. - properties: - ancestorRef: - description: |- - AncestorRef corresponds with a ParentRef in the spec that this - PolicyAncestorStatus struct describes the status of. - properties: - group: - default: gateway.networking.k8s.io - description: |- - Group is the group of the referent. - When unspecified, "gateway.networking.k8s.io" is inferred. - To set the core API group (such as for a "Service" kind referent), - Group must be explicitly set to "" (empty string). - - Support: Core - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Gateway - description: |- - Kind is kind of the referent. - - There are two kinds of parent resources with "Core" support: - - * Gateway (Gateway conformance profile) - * Service (Mesh conformance profile, ClusterIP Services only) - - Support for other resources is Implementation-Specific. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: |- - Name is the name of the referent. - - Support: Core - maxLength: 253 - minLength: 1 - type: string - namespace: - description: |- - Namespace is the namespace of the referent. When unspecified, this refers - to the local namespace of the Route. - - Note that there are specific rules for ParentRefs which cross namespace - boundaries. Cross-namespace references are only valid if they are explicitly - allowed by something in the namespace they are referring to. For example: - Gateway has the AllowedRoutes field, and ReferenceGrant provides a - generic way to enable any other kind of cross-namespace reference. - - - ParentRefs from a Route to a Service in the same namespace are "producer" - routes, which apply default routing rules to inbound connections from - any namespace to the Service. - - ParentRefs from a Route to a Service in a different namespace are - "consumer" routes, and these routing rules are only applied to outbound - connections originating from the same namespace as the Route, for which - the intended destination of the connections are a Service targeted as a - ParentRef of the Route. - - - Support: Core - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - port: - description: |- - Port is the network port this Route targets. It can be interpreted - differently based on the type of parent resource. - - When the parent resource is a Gateway, this targets all listeners - listening on the specified port that also support this kind of Route(and - select this Route). It's not recommended to set `Port` unless the - networking behaviors specified in a Route must apply to a specific port - as opposed to a listener(s) whose port(s) may be changed. When both Port - and SectionName are specified, the name and port of the selected listener - must match both specified values. - - - When the parent resource is a Service, this targets a specific port in the - Service spec. When both Port (experimental) and SectionName are specified, - the name and port of the selected port must match both specified values. - - - Implementations MAY choose to support other parent resources. - Implementations supporting other types of parent resources MUST clearly - document how/if Port is interpreted. - - For the purpose of status, an attachment is considered successful as - long as the parent resource accepts it partially. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment - from the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, - the Route MUST be considered detached from the Gateway. - - Support: Extended - format: int32 - maximum: 65535 - minimum: 1 - type: integer - sectionName: - description: |- - SectionName is the name of a section within the target resource. In the - following resources, SectionName is interpreted as the following: - - * Gateway: Listener name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - * Service: Port name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - - Implementations MAY choose to support attaching Routes to other resources. - If that is the case, they MUST clearly document how SectionName is - interpreted. - - When unspecified (empty string), this will reference the entire resource. - For the purpose of status, an attachment is considered successful if at - least one section in the parent resource accepts it. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, the - Route MUST be considered detached from the Gateway. - - Support: Core - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - required: - - name - type: object - conditions: - description: Conditions describes the status of the Policy with - respect to the given Ancestor. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - maxItems: 8 - minItems: 1 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - controllerName: - description: |- - ControllerName is a domain/path string that indicates the name of the - controller that wrote this status. This corresponds with the - controllerName field on GatewayClass. - - Example: "example.net/gateway-controller". - - The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are - valid Kubernetes names - (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). - - Controllers MUST populate this field when writing status. Controllers should ensure that - entries to status populated with their ControllerName are cleaned up when they are no - longer necessary. - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$ - type: string - required: - - ancestorRef - - controllerName - type: object - maxItems: 16 - type: array - required: - - ancestors - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_snippetsfilters.yaml b/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_snippetsfilters.yaml deleted file mode 100644 index 7d95df8112..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_snippetsfilters.yaml +++ /dev/null @@ -1,189 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.19.0 - name: snippetsfilters.gateway.nginx.org -spec: - group: gateway.nginx.org - names: - categories: - - nginx-gateway-fabric - kind: SnippetsFilter - listKind: SnippetsFilterList - plural: snippetsfilters - shortNames: - - snippetsfilter - singular: snippetsfilter - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - SnippetsFilter is a filter that allows inserting NGINX configuration into the - generated NGINX config for HTTPRoute and GRPCRoute resources. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of the SnippetsFilter. - properties: - snippets: - description: |- - Snippets is a list of NGINX configuration snippets. - There can only be one snippet per context. - Allowed contexts: main, http, http.server, http.server.location. - items: - description: Snippet represents an NGINX configuration snippet. - properties: - context: - description: Context is the NGINX context to insert the snippet - into. - enum: - - main - - http - - http.server - - http.server.location - type: string - value: - description: Value is the NGINX configuration snippet. - minLength: 1 - type: string - required: - - context - - value - type: object - maxItems: 4 - minItems: 1 - type: array - x-kubernetes-validations: - - message: Only one snippet allowed per context - rule: self.all(s1, self.exists_one(s2, s1.context == s2.context)) - required: - - snippets - type: object - status: - description: Status defines the state of the SnippetsFilter. - properties: - controllers: - description: |- - Controllers is a list of Gateway API controllers that processed the SnippetsFilter - and the status of the SnippetsFilter with respect to each controller. - items: - properties: - conditions: - description: Conditions describe the status of the SnippetsFilter. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - maxItems: 8 - minItems: 1 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - controllerName: - description: |- - ControllerName is a domain/path string that indicates the name of the - controller that wrote this status. This corresponds with the - controllerName field on GatewayClass. - - Example: "example.net/gateway-controller". - - The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are - valid Kubernetes names - (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). - - Controllers MUST populate this field when writing status. Controllers should ensure that - entries to status populated with their ControllerName are cleaned up when they are no - longer necessary. - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$ - type: string - required: - - controllerName - type: object - maxItems: 16 - type: array - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_upstreamsettingspolicies.yaml b/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_upstreamsettingspolicies.yaml deleted file mode 100644 index a6fae4c3ad..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/crds/gateway.nginx.org_upstreamsettingspolicies.yaml +++ /dev/null @@ -1,448 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.19.0 - labels: - gateway.networking.k8s.io/policy: direct - name: upstreamsettingspolicies.gateway.nginx.org -spec: - group: gateway.nginx.org - names: - categories: - - nginx-gateway-fabric - kind: UpstreamSettingsPolicy - listKind: UpstreamSettingsPolicyList - plural: upstreamsettingspolicies - shortNames: - - uspolicy - singular: upstreamsettingspolicy - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - UpstreamSettingsPolicy is a Direct Attached Policy. It provides a way to configure the behavior of - the connection between NGINX and the upstream applications. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of the UpstreamSettingsPolicy. - properties: - keepAlive: - description: KeepAlive defines the keep-alive settings. - properties: - connections: - description: |- - Connections sets the maximum number of idle keep-alive connections to upstream servers that are preserved - in the cache of each nginx worker process. When this number is exceeded, the least recently used - connections are closed. - Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive - format: int32 - minimum: 1 - type: integer - requests: - description: |- - Requests sets the maximum number of requests that can be served through one keep-alive connection. - After the maximum number of requests are made, the connection is closed. - Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_requests - format: int32 - minimum: 0 - type: integer - time: - description: |- - Time defines the maximum time during which requests can be processed through one keep-alive connection. - After this time is reached, the connection is closed following the subsequent request processing. - Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_time - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - timeout: - description: |- - Timeout defines the keep-alive timeout for upstreams. - Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout - pattern: ^[0-9]{1,4}(ms|s|m|h)?$ - type: string - type: object - targetRefs: - description: |- - TargetRefs identifies API object(s) to apply the policy to. - Objects must be in the same namespace as the policy. - Support: Service - - TargetRefs must be _distinct_. The `name` field must be unique for all targetRef entries in the UpstreamSettingsPolicy. - items: - description: |- - LocalPolicyTargetReference identifies an API object to apply a direct or - inherited policy to. This should be used as part of Policy resources - that can target Gateway API resources. For more information on how this - policy attachment model works, and a sample Policy resource, refer to - the policy attachment documentation for Gateway API. - properties: - group: - description: Group is the group of the target resource. - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - description: Kind is kind of the target resource. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: Name is the name of the target resource. - maxLength: 253 - minLength: 1 - type: string - required: - - group - - kind - - name - type: object - maxItems: 16 - minItems: 1 - type: array - x-kubernetes-validations: - - message: 'TargetRefs Kind must be: Service' - rule: self.all(t, t.kind=='Service') - - message: TargetRefs Group must be core - rule: self.exists(t, t.group=='') || self.exists(t, t.group=='core') - - message: TargetRef Name must be unique - rule: self.all(p1, self.exists_one(p2, p1.name == p2.name)) - zoneSize: - description: |- - ZoneSize is the size of the shared memory zone used by the upstream. This memory zone is used to share - the upstream configuration between nginx worker processes. The more servers that an upstream has, - the larger memory zone is required. - Default: OSS: 512k, Plus: 1m. - Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#zone - pattern: ^\d{1,4}(k|m|g)?$ - type: string - required: - - targetRefs - type: object - status: - description: Status defines the state of the UpstreamSettingsPolicy. - properties: - ancestors: - description: |- - Ancestors is a list of ancestor resources (usually Gateways) that are - associated with the policy, and the status of the policy with respect to - each ancestor. When this policy attaches to a parent, the controller that - manages the parent and the ancestors MUST add an entry to this list when - the controller first sees the policy and SHOULD update the entry as - appropriate when the relevant ancestor is modified. - - Note that choosing the relevant ancestor is left to the Policy designers; - an important part of Policy design is designing the right object level at - which to namespace this status. - - Note also that implementations MUST ONLY populate ancestor status for - the Ancestor resources they are responsible for. Implementations MUST - use the ControllerName field to uniquely identify the entries in this list - that they are responsible for. - - Note that to achieve this, the list of PolicyAncestorStatus structs - MUST be treated as a map with a composite key, made up of the AncestorRef - and ControllerName fields combined. - - A maximum of 16 ancestors will be represented in this list. An empty list - means the Policy is not relevant for any ancestors. - - If this slice is full, implementations MUST NOT add further entries. - Instead they MUST consider the policy unimplementable and signal that - on any related resources such as the ancestor that would be referenced - here. For example, if this list was full on BackendTLSPolicy, no - additional Gateways would be able to reference the Service targeted by - the BackendTLSPolicy. - items: - description: |- - PolicyAncestorStatus describes the status of a route with respect to an - associated Ancestor. - - Ancestors refer to objects that are either the Target of a policy or above it - in terms of object hierarchy. For example, if a policy targets a Service, the - Policy's Ancestors are, in order, the Service, the HTTPRoute, the Gateway, and - the GatewayClass. Almost always, in this hierarchy, the Gateway will be the most - useful object to place Policy status on, so we recommend that implementations - SHOULD use Gateway as the PolicyAncestorStatus object unless the designers - have a _very_ good reason otherwise. - - In the context of policy attachment, the Ancestor is used to distinguish which - resource results in a distinct application of this policy. For example, if a policy - targets a Service, it may have a distinct result per attached Gateway. - - Policies targeting the same resource may have different effects depending on the - ancestors of those resources. For example, different Gateways targeting the same - Service may have different capabilities, especially if they have different underlying - implementations. - - For example, in BackendTLSPolicy, the Policy attaches to a Service that is - used as a backend in a HTTPRoute that is itself attached to a Gateway. - In this case, the relevant object for status is the Gateway, and that is the - ancestor object referred to in this status. - - Note that a parent is also an ancestor, so for objects where the parent is the - relevant object for status, this struct SHOULD still be used. - - This struct is intended to be used in a slice that's effectively a map, - with a composite key made up of the AncestorRef and the ControllerName. - properties: - ancestorRef: - description: |- - AncestorRef corresponds with a ParentRef in the spec that this - PolicyAncestorStatus struct describes the status of. - properties: - group: - default: gateway.networking.k8s.io - description: |- - Group is the group of the referent. - When unspecified, "gateway.networking.k8s.io" is inferred. - To set the core API group (such as for a "Service" kind referent), - Group must be explicitly set to "" (empty string). - - Support: Core - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Gateway - description: |- - Kind is kind of the referent. - - There are two kinds of parent resources with "Core" support: - - * Gateway (Gateway conformance profile) - * Service (Mesh conformance profile, ClusterIP Services only) - - Support for other resources is Implementation-Specific. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: |- - Name is the name of the referent. - - Support: Core - maxLength: 253 - minLength: 1 - type: string - namespace: - description: |- - Namespace is the namespace of the referent. When unspecified, this refers - to the local namespace of the Route. - - Note that there are specific rules for ParentRefs which cross namespace - boundaries. Cross-namespace references are only valid if they are explicitly - allowed by something in the namespace they are referring to. For example: - Gateway has the AllowedRoutes field, and ReferenceGrant provides a - generic way to enable any other kind of cross-namespace reference. - - - ParentRefs from a Route to a Service in the same namespace are "producer" - routes, which apply default routing rules to inbound connections from - any namespace to the Service. - - ParentRefs from a Route to a Service in a different namespace are - "consumer" routes, and these routing rules are only applied to outbound - connections originating from the same namespace as the Route, for which - the intended destination of the connections are a Service targeted as a - ParentRef of the Route. - - - Support: Core - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - port: - description: |- - Port is the network port this Route targets. It can be interpreted - differently based on the type of parent resource. - - When the parent resource is a Gateway, this targets all listeners - listening on the specified port that also support this kind of Route(and - select this Route). It's not recommended to set `Port` unless the - networking behaviors specified in a Route must apply to a specific port - as opposed to a listener(s) whose port(s) may be changed. When both Port - and SectionName are specified, the name and port of the selected listener - must match both specified values. - - - When the parent resource is a Service, this targets a specific port in the - Service spec. When both Port (experimental) and SectionName are specified, - the name and port of the selected port must match both specified values. - - - Implementations MAY choose to support other parent resources. - Implementations supporting other types of parent resources MUST clearly - document how/if Port is interpreted. - - For the purpose of status, an attachment is considered successful as - long as the parent resource accepts it partially. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment - from the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, - the Route MUST be considered detached from the Gateway. - - Support: Extended - format: int32 - maximum: 65535 - minimum: 1 - type: integer - sectionName: - description: |- - SectionName is the name of a section within the target resource. In the - following resources, SectionName is interpreted as the following: - - * Gateway: Listener name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - * Service: Port name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - - Implementations MAY choose to support attaching Routes to other resources. - If that is the case, they MUST clearly document how SectionName is - interpreted. - - When unspecified (empty string), this will reference the entire resource. - For the purpose of status, an attachment is considered successful if at - least one section in the parent resource accepts it. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, the - Route MUST be considered detached from the Gateway. - - Support: Core - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - required: - - name - type: object - conditions: - description: Conditions describes the status of the Policy with - respect to the given Ancestor. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - maxItems: 8 - minItems: 1 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - controllerName: - description: |- - ControllerName is a domain/path string that indicates the name of the - controller that wrote this status. This corresponds with the - controllerName field on GatewayClass. - - Example: "example.net/gateway-controller". - - The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are - valid Kubernetes names - (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). - - Controllers MUST populate this field when writing status. Controllers should ensure that - entries to status populated with their ControllerName are cleaned up when they are no - longer necessary. - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$ - type: string - required: - - ancestorRef - - controllerName - type: object - maxItems: 16 - type: array - required: - - ancestors - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/_helpers.tpl b/operators/helm-charts/nginx-gateway-fabric/templates/_helpers.tpl deleted file mode 100644 index a1d5b686f5..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/_helpers.tpl +++ /dev/null @@ -1,112 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "nginx-gateway.name" -}} -{{- if .Values.nginxGateway.name }} -{{- .Values.nginxGateway.name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "nginx-gateway.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default (include "nginx-gateway.name" .) }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create control plane config name. -*/}} -{{- define "nginx-gateway.config-name" -}} -{{- $name := .Values.nginxGateway.name | default .Values.nameOverride | default .Release.Name }} -{{- printf "%s-config" $name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create data plane config name. -*/}} -{{- define "nginx-gateway.proxy-config-name" -}} -{{- $name := .Values.nginxGateway.name | default .Values.nameOverride | default .Release.Name }} -{{- printf "%s-proxy-config" $name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create security context constraints name. -*/}} -{{- define "nginx-gateway.scc-name" -}} -{{- $name := .Values.nginxGateway.name | default .Values.nameOverride | default .Release.Name }} -{{- printf "%s-scc" $name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "nginx-gateway.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "nginx-gateway.labels" -}} -helm.sh/chart: {{ include "nginx-gateway.chart" . }} -{{ include "nginx-gateway.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "nginx-gateway.selectorLabels" -}} -app.kubernetes.io/name: {{ include "nginx-gateway.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the ServiceAccount to use -*/}} -{{- define "nginx-gateway.serviceAccountName" -}} -{{- default (include "nginx-gateway.fullname" .) .Values.nginxGateway.serviceAccount.name }} -{{- end }} - -{{/* -Expand leader election lock name. -*/}} -{{- define "nginx-gateway.leaderElectionName" -}} -{{- if .Values.nginxGateway.leaderElection.lockName -}} -{{ .Values.nginxGateway.leaderElection.lockName }} -{{- else -}} -{{- printf "%s-%s" (include "nginx-gateway.fullname" .) "leader-election" -}} -{{- end -}} -{{- end -}} - -{{/* -Filters out empty fields from a struct. -*/}} -{{- define "filterEmptyFields" -}} -{{- $result := dict }} -{{- range $key, $value := . }} - {{- if and (not (empty $value)) (not (and (kindIs "slice" $value) (eq (len $value) 0))) }} - {{- $result = merge $result (dict $key $value) }} - {{- end }} -{{- end }} -{{- if $result -}} -{{- $result | toYaml -}} -{{- end -}} -{{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/certs-job.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/certs-job.yaml deleted file mode 100644 index 430fa0de3f..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/certs-job.yaml +++ /dev/null @@ -1,172 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "nginx-gateway.fullname" . }}-cert-generator - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install -{{- if or .Values.nginxGateway.serviceAccount.imagePullSecret .Values.nginxGateway.serviceAccount.imagePullSecrets }} -imagePullSecrets: - {{- if .Values.nginxGateway.serviceAccount.imagePullSecret }} - - name: {{ .Values.nginxGateway.serviceAccount.imagePullSecret }} - {{- end }} - {{- if .Values.nginxGateway.serviceAccount.imagePullSecrets }} - {{- range .Values.nginxGateway.serviceAccount.imagePullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "nginx-gateway.fullname" . }}-cert-generator - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install -rules: -- apiGroups: - - "" - resources: - - secrets - verbs: - - create - - update - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "nginx-gateway.fullname" . }}-cert-generator - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "nginx-gateway.fullname" . }}-cert-generator -subjects: -- kind: ServiceAccount - name: {{ include "nginx-gateway.fullname" . }}-cert-generator - namespace: {{ .Release.Namespace }} ---- -{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints" }} -kind: SecurityContextConstraints -apiVersion: security.openshift.io/v1 -metadata: - name: {{ include "nginx-gateway.scc-name" . }}-cert-generator - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - annotations: - "helm.sh/hook-weight": "-1" - "helm.sh/hook": pre-install -allowPrivilegeEscalation: false -allowHostDirVolumePlugin: false -allowHostIPC: false -allowHostNetwork: false -allowHostPID: false -allowHostPorts: false -allowPrivilegedContainer: false -readOnlyRootFilesystem: true -runAsUser: - type: MustRunAsRange - uidRangeMin: 101 - uidRangeMax: 101 -fsGroup: - type: MustRunAs - ranges: - - min: 1001 - max: 1001 -supplementalGroups: - type: MustRunAs - ranges: - - min: 1001 - max: 1001 -seLinuxContext: - type: MustRunAs -seccompProfiles: -- runtime/default -users: -- {{ printf "system:serviceaccount:%s:%s-cert-generator" .Release.Namespace (include "nginx-gateway.fullname" .) }} -requiredDropCapabilities: -- ALL -volumes: -- projected ---- -{{- end }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "nginx-gateway.fullname" . }}-cert-generator - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - annotations: - {{- with .Values.certGenerator.annotations -}} - {{ toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": pre-install, pre-upgrade -spec: - template: - metadata: - annotations: - {{- with .Values.certGenerator.annotations -}} - {{ toYaml . | nindent 8 }} - {{- end }} - spec: - containers: - - args: - - generate-certs - - --service={{ include "nginx-gateway.fullname" . }} - - --cluster-domain={{ .Values.clusterDomain }} - - --server-tls-secret={{ .Values.certGenerator.serverTLSSecretName }} - - --agent-tls-secret={{ .Values.certGenerator.agentTLSSecretName }} - {{- if .Values.certGenerator.overwrite }} - - --overwrite - {{- end }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: {{ .Values.nginxGateway.image.repository }}:{{ default .Chart.AppVersion .Values.nginxGateway.image.tag }} - imagePullPolicy: {{ .Values.nginxGateway.image.pullPolicy }} - name: cert-generator - securityContext: - seccompProfile: - type: RuntimeDefault - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 101 - runAsGroup: 1001 - restartPolicy: Never - serviceAccountName: {{ include "nginx-gateway.fullname" . }}-cert-generator - securityContext: - fsGroup: 1001 - runAsNonRoot: true - {{- if .Values.certGenerator.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml .Values.certGenerator.topologySpreadConstraints | nindent 6 }} - {{- end }} - {{- if .Values.certGenerator.affinity }} - affinity: - {{- toYaml .Values.certGenerator.affinity | nindent 8 }} - {{- end }} - {{- if .Values.certGenerator.tolerations }} - tolerations: - {{- toYaml .Values.certGenerator.tolerations | nindent 6 }} - {{- end }} - {{- if .Values.certGenerator.nodeSelector }} - nodeSelector: - {{- toYaml .Values.certGenerator.nodeSelector | nindent 8 }} - {{- end }} - ttlSecondsAfterFinished: {{ .Values.certGenerator.ttlSecondsAfterFinished }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/clusterrole.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/clusterrole.yaml deleted file mode 100644 index 8fc4da400e..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/clusterrole.yaml +++ /dev/null @@ -1,171 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "nginx-gateway.fullname" . }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} -rules: -- apiGroups: - - "" - - apps - - autoscaling - resources: - - secrets - - configmaps - - serviceaccounts - - services - - deployments - - daemonsets - - horizontalpodautoscalers - verbs: - - create - - update - - delete - - list - - get - - watch -- apiGroups: - - "" - resources: - - namespaces - - pods - verbs: - - get - - list - - watch -- apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - list -{{- if or .Values.nginxGateway.productTelemetry.enable .Values.nginx.plus }} -- apiGroups: - - "" - resources: - - nodes - verbs: - - list -{{- end }} -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch -- apiGroups: - - discovery.k8s.io - resources: - - endpointslices - verbs: - - list - - watch -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - gateway.networking.k8s.io - resources: - - gatewayclasses - - gateways - - httproutes - - referencegrants - - grpcroutes -{{- if .Values.nginxGateway.gwAPIExperimentalFeatures.enable }} - - backendtlspolicies - - tlsroutes -{{- end }} - verbs: - - list - - watch -- apiGroups: - - gateway.networking.k8s.io - resources: - - httproutes/status - - gateways/status - - gatewayclasses/status - - grpcroutes/status -{{- if .Values.nginxGateway.gwAPIExperimentalFeatures.enable }} - - backendtlspolicies/status - - tlsroutes/status -{{- end }} - verbs: - - update -- apiGroups: - - gateway.nginx.org - resources: - - nginxgateways - verbs: - - get - - list - - watch -- apiGroups: - - gateway.nginx.org - resources: - - nginxproxies - - clientsettingspolicies - - observabilitypolicies - - upstreamsettingspolicies - {{- if .Values.nginxGateway.snippetsFilters.enable }} - - snippetsfilters - {{- end }} - verbs: - - list - - watch -- apiGroups: - - gateway.nginx.org - resources: - - nginxgateways/status - - clientsettingspolicies/status - - observabilitypolicies/status - - upstreamsettingspolicies/status - {{- if .Values.nginxGateway.snippetsFilters.enable }} - - snippetsfilters/status - {{- end }} - verbs: - - update -{{- if .Values.nginxGateway.leaderElection.enable }} -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - get - - update -{{- end }} -- apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - list - - watch -{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints" }} -- apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - resourceNames: - - {{ include "nginx-gateway.scc-name" . }} - - {{ include "nginx-gateway.scc-name" . }}-nginx - verbs: - - use -- apiGroups: - - rbac.authorization.k8s.io - resources: - - roles - - rolebindings - verbs: - - create - - update - - delete - - list - - get - - watch -{{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/clusterrolebinding.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/clusterrolebinding.yaml deleted file mode 100644 index 4a0d4321be..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "nginx-gateway.fullname" . }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "nginx-gateway.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ include "nginx-gateway.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/deployment.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/deployment.yaml deleted file mode 100644 index 5bc292bdb4..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/deployment.yaml +++ /dev/null @@ -1,212 +0,0 @@ -{{- if eq .Values.nginxGateway.kind "deployment" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "nginx-gateway.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - {{- with .Values.nginxGateway.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.nginxGateway.replicas }} - selector: - matchLabels: - {{- include "nginx-gateway.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "nginx-gateway.selectorLabels" . | nindent 8 }} - {{- with .Values.nginxGateway.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if or .Values.nginxGateway.podAnnotations .Values.nginxGateway.metrics.enable }} - annotations: - {{- if .Values.nginxGateway.podAnnotations }} - {{- toYaml .Values.nginxGateway.podAnnotations | nindent 8 }} - {{- end }} - {{- if .Values.nginxGateway.metrics.enable }} - prometheus.io/scrape: "true" - prometheus.io/port: "{{ .Values.nginxGateway.metrics.port }}" - {{- if .Values.nginxGateway.metrics.secure }} - prometheus.io/scheme: "https" - {{- end }} - {{- end }} - {{- end }} - spec: - automountServiceAccountToken: true - containers: - - args: - - controller - - --gateway-ctlr-name={{ .Values.nginxGateway.gatewayControllerName }} - - --gatewayclass={{ .Values.nginxGateway.gatewayClassName }} - - --config={{ include "nginx-gateway.config-name" . }} - - --service={{ include "nginx-gateway.fullname" . }} - - --agent-tls-secret={{ .Values.certGenerator.agentTLSSecretName }} - {{- if .Values.nginx.imagePullSecret }} - - --nginx-docker-secret={{ .Values.nginx.imagePullSecret }} - {{- end }} - {{- if .Values.nginx.imagePullSecrets }} - {{- range .Values.nginx.imagePullSecrets }} - - --nginx-docker-secret={{ . }} - {{- end }} - {{- end }} - {{- if .Values.nginx.plus }} - - --nginx-plus - {{- if .Values.nginx.usage.secretName }} - - --usage-report-secret={{ .Values.nginx.usage.secretName }} - {{- end }} - {{- if .Values.nginx.usage.endpoint }} - - --usage-report-endpoint={{ .Values.nginx.usage.endpoint }} - {{- end }} - {{- if .Values.nginx.usage.resolver }} - - --usage-report-resolver={{ .Values.nginx.usage.resolver }} - {{- end }} - {{- if .Values.nginx.usage.skipVerify }} - - --usage-report-skip-verify - {{- end }} - {{- if .Values.nginx.usage.caSecretName }} - - --usage-report-ca-secret={{ .Values.nginx.usage.caSecretName }} - {{- end }} - {{- if .Values.nginx.usage.clientSSLSecretName }} - - --usage-report-client-ssl-secret={{ .Values.nginx.usage.clientSSLSecretName }} - {{- end }} - {{- if hasKey .Values.nginx.usage "enforceInitialReport" }} - - --usage-report-enforce-initial-report={{ .Values.nginx.usage.enforceInitialReport }} - {{- end }} - {{- end }} - {{- if .Values.nginxGateway.metrics.enable }} - - --metrics-port={{ .Values.nginxGateway.metrics.port }} - {{- if .Values.nginxGateway.metrics.secure }} - - --metrics-secure-serving - {{- end }} - {{- else }} - - --metrics-disable - {{- end }} - {{- if .Values.nginxGateway.readinessProbe.enable }} - - --health-port={{ .Values.nginxGateway.readinessProbe.port }} - {{- else }} - - --health-disable - {{- end }} - {{- if .Values.nginxGateway.leaderElection.enable }} - - --leader-election-lock-name={{ include "nginx-gateway.leaderElectionName" . }} - {{- else }} - - --leader-election-disable - {{- end }} - {{- if not .Values.nginxGateway.productTelemetry.enable }} - - --product-telemetry-disable - {{- end }} - {{- if .Values.nginxGateway.gwAPIExperimentalFeatures.enable }} - - --gateway-api-experimental-features - {{- end }} - {{- if .Values.nginxGateway.snippetsFilters.enable }} - - --snippets-filters - {{- end }} - {{- if .Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints" }} - - --nginx-scc={{ include "nginx-gateway.scc-name" . }}-nginx - {{- end}} - {{- if .Values.nginx.nginxOneConsole.dataplaneKeySecretName }} - - --nginx-one-dataplane-key-secret={{ .Values.nginx.nginxOneConsole.dataplaneKeySecretName }} - {{- if .Values.nginx.nginxOneConsole.endpointHost }} - - --nginx-one-telemetry-endpoint-host={{ .Values.nginx.nginxOneConsole.endpointHost }} - {{- end }} - {{- if .Values.nginx.nginxOneConsole.endpointPort }} - - --nginx-one-telemetry-endpoint-port={{ .Values.nginx.nginxOneConsole.endpointPort }} - {{- end }} - {{- if .Values.nginx.nginxOneConsole.skipVerify }} - - --nginx-one-tls-skip-verify - {{- end }} - {{- end }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_UID - valueFrom: - fieldRef: - fieldPath: metadata.uid - - name: INSTANCE_NAME - valueFrom: - fieldRef: - fieldPath: metadata.labels['app.kubernetes.io/instance'] - - name: IMAGE_NAME - value: {{ .Values.nginxGateway.image.repository }}:{{ default .Chart.AppVersion .Values.nginxGateway.image.tag }} - image: {{ .Values.nginxGateway.image.repository }}:{{ default .Chart.AppVersion .Values.nginxGateway.image.tag }} - imagePullPolicy: {{ .Values.nginxGateway.image.pullPolicy }} - name: nginx-gateway - {{- if .Values.nginxGateway.lifecycle }} - lifecycle: - {{- toYaml .Values.nginxGateway.lifecycle | nindent 10 }} - {{- end }} - {{- if .Values.nginxGateway.resources }} - resources: - {{- toYaml .Values.nginxGateway.resources | nindent 10 }} - {{- end }} - ports: - - name: agent-grpc - containerPort: 8443 - {{- if .Values.nginxGateway.metrics.enable }} - - name: metrics - containerPort: {{ .Values.nginxGateway.metrics.port }} - {{- end }} - {{- if .Values.nginxGateway.readinessProbe.enable }} - - name: health - containerPort: {{ .Values.nginxGateway.readinessProbe.port }} - readinessProbe: - httpGet: - path: /readyz - port: health - initialDelaySeconds: {{ .Values.nginxGateway.readinessProbe.initialDelaySeconds }} - periodSeconds: 1 - {{- end }} - securityContext: - seccompProfile: - type: RuntimeDefault - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 101 - runAsGroup: 1001 - volumeMounts: - - name: nginx-agent-tls - mountPath: /var/run/secrets/ngf - {{- with .Values.nginxGateway.extraVolumeMounts -}} - {{ toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.nginxGateway.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml .Values.nginxGateway.topologySpreadConstraints | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.nginxGateway.terminationGracePeriodSeconds }} - {{- if .Values.nginxGateway.affinity }} - affinity: - {{- toYaml .Values.nginxGateway.affinity | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "nginx-gateway.serviceAccountName" . }} - securityContext: - fsGroup: 1001 - runAsNonRoot: true - {{- if .Values.nginxGateway.tolerations }} - tolerations: - {{- toYaml .Values.nginxGateway.tolerations | nindent 6 }} - {{- end }} - {{- if .Values.nginxGateway.nodeSelector }} - nodeSelector: - {{- toYaml .Values.nginxGateway.nodeSelector | nindent 8 }} - {{- end }} - volumes: - - name: nginx-agent-tls - secret: - secretName: {{ .Values.certGenerator.serverTLSSecretName }} - {{- with .Values.nginxGateway.extraVolumes -}} - {{ toYaml . | nindent 6 }} - {{- end }} -{{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/gateway.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/gateway.yaml deleted file mode 100644 index bf521f3a5a..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/gateway.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- range .Values.gateways }} ---- -apiVersion: gateway.networking.k8s.io/v1 -kind: Gateway -metadata: - name: {{ default "gateway" .name }} - {{- with .namespace }} - namespace: {{ .}} - {{- end }} - {{- with .labels }} - labels: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - gatewayClassName: {{ default "nginx" .spec.gatewayClassName }} - {{- with .spec.infrastructure }} - infrastructure: - {{- toYaml . | nindent 4 }} - {{- end }} - listeners: - {{- range $listener := .spec.listeners }} - - name: {{ $listener.name }} - {{- with $listener.hostname }} - hostname: {{ . | toYaml }} - {{- end }} - port: {{ $listener.port }} - protocol: {{ $listener.protocol }} - {{- with $listener.allowedRoutes }} - allowedRoutes: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with $listener.tls }} - tls: - {{- toYaml . | nindent 8 }} - {{- end}} - {{- end }} -{{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/gatewayclass.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/gatewayclass.yaml deleted file mode 100644 index b6905cd33c..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/gatewayclass.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: gateway.networking.k8s.io/v1 -kind: GatewayClass -metadata: - name: {{ .Values.nginxGateway.gatewayClassName }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - {{- if .Values.nginxGateway.gatewayClassAnnotations }} - annotations: - {{- range $key, $value := .Values.nginxGateway.gatewayClassAnnotations }} - {{ printf "%s: %s" $key $value }} - {{- end }} - {{- end }} -spec: - controllerName: {{ .Values.nginxGateway.gatewayControllerName }} - parametersRef: - group: gateway.nginx.org - kind: NginxProxy - name: {{ include "nginx-gateway.proxy-config-name" . }} - namespace: {{ .Release.Namespace }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/hpa.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/hpa.yaml deleted file mode 100644 index 9b83f1b0c3..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/hpa.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if and (eq .Values.nginxGateway.kind "deployment") .Values.nginxGateway.autoscaling.enable -}} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - {{- with .Values.nginxGateway.autoscaling.annotations }} - annotations: {{ toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - {{- with .Values.nginxGateway.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ include "nginx-gateway.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "nginx-gateway.fullname" . }} - {{- if .Values.nginxGateway.autoscaling.minReplicas }} - minReplicas: {{ .Values.nginxGateway.autoscaling.minReplicas }} - {{- end }} - maxReplicas: {{ .Values.nginxGateway.autoscaling.maxReplicas }} - metrics: - {{- with .Values.nginxGateway.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ . }} - {{- end }} - {{- with .Values.nginxGateway.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ . }} - {{- end }} - {{- with .Values.nginxGateway.autoscaling.metrics }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.nginxGateway.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/nginxgateway.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/nginxgateway.yaml deleted file mode 100644 index 40e9412b28..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/nginxgateway.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: gateway.nginx.org/v1alpha1 -kind: NginxGateway -metadata: - name: {{ include "nginx-gateway.config-name" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - {{- if .Values.nginxGateway.configAnnotations }} - annotations: - {{- range $key, $value := .Values.nginxGateway.configAnnotations }} - {{ printf "%s: %s" $key $value }} - {{- end }} - {{- end }} -spec: - {{- toYaml .Values.nginxGateway.config | nindent 2 }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/nginxproxy.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/nginxproxy.yaml deleted file mode 100644 index 366b6ce1e9..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/nginxproxy.yaml +++ /dev/null @@ -1,92 +0,0 @@ -apiVersion: gateway.nginx.org/v1alpha2 -kind: NginxProxy -metadata: - name: {{ include "nginx-gateway.proxy-config-name" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} -spec: - {{- if .Values.nginx.config }} - {{- toYaml .Values.nginx.config | nindent 2 }} - {{- end }} - kubernetes: - {{- if eq .Values.nginx.kind "deployment" }} - deployment: - {{- if .Values.nginx.replicas }} - replicas: {{ .Values.nginx.replicas }} - {{- end }} - {{- if .Values.nginx.autoscaling.enable }} - autoscaling: - enable: {{ .Values.nginx.autoscaling.enable }} - {{- if .Values.nginx.autoscaling.minReplicas }} - minReplicas: {{ .Values.nginx.autoscaling.minReplicas }} - {{- end }} - maxReplicas: {{ .Values.nginx.autoscaling.maxReplicas }} - {{- if .Values.nginx.autoscaling.targetCPUUtilizationPercentage }} - targetCPUUtilizationPercentage: {{ .Values.nginx.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.nginx.autoscaling.targetMemoryUtilizationPercentage }} - targetMemoryUtilizationPercentage: {{ .Values.nginx.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} - {{- if .Values.nginx.autoscaling.behavior }} - behavior: - {{- toYaml .Values.nginx.autoscaling.behavior | nindent 10 }} - {{- end }} - {{- if .Values.nginx.autoscaling.metrics }} - metrics: - {{- toYaml .Values.nginx.autoscaling.metrics | nindent 10 }} - {{- end }} - {{- end }} - {{- if .Values.nginx.pod }} - pod: - {{- toYaml .Values.nginx.pod | nindent 8 }} - {{- end }} - container: - {{- with .Values.nginx.container }} - {{- $filtered := include "filterEmptyFields" . }} - {{- if $filtered }} - {{- $filtered | nindent 8 }} - {{- end }} - {{- end }} - image: - {{- toYaml .Values.nginx.image | nindent 10 }} - {{- if .Values.nginx.debug }} - debug: {{ .Values.nginx.debug }} - {{- end }} - {{- if .Values.nginx.patches }} - patches: - {{- toYaml .Values.nginx.patches | nindent 8 }} - {{- end }} - {{- end }} - {{- if eq .Values.nginx.kind "daemonSet" }} - daemonSet: - {{- if .Values.nginx.pod }} - pod: - {{- toYaml .Values.nginx.pod | nindent 8 }} - {{- end }} - container: - {{- with .Values.nginx.container }} - {{- $filtered := include "filterEmptyFields" . }} - {{- if $filtered }} - {{- $filtered | nindent 8 }} - {{- end }} - {{- end }} - image: - {{- toYaml .Values.nginx.image | nindent 10 }} - {{- if .Values.nginx.debug }} - debug: {{ .Values.nginx.debug }} - {{- end }} - {{- if .Values.nginx.patches }} - patches: - {{- toYaml .Values.nginx.patches | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.nginx.service }} - service: - {{- with .Values.nginx.service }} - {{- $filtered := include "filterEmptyFields" . }} - {{- if $filtered }} - {{- $filtered | nindent 6 }} - {{- end }} - {{- end }} - {{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/scc.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/scc.yaml deleted file mode 100644 index abe01271d3..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/scc.yaml +++ /dev/null @@ -1,80 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints" }} -kind: SecurityContextConstraints -apiVersion: security.openshift.io/v1 -metadata: - name: {{ include "nginx-gateway.scc-name" . }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} -allowPrivilegeEscalation: false -allowHostDirVolumePlugin: false -allowHostIPC: false -allowHostNetwork: false -allowHostPID: false -allowHostPorts: false -allowPrivilegedContainer: false -readOnlyRootFilesystem: true -runAsUser: - type: MustRunAsRange - uidRangeMin: 101 - uidRangeMax: 101 -fsGroup: - type: MustRunAs - ranges: - - min: 1001 - max: 1001 -supplementalGroups: - type: MustRunAs - ranges: - - min: 1001 - max: 1001 -seLinuxContext: - type: MustRunAs -seccompProfiles: -- runtime/default -users: -- {{ printf "system:serviceaccount:%s:%s" .Release.Namespace (include "nginx-gateway.serviceAccountName" .) }} -requiredDropCapabilities: -- ALL -volumes: -- secret ---- -kind: SecurityContextConstraints -apiVersion: security.openshift.io/v1 -metadata: - name: {{ include "nginx-gateway.scc-name" . }}-nginx - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} -allowPrivilegeEscalation: false -allowHostDirVolumePlugin: false -allowHostIPC: false -allowHostNetwork: false -allowHostPID: false -allowHostPorts: false -allowPrivilegedContainer: false -readOnlyRootFilesystem: true -runAsUser: - type: MustRunAsRange - uidRangeMin: 101 - uidRangeMax: 101 -fsGroup: - type: MustRunAs - ranges: - - min: 1001 - max: 1001 -supplementalGroups: - type: MustRunAs - ranges: - - min: 1001 - max: 1001 -seLinuxContext: - type: MustRunAs -seccompProfiles: -- runtime/default -requiredDropCapabilities: -- ALL -volumes: -- emptyDir -- secret -- configMap -- projected -{{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/service.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/service.yaml deleted file mode 100644 index faa3b45970..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "nginx-gateway.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} -{{- if .Values.nginxGateway.service.labels }} -{{ toYaml .Values.nginxGateway.service.labels | indent 4 }} -{{- end }} -{{- if .Values.nginxGateway.service.annotations }} - annotations: -{{ toYaml .Values.nginxGateway.service.annotations | indent 4 }} -{{- end }} -spec: - type: ClusterIP - selector: - {{- include "nginx-gateway.selectorLabels" . | nindent 4 }} - ports: - - name: agent-grpc - port: 443 - protocol: TCP - targetPort: 8443 diff --git a/operators/helm-charts/nginx-gateway-fabric/templates/serviceaccount.yaml b/operators/helm-charts/nginx-gateway-fabric/templates/serviceaccount.yaml deleted file mode 100644 index 98fb891a80..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/templates/serviceaccount.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "nginx-gateway.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "nginx-gateway.labels" . | nindent 4 }} - annotations: - {{- toYaml .Values.nginxGateway.serviceAccount.annotations | nindent 4 }} -automountServiceAccountToken: false -{{- if or .Values.nginxGateway.serviceAccount.imagePullSecret .Values.nginxGateway.serviceAccount.imagePullSecrets }} -imagePullSecrets: - {{- if .Values.nginxGateway.serviceAccount.imagePullSecret }} - - name: {{ .Values.nginxGateway.serviceAccount.imagePullSecret }} - {{- end }} - {{- if .Values.nginxGateway.serviceAccount.imagePullSecrets }} - {{- range .Values.nginxGateway.serviceAccount.imagePullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/operators/helm-charts/nginx-gateway-fabric/values.schema.json b/operators/helm-charts/nginx-gateway-fabric/values.schema.json deleted file mode 100644 index 9f44991db3..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/values.schema.json +++ /dev/null @@ -1,1127 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "certGenerator": { - "description": "The certGenerator section contains the configuration for the cert-generator Job.", - "properties": { - "affinity": { - "description": "The affinity of the cert-generator pod.", - "required": [], - "title": "affinity", - "type": "object" - }, - "agentTLSSecretName": { - "default": "agent-tls", - "description": "The name of the base Secret containing TLS CA, certificate, and key for the NGINX Agent to securely\ncommunicate with the NGINX Gateway Fabric control plane. Must exist in the same namespace that the\nNGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway).", - "required": [], - "title": "agentTLSSecretName", - "type": "string" - }, - "annotations": { - "description": "The annotations of the cert-generator Job.", - "required": [], - "title": "annotations", - "type": "object" - }, - "nodeSelector": { - "description": "The nodeSelector of the cert-generator pod.", - "required": [], - "title": "nodeSelector", - "type": "object" - }, - "overwrite": { - "default": false, - "description": "Overwrite existing TLS Secrets on startup.", - "required": [], - "title": "overwrite", - "type": "boolean" - }, - "serverTLSSecretName": { - "default": "server-tls", - "description": "The name of the Secret containing TLS CA, certificate, and key for the NGINX Gateway Fabric control plane\nto securely communicate with the NGINX Agent. Must exist in the same namespace that the NGINX Gateway Fabric\ncontrol plane is running in (default namespace: nginx-gateway).", - "required": [], - "title": "serverTLSSecretName", - "type": "string" - }, - "tolerations": { - "description": "Tolerations for the cert-generator pod.", - "items": { - "required": [] - }, - "required": [], - "title": "tolerations", - "type": "array" - }, - "topologySpreadConstraints": { - "description": "The topology spread constraints for the cert-generator pod.", - "items": { - "required": [] - }, - "required": [], - "title": "topologySpreadConstraints", - "type": "array" - }, - "ttlSecondsAfterFinished": { - "default": 30, - "description": "How long to wait after the cert generator job has finished before it is removed by the job controller.", - "required": [], - "title": "ttlSecondsAfterFinished", - "type": "integer" - } - }, - "required": [], - "title": "certGenerator", - "type": "object" - }, - "clusterDomain": { - "default": "cluster.local", - "description": "The DNS cluster domain of your Kubernetes cluster.", - "required": [], - "title": "clusterDomain", - "type": "string" - }, - "gateways": { - "description": "A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference.", - "items": { - "required": [] - }, - "required": [], - "title": "gateways", - "type": "array" - }, - "global": { - "description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.", - "required": [], - "title": "global", - "type": "object" - }, - "nginx": { - "description": "The nginx section contains the configuration for all NGINX data plane deployments\ninstalled by the NGINX Gateway Fabric control plane.", - "properties": { - "autoscaling": { - "description": "Autoscaling configuration for the NGINX data plane.", - "properties": { - "enable": { - "default": false, - "description": "Enable or disable Horizontal Pod Autoscaler for the NGINX data plane.", - "required": [], - "title": "enable", - "type": "boolean" - } - }, - "required": [], - "title": "autoscaling", - "type": "object" - }, - "config": { - "description": "The configuration for the data plane that is contained in the NginxProxy resource. This is applied globally to all Gateways\nmanaged by this instance of NGINX Gateway Fabric.", - "properties": { - "disableHTTP2": { - "description": "DisableHTTP2 defines if http2 should be disabled for all servers.", - "required": [], - "type": "boolean" - }, - "disableSNIHostValidation": { - "description": "DisableSNIHostValidation disables the validation that ensures the SNI hostname matches the Host header in HTTPS requests. This resolves HTTP/2 connection coalescing issues with wildcard certificates but introduces security risks as described in Gateway API GEP-3567.", - "required": [], - "type": "boolean" - }, - "dnsResolver": { - "description": "DNSResolver specifies the DNS resolver configuration for external name resolution. This enables support for routing to ExternalName Services.", - "properties": { - "addresses": { - "description": "List of DNS server addresses. Each address specifies a type and value.", - "items": { - "properties": { - "type": { - "description": "Type specifies the type of address.", - "enum": [ - "IPAddress", - "Hostname" - ], - "required": [], - "type": "string" - }, - "value": { - "description": "Value specifies the address value.", - "maxItems": 253, - "minItems": 1, - "required": [], - "type": "string" - } - }, - "required": [ - "type", - "value" - ], - "type": "object" - }, - "maxItems": 16, - "minItems": 1, - "required": [], - "type": "array" - }, - "cacheTTL": { - "description": "CacheTTL specifies how long to cache DNS responses.", - "pattern": "^\\d+[smhd]?$", - "required": [], - "type": "string" - }, - "disableIPv6": { - "description": "DisableIPv6 disables DisableIPv6 lookups. If not specified, or set to false, IPv6 lookups will be enabled.", - "required": [], - "type": "boolean" - }, - "timeout": { - "description": "Timeout specifies the timeout for name resolution.", - "pattern": "^\\d+[smhd]?$", - "required": [], - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "ipFamily": { - "description": "IPFamily specifies the IP family to be used by the NGINX.", - "enum": [ - "ipv4", - "ipv6", - "dual" - ], - "required": [], - "type": "string" - }, - "logging": { - "description": "Logging defines logging related settings for NGINX.", - "properties": { - "agentLevel": { - "enum": [ - "debug", - "info", - "error", - "panic", - "fatal" - ], - "required": [], - "type": "string" - }, - "errorLevel": { - "enum": [ - "debug", - "info", - "notice", - "warn", - "error", - "crit", - "alert", - "emerg" - ], - "required": [], - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "metrics": { - "description": "Metrics defines the configuration for Prometheus scraping metrics.", - "properties": { - "disable": { - "required": [], - "type": "boolean" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "required": [], - "type": "integer" - } - }, - "required": [], - "type": "object" - }, - "nginxPlus": { - "description": "NginxPlus specifies NGINX Plus additional settings.", - "properties": { - "allowedAddresses": { - "items": { - "properties": { - "type": { - "enum": [ - "CIDR", - "IPAddress" - ], - "required": [], - "type": "string" - }, - "value": { - "required": [], - "type": "string" - } - }, - "required": [] - }, - "required": [], - "type": "array" - } - }, - "required": [], - "type": "object" - }, - "rewriteClientIP": { - "description": "RewriteClientIP defines configuration for rewriting the client IP to the original client's IP.", - "properties": { - "mode": { - "enum": [ - "ProxyProtocol", - "XForwardedFor" - ], - "required": [], - "type": "string" - }, - "setIPRecursively": { - "required": [], - "type": "boolean" - }, - "trustedAddresses": { - "items": { - "properties": { - "type": { - "enum": [ - "CIDR", - "IPAddress", - "Hostname" - ], - "required": [], - "type": "string" - }, - "value": { - "required": [], - "type": "string" - } - }, - "required": [] - }, - "required": [], - "type": "array" - } - }, - "required": [], - "type": "object" - }, - "telemetry": { - "description": "Telemetry specifies the OpenTelemetry configuration.", - "properties": { - "disabledFeatures": { - "items": { - "enum": [ - "DisableTracing" - ], - "required": [], - "type": "string" - }, - "required": [], - "type": "array" - }, - "exporter": { - "properties": { - "batchCount": { - "minimum": 0, - "required": [], - "type": "integer" - }, - "batchSize": { - "minimum": 0, - "required": [], - "type": "integer" - }, - "endpoint": { - "pattern": "^(?:http?:\\/\\/)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(?::\\d{1,5})?$", - "required": [], - "type": "string" - }, - "interval": { - "pattern": "^\\d{1,4}(ms|s)?$", - "required": [], - "type": "string" - } - }, - "required": [], - "type": "object" - }, - "serviceName": { - "pattern": "^[a-zA-Z0-9_-]+$", - "required": [], - "type": "string" - }, - "spanAttributes": { - "items": { - "properties": { - "key": { - "maxLength": 255, - "minLength": 1, - "pattern": "^([^\"$\\\\]|\\\\[^$])*$", - "required": [], - "type": "string" - }, - "value": { - "maxLength": 255, - "minLength": 1, - "pattern": "^([^\"$\\\\]|\\\\[^$])*$", - "required": [], - "type": "string" - } - }, - "required": [] - }, - "required": [], - "type": "array" - } - }, - "required": [], - "type": "object" - }, - "workerConnections": { - "description": "The number of worker connections for NGINX. Default is 1024.", - "maximum": 65535, - "minimum": 1, - "required": [], - "type": "integer" - } - }, - "required": [], - "title": "config", - "type": "object" - }, - "container": { - "description": "The container configuration for the NGINX container. This is applied globally to all Gateways managed by this\ninstance of NGINX Gateway Fabric.", - "properties": { - "hostPorts": { - "description": "A list of HostPorts to expose on the host.\nThis configuration allows containers to bind to a specific port on the host node,\nenabling external network traffic to reach the container directly through the host's IP address and port.\nUse this option when you need to expose container ports on the host for direct access,\nsuch as for debugging, legacy integrations, or when NodePort/LoadBalancer services are not suitable.\nNote: Using hostPort may have security and scheduling implications, as it ties pods to specific nodes and ports.", - "items": { - "properties": { - "containerPort": { - "maximum": 65535, - "minimum": 1, - "required": [], - "type": "integer" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "required": [], - "type": "integer" - } - }, - "required": [], - "type": "object" - }, - "required": [], - "title": "hostPorts", - "type": "array" - }, - "lifecycle": { - "description": "The lifecycle of the NGINX container.", - "required": [], - "title": "lifecycle", - "type": "object" - }, - "readinessProbe": { - "description": "# -- Defines the settings for the data plane readiness probe. This probe returns Ready when the NGINX data plane is ready to serve traffic.", - "required": [], - "title": "readinessProbe", - "type": "object" - }, - "resources": { - "description": "The resource requirements of the NGINX container. You should set this value if you want to use dataplane Autoscaling(HPA).", - "required": [], - "title": "resources", - "type": "object" - }, - "volumeMounts": { - "description": "volumeMounts are the additional volume mounts for the NGINX container.", - "items": { - "required": [] - }, - "required": [], - "title": "volumeMounts", - "type": "array" - } - }, - "required": [], - "title": "container", - "type": "object" - }, - "debug": { - "default": false, - "description": "Enable debugging for NGINX. Uses the nginx-debug binary. The NGINX error log level should be set to debug in the NginxProxy resource.", - "required": [], - "title": "debug", - "type": "boolean" - }, - "image": { - "properties": { - "pullPolicy": { - "default": "Always", - "enum": [ - "Always", - "IfNotPresent", - "Never" - ], - "required": [], - "title": "pullPolicy" - }, - "repository": { - "default": "ghcr.io/nginx/nginx-gateway-fabric/nginx", - "description": "The NGINX image to use.", - "required": [], - "title": "repository", - "type": "string" - }, - "tag": { - "default": "edge", - "required": [], - "title": "tag", - "type": "string" - } - }, - "required": [], - "title": "image", - "type": "object" - }, - "imagePullSecret": { - "default": "", - "description": "The name of the secret containing docker registry credentials.\nSecret must exist in the same namespace as the helm release. The control\nplane will copy this secret into any namespace where NGINX is deployed.", - "required": [], - "title": "imagePullSecret", - "type": "string" - }, - "imagePullSecrets": { - "description": "A list of secret names containing docker registry credentials.\nSecrets must exist in the same namespace as the helm release. The control\nplane will copy these secrets into any namespace where NGINX is deployed.", - "items": { - "required": [] - }, - "required": [], - "title": "imagePullSecrets", - "type": "array" - }, - "kind": { - "default": "deployment", - "description": "The kind of NGINX deployment.", - "enum": [ - "deployment", - "daemonSet" - ], - "required": [], - "title": "kind" - }, - "nginxOneConsole": { - "description": "Configuration for NGINX One Console.", - "properties": { - "dataplaneKeySecretName": { - "default": "", - "description": "Name of the secret which holds the dataplane key that is required to authenticate with the NGINX One Console.\nSecret must exist in the same namespace that the NGINX Gateway Fabric control plane is running in\n(default namespace: nginx-gateway).", - "required": [], - "title": "dataplaneKeySecretName", - "type": "string" - }, - "endpointHost": { - "default": "agent.connect.nginx.com", - "description": "The Endpoint host that the NGINX One Console telemetry metrics will be sent to.", - "required": [], - "title": "endpointHost", - "type": "string" - }, - "endpointPort": { - "default": 443, - "description": "The endpoint port that the NGINX One Console telemetry metrics will be sent to.", - "maximum": 65535, - "minimum": 1, - "required": [], - "title": "endpointPort", - "type": "integer" - }, - "skipVerify": { - "default": false, - "description": "Skip TLS verification for NGINX One Console connections.", - "required": [], - "title": "skipVerify", - "type": "boolean" - } - }, - "required": [], - "title": "nginxOneConsole", - "type": "object" - }, - "patches": { - "description": "Custom patches to apply to the NGINX Deployment/DaemonSet.", - "items": { - "required": [] - }, - "required": [], - "title": "patches", - "type": "array" - }, - "plus": { - "default": false, - "description": "Is NGINX Plus image being used.", - "required": [], - "title": "plus", - "type": "boolean" - }, - "pod": { - "description": "The pod configuration for the NGINX data plane pod. This is applied globally to all Gateways managed by this\ninstance of NGINX Gateway Fabric.", - "required": [], - "title": "pod", - "type": "object" - }, - "replicas": { - "default": 1, - "description": "The number of replicas of the NGINX Deployment. This value is ignored if autoscaling.enable is true.", - "required": [], - "title": "replicas", - "type": "integer" - }, - "service": { - "description": "The service configuration for the NGINX data plane. This is applied globally to all Gateways managed by this\ninstance of NGINX Gateway Fabric.", - "properties": { - "externalTrafficPolicy": { - "default": "Local", - "description": "The externalTrafficPolicy of the service. The value Local preserves the client source IP.", - "enum": [ - "Cluster", - "Local" - ], - "required": [], - "title": "externalTrafficPolicy" - }, - "loadBalancerClass": { - "default": "", - "description": "LoadBalancerClass is the class of the load balancer implementation this Service belongs to.\nRequires nginx.service.type set to LoadBalancer.", - "required": [], - "title": "loadBalancerClass", - "type": "string" - }, - "loadBalancerIP": { - "default": "", - "description": "The static IP address for the load balancer. Requires nginx.service.type set to LoadBalancer.", - "required": [], - "title": "loadBalancerIP", - "type": "string" - }, - "loadBalancerSourceRanges": { - "description": "The IP ranges (CIDR) that are allowed to access the load balancer. Requires nginx.service.type set to LoadBalancer.", - "items": { - "required": [] - }, - "required": [], - "title": "loadBalancerSourceRanges", - "type": "array" - }, - "nodePorts": { - "description": "A list of NodePorts to expose on the NGINX data plane service. Each NodePort MUST map to a Gateway listener port,\notherwise it will be ignored. The default NodePort range enforced by Kubernetes is 30000-32767.", - "items": { - "properties": { - "listenerPort": { - "maximum": 65535, - "minimum": 1, - "required": [], - "type": "integer" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "required": [], - "type": "integer" - } - }, - "required": [], - "type": "object" - }, - "required": [], - "title": "nodePorts", - "type": "array" - }, - "patches": { - "description": "Custom patches to apply to the NGINX Service.", - "items": { - "required": [] - }, - "required": [], - "title": "patches", - "type": "array" - }, - "type": { - "default": "LoadBalancer", - "description": "The type of service to create for the NGINX data plane.", - "enum": [ - "ClusterIP", - "NodePort", - "LoadBalancer" - ], - "required": [], - "title": "type" - } - }, - "required": [], - "title": "service", - "type": "object" - }, - "usage": { - "description": "Configuration for NGINX Plus usage reporting.", - "properties": { - "caSecretName": { - "default": "", - "description": "The name of the Secret containing the NGINX Instance Manager CA certificate.\nMust exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway).", - "required": [], - "title": "caSecretName", - "type": "string" - }, - "clientSSLSecretName": { - "default": "", - "description": "The name of the Secret containing the client certificate and key for authenticating with NGINX Instance Manager.\nMust exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway).", - "required": [], - "title": "clientSSLSecretName", - "type": "string" - }, - "endpoint": { - "default": "", - "description": "The endpoint of the NGINX Plus usage reporting server. Default: product.connect.nginx.com", - "required": [], - "title": "endpoint", - "type": "string" - }, - "enforceInitialReport": { - "default": true, - "description": "Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced.", - "required": [], - "title": "enforceInitialReport", - "type": "boolean" - }, - "resolver": { - "default": "", - "description": "The nameserver used to resolve the NGINX Plus usage reporting endpoint. Used with NGINX Instance Manager.", - "required": [], - "title": "resolver", - "type": "string" - }, - "secretName": { - "default": "nplus-license", - "description": "The name of the Secret containing the JWT for NGINX Plus usage reporting. Must exist in the same namespace\nthat the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway).", - "required": [], - "title": "secretName", - "type": "string" - }, - "skipVerify": { - "default": false, - "description": "Disable client verification of the NGINX Plus usage reporting server certificate.", - "required": [], - "title": "skipVerify", - "type": "boolean" - } - }, - "required": [], - "title": "usage", - "type": "object" - } - }, - "required": [], - "title": "nginx", - "type": "object" - }, - "nginxGateway": { - "description": "The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment.", - "properties": { - "affinity": { - "description": "The affinity of the NGINX Gateway Fabric control plane pod.", - "required": [], - "title": "affinity", - "type": "object" - }, - "autoscaling": { - "description": "Autoscaling configuration for the NGINX Gateway Fabric control plane.", - "properties": { - "enable": { - "default": false, - "description": "Enable or disable Horizontal Pod Autoscaler for the control plane.", - "required": [], - "title": "enable", - "type": "boolean" - } - }, - "required": [], - "title": "autoscaling", - "type": "object" - }, - "config": { - "description": "The dynamic configuration for the control plane that is contained in the NginxGateway resource.", - "properties": { - "logging": { - "properties": { - "level": { - "default": "info", - "description": "Log level.", - "enum": [ - "info", - "debug", - "error" - ], - "required": [], - "title": "level" - } - }, - "required": [], - "title": "logging", - "type": "object" - } - }, - "required": [], - "title": "config", - "type": "object" - }, - "configAnnotations": { - "description": "Set of custom annotations for NginxGateway objects.", - "required": [], - "title": "configAnnotations", - "type": "object" - }, - "extraVolumeMounts": { - "description": "extraVolumeMounts are the additional volume mounts for the nginx-gateway container.", - "items": { - "required": [] - }, - "required": [], - "title": "extraVolumeMounts", - "type": "array" - }, - "extraVolumes": { - "description": "extraVolumes for the NGINX Gateway Fabric control plane pod. Use in conjunction with\nnginxGateway.extraVolumeMounts mount additional volumes to the container.", - "items": { - "required": [] - }, - "required": [], - "title": "extraVolumes", - "type": "array" - }, - "gatewayClassAnnotations": { - "description": "Set of custom annotations for GatewayClass objects.", - "required": [], - "title": "gatewayClassAnnotations", - "type": "object" - }, - "gatewayClassName": { - "default": "nginx", - "description": "The name of the GatewayClass that will be created as part of this release. Every NGINX Gateway\nFabric must have a unique corresponding GatewayClass resource. NGINX Gateway Fabric only processes resources that\nbelong to its class - i.e. have the \"gatewayClassName\" field resource equal to the class.", - "required": [], - "title": "gatewayClassName", - "type": "string" - }, - "gatewayControllerName": { - "default": "gateway.nginx.org/nginx-gateway-controller", - "description": "The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain\nis gateway.nginx.org.", - "pattern": "^gateway.nginx.org/.*", - "required": [], - "title": "gatewayControllerName" - }, - "gwAPIExperimentalFeatures": { - "properties": { - "enable": { - "default": false, - "description": "Enable the experimental features of Gateway API which are supported by NGINX Gateway Fabric. Requires the Gateway\nAPIs installed from the experimental channel.", - "required": [], - "title": "enable", - "type": "boolean" - } - }, - "required": [], - "title": "gwAPIExperimentalFeatures", - "type": "object" - }, - "image": { - "description": "The image configuration for the NGINX Gateway Fabric control plane.", - "properties": { - "pullPolicy": { - "default": "Always", - "enum": [ - "Always", - "IfNotPresent", - "Never" - ], - "required": [], - "title": "pullPolicy" - }, - "repository": { - "default": "ghcr.io/nginx/nginx-gateway-fabric", - "description": "The NGINX Gateway Fabric image to use", - "required": [], - "title": "repository", - "type": "string" - }, - "tag": { - "default": "edge", - "required": [], - "title": "tag", - "type": "string" - } - }, - "required": [], - "title": "image", - "type": "object" - }, - "kind": { - "const": "deployment", - "default": "deployment", - "description": "The kind of the NGINX Gateway Fabric installation - currently, only deployment is supported.", - "required": [], - "title": "kind" - }, - "labels": { - "description": "Set of labels to be added for NGINX Gateway Fabric deployment.", - "required": [], - "title": "labels", - "type": "object" - }, - "leaderElection": { - "description": "The configuration for leader election.", - "properties": { - "enable": { - "default": true, - "description": "Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric\nreporting the status of the Gateway API resources. If not enabled, all replicas of NGINX Gateway Fabric\nwill update the statuses of the Gateway API resources.", - "required": [], - "title": "enable", - "type": "boolean" - }, - "lockName": { - "default": "", - "description": "The name of the leader election lock. A Lease object with this name will be created in the same Namespace as\nthe controller.", - "required": [], - "title": "lockName", - "type": "string" - } - }, - "required": [], - "title": "leaderElection", - "type": "object" - }, - "lifecycle": { - "description": "The lifecycle of the nginx-gateway container.", - "required": [], - "title": "lifecycle", - "type": "object" - }, - "metrics": { - "properties": { - "enable": { - "default": true, - "description": "Enable exposing metrics in the Prometheus format.", - "required": [], - "title": "enable", - "type": "boolean" - }, - "port": { - "default": 9113, - "description": "Set the port where the Prometheus metrics are exposed.", - "maximum": 65535, - "minimum": 1, - "required": [], - "title": "port", - "type": "integer" - }, - "secure": { - "default": false, - "description": "Enable serving metrics via https. By default metrics are served via http.\nPlease note that this endpoint will be secured with a self-signed certificate.", - "required": [], - "title": "secure", - "type": "boolean" - } - }, - "required": [], - "title": "metrics", - "type": "object" - }, - "name": { - "default": "", - "description": "The name of the NGINX Gateway Fabric deployment - if not present, then by default uses release name given during installation.", - "required": [], - "title": "name", - "type": "string" - }, - "nodeSelector": { - "description": "The nodeSelector of the NGINX Gateway Fabric control plane pod.", - "required": [], - "title": "nodeSelector", - "type": "object" - }, - "podAnnotations": { - "description": "Set of custom annotations for the NGINX Gateway Fabric pods.", - "required": [], - "title": "podAnnotations", - "type": "object" - }, - "productTelemetry": { - "properties": { - "enable": { - "default": true, - "description": "Enable the collection of product telemetry.", - "required": [], - "title": "enable", - "type": "boolean" - } - }, - "required": [], - "title": "productTelemetry", - "type": "object" - }, - "readinessProbe": { - "description": "# Defines the settings for the control plane readiness probe. This probe returns Ready when the controller\n# has started and is ready to configure NGINX.", - "properties": { - "enable": { - "default": true, - "description": "Enable the /readyz endpoint on the control plane.", - "required": [], - "title": "enable", - "type": "boolean" - }, - "initialDelaySeconds": { - "default": 3, - "description": "The number of seconds after the Pod has started before the readiness probes are initiated.", - "required": [], - "title": "initialDelaySeconds", - "type": "integer" - }, - "port": { - "default": 8081, - "description": "Port in which the readiness endpoint is exposed.", - "maximum": 65535, - "minimum": 1, - "required": [], - "title": "port", - "type": "integer" - } - }, - "required": [], - "title": "readinessProbe", - "type": "object" - }, - "replicas": { - "default": 1, - "description": "The number of replicas of the NGINX Gateway Fabric Deployment. This value is ignored if autoscaling.enable is true.", - "required": [], - "title": "replicas", - "type": "integer" - }, - "resources": { - "description": "The resource requests and/or limits of the nginx-gateway container.", - "required": [], - "title": "resources", - "type": "object" - }, - "service": { - "description": "The service configuration for the NGINX Gateway Fabric control plane.", - "properties": { - "annotations": { - "description": "The annotations of the NGINX Gateway Fabric control plane service.", - "required": [], - "title": "annotations", - "type": "object" - }, - "labels": { - "description": "The labels of the NGINX Gateway Fabric control plane service.", - "required": [], - "title": "labels", - "type": "object" - } - }, - "required": [], - "title": "service", - "type": "object" - }, - "serviceAccount": { - "description": "The serviceaccount configuration for the NGINX Gateway Fabric control plane.", - "properties": { - "annotations": { - "description": "Set of custom annotations for the NGINX Gateway Fabric control plane service account.", - "required": [], - "title": "annotations", - "type": "object" - }, - "imagePullSecret": { - "default": "", - "description": "The name of the secret containing docker registry credentials for the control plane.\nSecret must exist in the same namespace as the helm release.", - "required": [], - "title": "imagePullSecret", - "type": "string" - }, - "imagePullSecrets": { - "description": "A list of secret names containing docker registry credentials for the control plane.\nSecrets must exist in the same namespace as the helm release.", - "items": { - "required": [] - }, - "required": [], - "title": "imagePullSecrets", - "type": "array" - }, - "name": { - "default": "", - "description": "The name of the service account of the NGINX Gateway Fabric control plane pods. Used for RBAC.", - "required": [], - "title": "name", - "type": "string" - } - }, - "required": [], - "title": "serviceAccount", - "type": "object" - }, - "snippetsFilters": { - "properties": { - "enable": { - "default": false, - "description": "Enable SnippetsFilters feature. SnippetsFilters allow inserting NGINX configuration into the generated NGINX\nconfig for HTTPRoute and GRPCRoute resources.", - "required": [], - "title": "enable", - "type": "boolean" - } - }, - "required": [], - "title": "snippetsFilters", - "type": "object" - }, - "terminationGracePeriodSeconds": { - "default": 30, - "description": "The termination grace period of the NGINX Gateway Fabric control plane pod.", - "required": [], - "title": "terminationGracePeriodSeconds", - "type": "integer" - }, - "tolerations": { - "description": "Tolerations for the NGINX Gateway Fabric control plane pod.", - "items": { - "required": [] - }, - "required": [], - "title": "tolerations", - "type": "array" - }, - "topologySpreadConstraints": { - "description": "The topology spread constraints for the NGINX Gateway Fabric control plane pod.", - "items": { - "required": [] - }, - "required": [], - "title": "topologySpreadConstraints", - "type": "array" - } - }, - "required": [ - "gatewayClassName", - "gatewayControllerName" - ], - "title": "nginxGateway", - "type": "object" - } - }, - "required": [], - "type": "object" -} diff --git a/operators/helm-charts/nginx-gateway-fabric/values.yaml b/operators/helm-charts/nginx-gateway-fabric/values.yaml deleted file mode 100644 index 52f1e03e55..0000000000 --- a/operators/helm-charts/nginx-gateway-fabric/values.yaml +++ /dev/null @@ -1,716 +0,0 @@ -# yaml-language-server: $schema=values.schema.json - -# -- The DNS cluster domain of your Kubernetes cluster. -clusterDomain: cluster.local - -# -- The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment. -nginxGateway: - # @schema - # const: deployment - # @schema - # -- The kind of the NGINX Gateway Fabric installation - currently, only deployment is supported. - kind: deployment - - # -- The name of the NGINX Gateway Fabric deployment - if not present, then by default uses release name given during installation. - name: "" - - # @schema - # required: true - # type: string - # @schema - # -- The name of the GatewayClass that will be created as part of this release. Every NGINX Gateway - # Fabric must have a unique corresponding GatewayClass resource. NGINX Gateway Fabric only processes resources that - # belong to its class - i.e. have the "gatewayClassName" field resource equal to the class. - gatewayClassName: nginx - - # -- Set of custom annotations for the NGINX Gateway Fabric pods. - podAnnotations: {} - - # -- Set of labels to be added for NGINX Gateway Fabric deployment. - labels: {} - - # -- Set of custom annotations for GatewayClass objects. - gatewayClassAnnotations: {} - - # @schema - # pattern: ^gateway.nginx.org/.* - # required: true - # @schema - # -- The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain - # is gateway.nginx.org. - gatewayControllerName: gateway.nginx.org/nginx-gateway-controller - - # The dynamic configuration for the control plane that is contained in the NginxGateway resource. - config: - logging: - # @schema - # enum: - # - info - # - debug - # - error - # @schema - # -- Log level. - level: info - - # -- Set of custom annotations for NginxGateway objects. - configAnnotations: {} - - # -- The service configuration for the NGINX Gateway Fabric control plane. - service: - # -- The annotations of the NGINX Gateway Fabric control plane service. - annotations: {} - - # -- The labels of the NGINX Gateway Fabric control plane service. - labels: {} - - # -- The serviceaccount configuration for the NGINX Gateway Fabric control plane. - serviceAccount: - # -- Set of custom annotations for the NGINX Gateway Fabric control plane service account. - annotations: {} - - # -- The name of the service account of the NGINX Gateway Fabric control plane pods. Used for RBAC. - # @default -- Autogenerated if not set or set to "" - name: "" - - # -- The name of the secret containing docker registry credentials for the control plane. - # Secret must exist in the same namespace as the helm release. - imagePullSecret: "" - - # -- A list of secret names containing docker registry credentials for the control plane. - # Secrets must exist in the same namespace as the helm release. - imagePullSecrets: [] - - # -- The number of replicas of the NGINX Gateway Fabric Deployment. This value is ignored if autoscaling.enable is true. - replicas: 1 - - # The configuration for leader election. - leaderElection: - # -- Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric - # reporting the status of the Gateway API resources. If not enabled, all replicas of NGINX Gateway Fabric - # will update the statuses of the Gateway API resources. - enable: true - - # -- The name of the leader election lock. A Lease object with this name will be created in the same Namespace as - # the controller. - # @default -- Autogenerated if not set or set to "". - lockName: "" - - ## Defines the settings for the control plane readiness probe. This probe returns Ready when the controller - ## has started and is ready to configure NGINX. - readinessProbe: - # -- Enable the /readyz endpoint on the control plane. - enable: true - - # @schema - # type: integer - # minimum: 1 - # maximum: 65535 - # @schema - # -- Port in which the readiness endpoint is exposed. - port: 8081 - - # -- The number of seconds after the Pod has started before the readiness probes are initiated. - initialDelaySeconds: 3 - - # -- The image configuration for the NGINX Gateway Fabric control plane. - image: - # -- The NGINX Gateway Fabric image to use - repository: ghcr.io/nginx/nginx-gateway-fabric - tag: edge - # @schema - # enum: - # - Always - # - IfNotPresent - # - Never - # @schema - pullPolicy: Always - - productTelemetry: - # -- Enable the collection of product telemetry. - enable: true - - # -- The lifecycle of the nginx-gateway container. - lifecycle: {} - - # -- The resource requests and/or limits of the nginx-gateway container. - resources: {} - - # -- extraVolumes for the NGINX Gateway Fabric control plane pod. Use in conjunction with - # nginxGateway.extraVolumeMounts mount additional volumes to the container. - extraVolumes: [] - - # -- extraVolumeMounts are the additional volume mounts for the nginx-gateway container. - extraVolumeMounts: [] - - # -- The termination grace period of the NGINX Gateway Fabric control plane pod. - terminationGracePeriodSeconds: 30 - - # -- Tolerations for the NGINX Gateway Fabric control plane pod. - tolerations: [] - - # -- The nodeSelector of the NGINX Gateway Fabric control plane pod. - nodeSelector: {} - - # -- The affinity of the NGINX Gateway Fabric control plane pod. - affinity: {} - - # -- The topology spread constraints for the NGINX Gateway Fabric control plane pod. - topologySpreadConstraints: [] - - # -- Autoscaling configuration for the NGINX Gateway Fabric control plane. - autoscaling: - # -- Enable or disable Horizontal Pod Autoscaler for the control plane. - enable: false - # annotations: {} - # minReplicas: 1 - # maxReplicas: 11 - # targetCPUUtilizationPercentage: 50 - # targetMemoryUtilizationPercentage: 50 - # behavior: - # scaleDown: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 180 - # scaleUp: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 2 - # periodSeconds: 60 - # Custom or additional autoscaling metrics. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#scaling-on-custom-metrics - # metrics: - # - type: Pods - # pods: - # metric: - # name: container_memory_usage_bytes - # target: - # type: AverageValue - # averageValue: "400Mi" - - metrics: - # -- Enable exposing metrics in the Prometheus format. - enable: true - - # @schema - # type: integer - # minimum: 1 - # maximum: 65535 - # @schema - # -- Set the port where the Prometheus metrics are exposed. - port: 9113 - - # -- Enable serving metrics via https. By default metrics are served via http. - # Please note that this endpoint will be secured with a self-signed certificate. - secure: false - - gwAPIExperimentalFeatures: - # -- Enable the experimental features of Gateway API which are supported by NGINX Gateway Fabric. Requires the Gateway - # APIs installed from the experimental channel. - enable: false - - snippetsFilters: - # -- Enable SnippetsFilters feature. SnippetsFilters allow inserting NGINX configuration into the generated NGINX - # config for HTTPRoute and GRPCRoute resources. - enable: false - -# -- The nginx section contains the configuration for all NGINX data plane deployments -# installed by the NGINX Gateway Fabric control plane. -nginx: - # @schema - # enum: - # - deployment - # - daemonSet - # @schema - # -- The kind of NGINX deployment. - kind: deployment - - # -- The number of replicas of the NGINX Deployment. This value is ignored if autoscaling.enable is true. - replicas: 1 - - # -- Custom patches to apply to the NGINX Deployment/DaemonSet. - patches: [] - # -- Example: - # - type: StrategicMerge - # value: - # metadata: - # labels: - # team: "nginx-gateway-fabric" - - # -- Autoscaling configuration for the NGINX data plane. - autoscaling: - # -- Enable or disable Horizontal Pod Autoscaler for the NGINX data plane. - enable: false - # minReplicas: 1 - # maxReplicas: 11 - # targetCPUUtilizationPercentage: 50 - # targetMemoryUtilizationPercentage: 50 - # behavior: - # scaleDown: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 180 - # scaleUp: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 2 - # periodSeconds: 60 - # Custom or additional autoscaling metrics. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#scaling-on-custom-metrics - # metrics: - # - type: Pods - # pods: - # metric: - # name: nginx_gateway_fabric_nginx_process_requests_total - # target: - # type: AverageValue - # averageValue: 400 - image: - # -- The NGINX image to use. - repository: ghcr.io/nginx/nginx-gateway-fabric/nginx - tag: edge - # @schema - # enum: - # - Always - # - IfNotPresent - # - Never - # @schema - pullPolicy: Always - - # -- Is NGINX Plus image being used. - plus: false - - # -- Configuration for NGINX One Console. - nginxOneConsole: - # -- Name of the secret which holds the dataplane key that is required to authenticate with the NGINX One Console. - # Secret must exist in the same namespace that the NGINX Gateway Fabric control plane is running in - # (default namespace: nginx-gateway). - dataplaneKeySecretName: "" - - # -- The Endpoint host that the NGINX One Console telemetry metrics will be sent to. - endpointHost: "agent.connect.nginx.com" - - # @schema - # type: integer - # minimum: 1 - # maximum: 65535 - # @schema - # -- The endpoint port that the NGINX One Console telemetry metrics will be sent to. - endpointPort: 443 - - # -- Skip TLS verification for NGINX One Console connections. - skipVerify: false - - # -- The name of the secret containing docker registry credentials. - # Secret must exist in the same namespace as the helm release. The control - # plane will copy this secret into any namespace where NGINX is deployed. - imagePullSecret: "" - - # -- A list of secret names containing docker registry credentials. - # Secrets must exist in the same namespace as the helm release. The control - # plane will copy these secrets into any namespace where NGINX is deployed. - imagePullSecrets: [] - - # Configuration for NGINX Plus usage reporting. - usage: - # -- The name of the Secret containing the JWT for NGINX Plus usage reporting. Must exist in the same namespace - # that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). - secretName: "nplus-license" - - # -- The endpoint of the NGINX Plus usage reporting server. Default: product.connect.nginx.com - endpoint: "" - - # -- The nameserver used to resolve the NGINX Plus usage reporting endpoint. Used with NGINX Instance Manager. - resolver: "" - - # -- Disable client verification of the NGINX Plus usage reporting server certificate. - skipVerify: false - - # -- The name of the Secret containing the NGINX Instance Manager CA certificate. - # Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). - caSecretName: "" - - # -- The name of the Secret containing the client certificate and key for authenticating with NGINX Instance Manager. - # Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). - clientSSLSecretName: "" - - # -- Enable enforcement of the initial NGINX Plus licensing report. If set to false, the initial report is not enforced. - enforceInitialReport: true - - # @schema - # type: object - # properties: - # disableHTTP2: - # description: DisableHTTP2 defines if http2 should be disabled for all servers. - # type: boolean - # disableSNIHostValidation: - # description: DisableSNIHostValidation disables the validation that ensures the SNI hostname matches the Host header in HTTPS requests. This resolves HTTP/2 connection coalescing issues with wildcard certificates but introduces security risks as described in Gateway API GEP-3567. - # type: boolean - # ipFamily: - # description: IPFamily specifies the IP family to be used by the NGINX. - # type: string - # enum: - # - ipv4 - # - ipv6 - # - dual - # rewriteClientIP: - # type: object - # description: RewriteClientIP defines configuration for rewriting the client IP to the original client's IP. - # properties: - # mode: - # type: string - # enum: - # - ProxyProtocol - # - XForwardedFor - # setIPRecursively: - # type: boolean - # trustedAddresses: - # type: array - # items: - # properties: - # type: - # type: string - # enum: - # - CIDR - # - IPAddress - # - Hostname - # value: - # type: string - # telemetry: - # type: object - # description: Telemetry specifies the OpenTelemetry configuration. - # properties: - # exporter: - # type: object - # properties: - # endpoint: - # type: string - # pattern: ^(?:http?:\/\/)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(?::\d{1,5})?$ - # interval: - # type: string - # pattern: ^\d{1,4}(ms|s)?$ - # batchSize: - # type: integer - # minimum: 0 - # batchCount: - # type: integer - # minimum: 0 - # serviceName: - # type: string - # pattern: ^[a-zA-Z0-9_-]+$ - # spanAttributes: - # type: array - # items: - # properties: - # key: - # type: string - # pattern: ^([^"$\\]|\\[^$])*$ - # minLength: 1 - # maxLength: 255 - # value: - # type: string - # pattern: ^([^"$\\]|\\[^$])*$ - # minLength: 1 - # maxLength: 255 - # disabledFeatures: - # type: array - # items: - # type: string - # enum: - # - DisableTracing - # metrics: - # type: object - # description: Metrics defines the configuration for Prometheus scraping metrics. - # properties: - # disable: - # type: boolean - # port: - # type: integer - # minimum: 1 - # maximum: 65535 - # logging: - # type: object - # description: Logging defines logging related settings for NGINX. - # properties: - # errorLevel: - # type: string - # enum: - # - debug - # - info - # - notice - # - warn - # - error - # - crit - # - alert - # - emerg - # agentLevel: - # type: string - # enum: - # - debug - # - info - # - error - # - panic - # - fatal - # nginxPlus: - # type: object - # description: NginxPlus specifies NGINX Plus additional settings. - # properties: - # allowedAddresses: - # type: array - # items: - # properties: - # type: - # type: string - # enum: - # - CIDR - # - IPAddress - # value: - # type: string - # workerConnections: - # type: integer - # minimum: 1 - # maximum: 65535 - # description: The number of worker connections for NGINX. Default is 1024. - # dnsResolver: - # type: object - # description: DNSResolver specifies the DNS resolver configuration for external name resolution. This enables support for routing to ExternalName Services. - # properties: - # addresses: - # type: array - # description: List of DNS server addresses. Each address specifies a type and value. - # items: - # type: object - # properties: - # type: - # type: string - # enum: - # - IPAddress - # - Hostname - # description: Type specifies the type of address. - # value: - # type: string - # minItems: 1 - # maxItems: 253 - # description: Value specifies the address value. - # required: - # - type - # - value - # minItems: 1 - # maxItems: 16 - # timeout: - # type: string - # description: Timeout specifies the timeout for name resolution. - # pattern: ^\d+[smhd]?$ - # cacheTTL: - # type: string - # description: CacheTTL specifies how long to cache DNS responses. - # pattern: ^\d+[smhd]?$ - # disableIPv6: - # type: boolean - # description: DisableIPv6 disables DisableIPv6 lookups. If not specified, or set to false, IPv6 lookups will be enabled. - # @schema - # -- The configuration for the data plane that is contained in the NginxProxy resource. This is applied globally to all Gateways - # managed by this instance of NGINX Gateway Fabric. - config: {} - - # -- The pod configuration for the NGINX data plane pod. This is applied globally to all Gateways managed by this - # instance of NGINX Gateway Fabric. - pod: {} - # -- The termination grace period of the NGINX data plane pod. - # terminationGracePeriodSeconds: 30 - - # -- Tolerations for the NGINX data plane pod. - # tolerations: [] - - # -- The nodeSelector of the NGINX data plane pod. - # nodeSelector: {} - - # -- The affinity of the NGINX data plane pod. - # affinity: {} - - # -- The topology spread constraints for the NGINX data plane pod. - # topologySpreadConstraints: [] - - # -- The volumes for the NGINX data plane pod. Use in conjunction with - # nginx.container.volumeMounts mount additional volumes to the container. - # volumes: [] - - # -- The container configuration for the NGINX container. This is applied globally to all Gateways managed by this - # instance of NGINX Gateway Fabric. - container: - # @schema - # type: array - # items: - # type: object - # properties: - # port: - # type: integer - # required: true - # minimum: 1 - # maximum: 65535 - # containerPort: - # type: integer - # required: true - # minimum: 1 - # maximum: 65535 - # @schema - # -- A list of HostPorts to expose on the host. - # This configuration allows containers to bind to a specific port on the host node, - # enabling external network traffic to reach the container directly through the host's IP address and port. - # Use this option when you need to expose container ports on the host for direct access, - # such as for debugging, legacy integrations, or when NodePort/LoadBalancer services are not suitable. - # Note: Using hostPort may have security and scheduling implications, as it ties pods to specific nodes and ports. - hostPorts: [] - # - port: 80 - # containerPort: 80 - - # -- The resource requirements of the NGINX container. You should set this value if you want to use dataplane Autoscaling(HPA). - resources: {} - - # -- The lifecycle of the NGINX container. - lifecycle: {} - - # -- volumeMounts are the additional volume mounts for the NGINX container. - volumeMounts: [] - - ## -- Defines the settings for the data plane readiness probe. This probe returns Ready when the NGINX data plane is ready to serve traffic. - readinessProbe: {} - # @schema - # type: integer - # minimum: 1 - # maximum: 65535 - # @schema - # -- Port in which the readiness endpoint is exposed. - # port: 8081 - - # -- The number of seconds after the Pod has started before the readiness probes are initiated. - # initialDelaySeconds: 3 - - # -- The service configuration for the NGINX data plane. This is applied globally to all Gateways managed by this - # instance of NGINX Gateway Fabric. - service: - # @schema - # enum: - # - ClusterIP - # - NodePort - # - LoadBalancer - # @schema - # -- The type of service to create for the NGINX data plane. - type: LoadBalancer - - # @schema - # enum: - # - Cluster - # - Local - # @schema - # -- The externalTrafficPolicy of the service. The value Local preserves the client source IP. - externalTrafficPolicy: Local - - # -- The static IP address for the load balancer. Requires nginx.service.type set to LoadBalancer. - loadBalancerIP: "" - - # -- LoadBalancerClass is the class of the load balancer implementation this Service belongs to. - # Requires nginx.service.type set to LoadBalancer. - loadBalancerClass: "" - - # -- The IP ranges (CIDR) that are allowed to access the load balancer. Requires nginx.service.type set to LoadBalancer. - loadBalancerSourceRanges: [] - - # @schema - # type: array - # items: - # type: object - # properties: - # port: - # type: integer - # required: true - # minimum: 1 - # maximum: 65535 - # listenerPort: - # type: integer - # required: true - # minimum: 1 - # maximum: 65535 - # @schema - # -- A list of NodePorts to expose on the NGINX data plane service. Each NodePort MUST map to a Gateway listener port, - # otherwise it will be ignored. The default NodePort range enforced by Kubernetes is 30000-32767. - nodePorts: [] - # - port: 30025 - # listenerPort: 80 - - # -- Custom patches to apply to the NGINX Service. - patches: [] - # -- Example: - # - type: JSONPatch - # value: - # - op: replace - # path: /spec/sessionAffinity - # value: "ClientIP" - - # -- Enable debugging for NGINX. Uses the nginx-debug binary. The NGINX error log level should be set to debug in the NginxProxy resource. - debug: false - -# -- The certGenerator section contains the configuration for the cert-generator Job. -certGenerator: - # -- The annotations of the cert-generator Job. - annotations: {} - - # -- The name of the Secret containing TLS CA, certificate, and key for the NGINX Gateway Fabric control plane - # to securely communicate with the NGINX Agent. Must exist in the same namespace that the NGINX Gateway Fabric - # control plane is running in (default namespace: nginx-gateway). - serverTLSSecretName: server-tls - - # -- The name of the base Secret containing TLS CA, certificate, and key for the NGINX Agent to securely - # communicate with the NGINX Gateway Fabric control plane. Must exist in the same namespace that the - # NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). - agentTLSSecretName: agent-tls - - # -- Overwrite existing TLS Secrets on startup. - overwrite: false - - # -- How long to wait after the cert generator job has finished before it is removed by the job controller. - ttlSecondsAfterFinished: 30 - - # -- Tolerations for the cert-generator pod. - tolerations: [] - - # -- The nodeSelector of the cert-generator pod. - nodeSelector: {} - - # -- The affinity of the cert-generator pod. - affinity: {} - - # -- The topology spread constraints for the cert-generator pod. - topologySpreadConstraints: [] - -# -- A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference. -gateways: [] - -# Example gateway object: -# name: nginx-gateway -# namespace: default -# labels: -# key: value -# annotations: -# annotationKey: annotationValue -# spec: -# gatewayClassName: nginx -# infrastructure: -# annotations: -# networking.gke.io/load-balancer-type: Internal -# listeners: -# - name: https -# port: 80 -# protocol: HTTPS -# tls: -# mode: Terminate -# certificateRefs: -# - kind: Secret -# name: my-secret -# namespace: certificate -# allowedRoutes: -# namespaces: -# from: Same diff --git a/operators/scripts/update-bundle.sh b/operators/scripts/update-bundle.sh new file mode 100755 index 0000000000..40336d32b9 --- /dev/null +++ b/operators/scripts/update-bundle.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# update-bundle.sh - Run after 'make bundle' to add missing scorecard fields + +CSV_FILE="bundle/manifests/nginx-gateway-fabric.clusterserviceversion.yaml" + +# Check if CSV file exists +if [ ! -f "$CSV_FILE" ]; then + echo "Error: CSV file not found at $CSV_FILE" + exit 1 +fi + +echo "Adding resources and specDescriptors to $CSV_FILE..." + +# Use yq to add the resources and specDescriptors +yq eval ' +.spec.customresourcedefinitions.owned[0].resources = [ + {"kind": "Deployment", "name": "", "version": "v1"}, + {"kind": "Service", "name": "", "version": "v1"}, + {"kind": "ConfigMap", "name": "", "version": "v1"}, + {"kind": "Secret", "name": "", "version": "v1"}, + {"kind": "ServiceAccount", "name": "", "version": "v1"}, + {"kind": "ClusterRole", "name": "", "version": "v1"}, + {"kind": "ClusterRoleBinding", "name": "", "version": "v1"} +] | +.spec.customresourcedefinitions.owned[0].specDescriptors = [ + {"path": "clusterDomain", "displayName": "Cluster Domain", "description": "The DNS cluster domain of your Kubernetes cluster", "x-descriptors": ["urn:alm:descriptor:com.tectonic.ui:text"]}, + {"path": "nginxGateway", "displayName": "NGINX Gateway Configuration", "description": "Configuration for the NGINX Gateway Fabric control plane", "x-descriptors": ["urn:alm:descriptor:com.tectonic.ui:fieldGroup:NGINX Gateway"]}, + {"path": "nginx", "displayName": "NGINX Configuration", "description": "Configuration for NGINX data plane deployments", "x-descriptors": ["urn:alm:descriptor:com.tectonic.ui:fieldGroup:NGINX"]}, + {"path": "gateways", "displayName": "Gateways", "description": "List of Gateway objects to create", "x-descriptors": ["urn:alm:descriptor:com.tectonic.ui:fieldGroup:Gateways"]}, + {"path": "certGenerator", "displayName": "Certificate Generator", "description": "Configuration for TLS certificate generation", "x-descriptors": ["urn:alm:descriptor:com.tectonic.ui:fieldGroup:Certificate Generator"]} +] +' -i "$CSV_FILE" + +echo "Bundle updates applied successfully!" diff --git a/operators/scripts/update-ngf-img-version.sh b/operators/scripts/update-ngf-img-version.sh new file mode 100755 index 0000000000..97abacd932 --- /dev/null +++ b/operators/scripts/update-ngf-img-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +# Get NGF version from Chart.yaml +NGF_VERSION=$(grep "^appVersion:" ../charts/nginx-gateway-fabric/Chart.yaml | sed 's/appVersion: *//g' | tr -d '"') + +echo "Using NGF version: $NGF_VERSION" + +# Update sample file image tags +sed -i '' "s/tag: .*/tag: \"$NGF_VERSION\"/" config/samples/gateway_v1alpha1_nginxgatewayfabric.yaml + +echo "Done. Run 'make bundle' next." From 090226e9bf94ed1d868ec57d1b634582a5210551 Mon Sep 17 00:00:00 2001 From: Ciara Stacke Date: Thu, 25 Sep 2025 16:46:09 +0100 Subject: [PATCH 2/3] Run generate-all --- deploy/azure/deploy.yaml | 22 +++++++++++++++++-- deploy/default/deploy.yaml | 22 +++++++++++++++++-- deploy/experimental-nginx-plus/deploy.yaml | 22 +++++++++++++++++-- deploy/experimental/deploy.yaml | 22 +++++++++++++++++-- deploy/nginx-plus/deploy.yaml | 22 +++++++++++++++++-- deploy/nodeport/deploy.yaml | 22 +++++++++++++++++-- deploy/openshift/deploy.yaml | 22 +++++++++++++++++-- .../snippets-filters-nginx-plus/deploy.yaml | 22 +++++++++++++++++-- deploy/snippets-filters/deploy.yaml | 22 +++++++++++++++++-- 9 files changed, 180 insertions(+), 18 deletions(-) diff --git a/deploy/azure/deploy.yaml b/deploy/azure/deploy.yaml index ebf34b3d51..90e260460e 100644 --- a/deploy/azure/deploy.yaml +++ b/deploy/azure/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/default/deploy.yaml b/deploy/default/deploy.yaml index 3dd9d44a74..7dc53fe54a 100644 --- a/deploy/default/deploy.yaml +++ b/deploy/default/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/experimental-nginx-plus/deploy.yaml b/deploy/experimental-nginx-plus/deploy.yaml index dd08105202..4ea4257289 100644 --- a/deploy/experimental-nginx-plus/deploy.yaml +++ b/deploy/experimental-nginx-plus/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/experimental/deploy.yaml b/deploy/experimental/deploy.yaml index 4c837b8d90..6b9ff2594b 100644 --- a/deploy/experimental/deploy.yaml +++ b/deploy/experimental/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/nginx-plus/deploy.yaml b/deploy/nginx-plus/deploy.yaml index 21ded9d595..c7719908b2 100644 --- a/deploy/nginx-plus/deploy.yaml +++ b/deploy/nginx-plus/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/nodeport/deploy.yaml b/deploy/nodeport/deploy.yaml index fec6d7ca21..05bffae4c8 100644 --- a/deploy/nodeport/deploy.yaml +++ b/deploy/nodeport/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/openshift/deploy.yaml b/deploy/openshift/deploy.yaml index 61710631b0..cc837ac8d5 100644 --- a/deploy/openshift/deploy.yaml +++ b/deploy/openshift/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/snippets-filters-nginx-plus/deploy.yaml b/deploy/snippets-filters-nginx-plus/deploy.yaml index ce0c7cb908..9459a2673c 100644 --- a/deploy/snippets-filters-nginx-plus/deploy.yaml +++ b/deploy/snippets-filters-nginx-plus/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create diff --git a/deploy/snippets-filters/deploy.yaml b/deploy/snippets-filters/deploy.yaml index 1fe7cb5174..2500399f2e 100644 --- a/deploy/snippets-filters/deploy.yaml +++ b/deploy/snippets-filters/deploy.yaml @@ -55,15 +55,33 @@ metadata: rules: - apiGroups: - "" - - apps - - autoscaling resources: - secrets - configmaps - serviceaccounts - services + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - apps + resources: - deployments - daemonsets + verbs: + - create + - update + - delete + - list + - get + - watch +- apiGroups: + - autoscaling + resources: - horizontalpodautoscalers verbs: - create From 2fe951d34622b63f3807e0341683e462b97a664e Mon Sep 17 00:00:00 2001 From: Ciara Stacke Date: Thu, 25 Sep 2025 17:17:31 +0100 Subject: [PATCH 3/3] Update yamllint ignore --- .pre-commit-config.yaml | 9 +++------ .yamllint.yaml | 6 ++---- .../gateway.nginx.org_nginxgatewayfabrics.yaml | 3 +-- operators/config/default/kustomization.yaml | 13 +------------ operators/config/prometheus/kustomization.yaml | 2 -- operators/config/prometheus/monitor.yaml | 5 ----- 6 files changed, 7 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3c0dbe60a..63ba54bd29 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,14 +5,11 @@ repos: rev: v6.0.0 hooks: - id: trailing-whitespace - exclude: (^operators/|^tests/results/|\.avdl$|_generated.go$) + exclude: (^tests/results/|\.avdl$|_generated.go$) - id: end-of-file-fixer - exclude: (^operators/) - id: check-yaml args: [--allow-multiple-documents] - exclude: (^operators/|^charts/nginx-gateway-fabric/templates) - - id: check-added-large-files - exclude: (^operators/) + exclude: (^charts/nginx-gateway-fabric/templates) - id: check-merge-conflict - id: check-case-conflict - id: check-vcs-permalinks @@ -26,7 +23,7 @@ repos: args: [--fix=lf] - id: no-commit-to-branch - id: detect-private-key - exclude: (^operators/|^examples/|^docs/|.*_test.go$) + exclude: (^examples/|^docs/|.*_test.go$) - repo: https://github.com/gitleaks/gitleaks rev: v8.28.0 diff --git a/.yamllint.yaml b/.yamllint.yaml index a663c10f4d..2ba44f7656 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -4,7 +4,6 @@ ignore: - config/crd/bases/ - deploy - site/static - - operators/ rules: braces: enable @@ -18,7 +17,6 @@ rules: comments-indentation: ignore: | charts/nginx-gateway-fabric/values.yaml - operators/ document-end: disable document-start: disable empty-lines: enable @@ -30,7 +28,7 @@ rules: indent-sequences: consistent check-multi-line-strings: true ignore: | - operators/ + operators/**/* key-duplicates: enable key-ordering: disable line-length: @@ -42,6 +40,7 @@ rules: tests/suite/manifests/longevity/cronjob.yaml .goreleaser.yml charts/nginx-gateway-fabric/ + operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml new-line-at-end-of-file: enable new-lines: enable octal-values: disable @@ -50,4 +49,3 @@ rules: truthy: ignore: | .github/workflows/ - operators/ diff --git a/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml b/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml index 4406876fda..4220ece70f 100644 --- a/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml +++ b/operators/config/crd/bases/gateway.nginx.org_nginxgatewayfabrics.yaml @@ -41,7 +41,7 @@ spec: type: object x-kubernetes-preserve-unknown-fields: true nginx: - description: Configuration for NGINX data plane deployments + description: Configuration for NGINX data plane deployments type: object x-kubernetes-preserve-unknown-fields: true gateways: @@ -83,4 +83,3 @@ spec: enum: ["Pending", "Installing", "Ready", "Failed"] subresources: status: {} - \ No newline at end of file diff --git a/operators/config/default/kustomization.yaml b/operators/config/default/kustomization.yaml index 3b3732ee1d..5f73b3bccd 100644 --- a/operators/config/default/kustomization.yaml +++ b/operators/config/default/kustomization.yaml @@ -8,25 +8,14 @@ namespace: nginx-gateway-fabric-system # field above. namePrefix: nginx-gateway-fabric- -# Labels to add to all resources and selectors. -#labels: -#- includeSelectors: true -# pairs: -# someName: someValue - resources: - ../crd - ../rbac - ../manager # [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. -#- ../prometheus +# - ../prometheus # [METRICS] Expose the controller manager metrics service. - metrics_service.yaml -# [NETWORK POLICY] Protect the /metrics endpoint and Webhook Server with NetworkPolicy. -# Only Pod(s) running a namespace labeled with 'metrics: enabled' will be able to gather the metrics. -# Only CR(s) which requires webhooks and are applied on namespaces labeled with 'webhooks: enabled' will -# be able to communicate with the Webhook Server. -#- ../network-policy # Uncomment the patches line if you enable Metrics patches: diff --git a/operators/config/prometheus/kustomization.yaml b/operators/config/prometheus/kustomization.yaml index 251300f2b6..ed137168a1 100644 --- a/operators/config/prometheus/kustomization.yaml +++ b/operators/config/prometheus/kustomization.yaml @@ -1,4 +1,2 @@ resources: - monitor.yaml - - diff --git a/operators/config/prometheus/monitor.yaml b/operators/config/prometheus/monitor.yaml index 318393fb35..6d9d59f74a 100644 --- a/operators/config/prometheus/monitor.yaml +++ b/operators/config/prometheus/monitor.yaml @@ -15,11 +15,6 @@ spec: scheme: https bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token tlsConfig: - # TODO(user): The option insecureSkipVerify: true is not recommended for production since it disables - # certificate verification, exposing the system to potential man-in-the-middle attacks. - # For production environments, it is recommended to use cert-manager for automatic TLS certificate management. - # To apply this configuration, enable cert-manager and use the patch located at config/prometheus/servicemonitor_tls_patch.yaml, - # which securely references the certificate from the 'metrics-server-cert' secret. insecureSkipVerify: true selector: matchLabels: