ratify-gatekeeper-provider

by ratify-project

Helm chartv2.0.0-devApp devVerified publisher

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 during helm upgrade — it only installs them on the first helm 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

ParameterDescriptionDefault
image.repositoryRatify app imageghcr.io/notaryproject/ratify-gatekeeper-provider
image.tagImage tag<INSERT THE LATEST RELEASE TAG>
image.pullPolicyImage pull policyIfNotPresent
replicaCountNumber of replicas to run1
logger.levelLog level for the provider (panic, fatal, error, warning, info, debug, trace).info
resources.requests.cpuCPU request for the provider container. Required for CPU-based autoscaling (HPA).600m
resources.requests.memoryMemory request for the provider container.512Mi
resources.limits.cpuCPU limit for the provider container.1000m
resources.limits.memoryMemory limit for the provider container.512Mi
metrics.enabledExpose the Prometheus /metrics endpoint (adds the container port and pod scrape annotations).true
metrics.portPort for the /metrics endpoint.8888
notation.scopesScopes that Notation verifier is applicable for. See Notation trust policy.[]
notation.trustedIdentitiesList of trusted identities for Notation verifier. See Notation trust policy.[]
notation.certsList of trusted root certificates for Notation verifier.[]
stores[0].scopesScopes that the store is applicable for. If it's not set, it will be overridden by the executor's scopes.[]
stores[0].usernameUsername to authenticate to the store.""
executor.scopesScopes that the executor is applicable for. And it MUST NOT be empty for the executor to be valid.[]
executor.concurrencyThe maximum number of concurrent execution per validation request.3
stores[0].passwordPassword to authenticate to the store.""
stores[0].credential.providerCredential provider used to authenticate to the store. Supported values include static, azure, aws, alibabacloud.static
stores[0].credential.regionAWS 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.defaultInstanceIdAlibaba 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.acrInstancesConfigList 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.crtRatify Gatekeeper Provider's TLS public certificate.""
provider.tls.keyRatify Gatekeeper Provider's TLS private key.""
provider.tls.caCertCA certificate to verify the TLS certificate.""
provider.tls.disableCertRotationDisable automatic TLS certificate rotation. When cert rotation is enabled, tls.crt, tls.key and tls.caCert are not required.false
provider.disableCRDManagerDisable CRD manager to manage the executor CRDs. This is useful when you want to configure executors through mounted config.json.false
provider.disableMutationEnables/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.mutationExcludedNamespacesAdditional 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.validationTimeoutSecondsVerify 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartratify-gatekeeper-provider is pinned at v2.0.0-dev in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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