This section provides solutions to common issues encountered when using digester.
If your container image registry uses a self-signed certificate, or a
certificate issued by a certificate authority (CA) that is not trusted by the
CA bundle used by digester
(ca-certificates
), you
can configure digester with your own CA bundle.
To do so, set the
SSL_CERT_FILE
or SSL_CERT_DIR
environment variables
on the manager
container in the webhook
deployment resource.
The steps below use the SSL_CERT_DIR
environment variable.
-
Create a Kubernetes generic Secret containing you CA bundle certificates, called
my-ca-bundle
, in thedigester-system
namespace:kubectl create secret generic my-ca-bundle --namespace digester-system \ --from-file=cert1=/path/to/cert1 --from-file=cert2=/path/to/cert2
-
Create a JSON patch file called
ca-bundle-patch.json
that adds theSSL_CERT_DIR
environment variable, a volume, and a volume mount to the webhook deployment:[ { "op": "add", "path": "/spec/template/spec/containers/0/env/-", "value":{ "name": "SSL_CERT_DIR", "value": "/my-ca-certs" } }, { "op": "add", "path": "/spec/template/spec/containers/0/volumeMounts/-", "value":{ "mountPath": "/my-ca-certs", "name": "my-ca-bundle-volume", "readOnly": true } }, { "op": "add", "path": "/spec/template/spec/volumes/-", "value": { "name": "my-ca-bundle-volume", "secret": { "defaultMode": 420, "secretName": "my-ca-bundle" } } } ]
-
Apply the patch:
kubectl patch deployment/digester-controller-manager -n digester-system \ --type json --patch-file ca-bundle-patch.json
Ref: https://knative.dev/docs/serving/tag-resolution/#custom-certificates
If digester needs to traverse a corporate HTTP proxy to reach the container registry, you can configure digester to use the proxy.
To do so, set the
HTTP_PROXY
or HTTPS_PROXY
environment variables
on the manager
container in the webhook
deployment resource.
The steps below use the HTTPS_PROXY
environment variable.
-
Create a JSON patch file called
http-proxy-patch.json
that adds theHTTPS_PROXY
environment variable to the webhook deployment:[ { "op": "add", "path": "/spec/template/spec/containers/0/env/-", "value":{ "name": "HTTPS_PROXY", "value": "http://myproxy.example.com:3128" } } ]
-
Apply the patch:
kubectl patch deployment/digester-controller-manager -n digester-system \ --type json --patch-file http-proxy-patch.json
Note that this will not work for proxies that require NTLM authentication.
Ref: https://knative.dev/docs/serving/tag-resolution/#corporate-proxy