ratify-gatekeeper-provider
A Helm chart for Ratify Gatekeeper Provider
About this chart
Ratify Helm Chart
Get Repo Info
helm repo add ratify https://notaryproject.github.io/ratify
helm repo update
See helm repo for command documentation.
Install Chart
# Helm install with gatekeeper-system namespace already created
$ helm install [RELEASE_NAME] ratify/ratify-gatekeeper-provider --atomic --namespace gatekeeper-system --set image.tag=<RELEASE_TAG>
# Helm install and create namespace
$ helm install [RELEASE_NAME] ratify/ratify-gatekeeper-provider --atomic --namespace gatekeeper-system --create-namespace --set image.tag=<RELEASE_TAG>
See parameters below.
See helm install for command documentation.
Upgrade Chart
$ helm upgrade -n gatekeeper-system [RELEASE_NAME] ratify/ratify-gatekeeper-provider --set image.tag=<RELEASE_TAG>
Upgrading CRDs
[!IMPORTANT] Helm intentionally does not update CRDs that ship in a chart's
crds/directory duringhelm upgrade— it only installs them on the firsthelm install. See Helm's CRD limitations.
When a release of this chart changes the config.ratify.sh CRDs (for example
adding the v2beta1 version of Executor / NamespacedExecutor), a plain
helm upgrade will keep the old CRDs. Because the Ratify controllers watch
the new storage version and the bundled Executor hook object uses it, running
against stale CRDs can cause the controller to fail to start or the pre-upgrade
hook to be rejected by the API server.
While Ratify v2 is in the beta phase, CRD changes are delivered by
reinstalling the chart rather than through an automated in-place upgrade:
# 1. Uninstall the existing release (custom resources you created are preserved;
# only the release's templated objects are removed).
$ helm uninstall -n gatekeeper-system [RELEASE_NAME]
# 2. Apply the updated CRDs shipped with the new chart version.
$ helm pull ratify/ratify-gatekeeper-provider --version <NEW_CHART_VERSION> --untar
$ kubectl apply -f ratify-gatekeeper-provider/crds/
# 3. Reinstall the chart at the new version.
$ helm install [RELEASE_NAME] ratify/ratify-gatekeeper-provider \
--atomic --namespace gatekeeper-system --set image.tag=<RELEASE_TAG>
Alternatively, apply the CRDs directly from the tag before upgrading:
$ kubectl apply -f https://raw.githubusercontent.com/notaryproject/ratify/<RELEASE_TAG>/deployments/ratify-gatekeeper-provider/crds/executors.config.ratify.sh.yaml
$ kubectl apply -f https://raw.githubusercontent.com/notaryproject/ratify/<RELEASE_TAG>/deployments/ratify-gatekeeper-provider/crds/namespacedexecutors.config.ratify.sh.yaml
The v2alpha1 version is retained as a served, deprecated version alongside the
new v2beta1 storage version, and both share an identical schema (conversion
strategy None), so existing v2alpha1 objects continue to be readable once the
updated CRDs are applied.
Deprecation Policy
Values marked # DEPRECATED in the values.yaml as well as DEPRECATED in the below parameters will NOT be supported in the next major version release. Existing functionality will remain backwards compatible until the next major version release.
Parameters
| Parameter | Description | Default |
|---|---|---|
image.repository | Ratify app image | ghcr.io/notaryproject/ratify-gatekeeper-provider |
image.tag | Image tag | <INSERT THE LATEST RELEASE TAG> |
image.pullPolicy | Image pull policy | IfNotPresent |
replicaCount | Number of replicas to run | 1 |
logger.level | Log level for the provider (panic, fatal, error, warning, info, debug, trace). | info |
resources.requests.cpu | CPU request for the provider container. Required for CPU-based autoscaling (HPA). | 600m |
resources.requests.memory | Memory request for the provider container. | 512Mi |
resources.limits.cpu | CPU limit for the provider container. | 1000m |
resources.limits.memory | Memory limit for the provider container. | 512Mi |
metrics.enabled | Expose the Prometheus /metrics endpoint (adds the container port and pod scrape annotations). | true |
metrics.port | Port for the /metrics endpoint. | 8888 |
notation.scopes | Scopes that Notation verifier is applicable for. See Notation trust policy. | [] |
notation.trustedIdentities | List of trusted identities for Notation verifier. See Notation trust policy. | [] |
notation.certs | List of trusted root certificates for Notation verifier. | [] |
stores[0].scopes | Scopes that the store is applicable for. If it's not set, it will be overridden by the executor's scopes. | [] |
stores[0].username | Username to authenticate to the store. | "" |
executor.scopes | Scopes that the executor is applicable for. And it MUST NOT be empty for the executor to be valid. | [] |
executor.concurrency | The maximum number of concurrent execution per validation request. | 3 |
stores[0].password | Password to authenticate to the store. | "" |
stores[0].credential.provider | Credential provider used to authenticate to the store. Supported values include static, azure, aws, alibabacloud. | static |
stores[0].credential.region | AWS region used to call Amazon ECR. Optional; derived from the ECR registry host (e.g. 123456789012.dkr.ecr.us-east-1.amazonaws.com) if not set. Only applies when stores[0].credential.provider is aws, which authenticates with IAM Roles for Service Accounts (IRSA): add the eks.amazonaws.com/role-arn annotation to serviceAccount.annotations. | "" |
stores[0].credential.defaultInstanceId | Alibaba Cloud Container Registry Enterprise Edition instance ID used for registries not listed in stores[0].credential.acrInstancesConfig. Only applies when stores[0].credential.provider is alibabacloud, which authenticates with RAM Roles for Service Accounts (RRSA): add the pod-identity.alibabacloud.com/role-name annotation to serviceAccount.annotations and the pod-identity.alibabacloud.com/injection=on label to the release namespace. Either this or stores[0].credential.acrInstancesConfig is required. | "" |
stores[0].credential.acrInstancesConfig | List of Alibaba Cloud Container Registry Enterprise Edition instances, each with instanceName (e.g. myinstance for myinstance-registry.cn-hangzhou.cr.aliyuncs.com) and instanceId. Only applies when stores[0].credential.provider is alibabacloud. | [] |
provider.tls.crt | Ratify Gatekeeper Provider's TLS public certificate. | "" |
provider.tls.key | Ratify Gatekeeper Provider's TLS private key. | "" |
provider.tls.caCert | CA certificate to verify the TLS certificate. | "" |
provider.tls.disableCertRotation | Disable automatic TLS certificate rotation. When cert rotation is enabled, tls.crt, tls.key and tls.caCert are not required. | false |
provider.disableCRDManager | Disable CRD manager to manage the executor CRDs. This is useful when you want to configure executors through mounted config.json. | false |
provider.disableMutation | Enables/disables tag-to-digest mutation for all admission resource creations. It is highly recommended to enable mutation since the verified digest may be different from the one run. | false |
provider.mutationExcludedNamespaces | Additional namespaces to exclude from the mutation webhook Assign objects, beyond the hardcoded defaults (gatekeeper-system, kube-system, release namespace). Use this to exclude critical infrastructure namespaces (e.g. CNI DaemonSet namespaces) that must not be blocked when Ratify is temporarily unavailable. | [] |
provider.timeout.validationTimeoutSeconds | Verify request handler timeout in seconds. This MUST match the c |
Deploy ratify-gatekeeper-provider with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ratify-gatekeeper-provider on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartratify-gatekeeper-provider is pinned at v2.0.0-dev in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply