You can override the default configurations for some specific deployments by modifying the deployments
spec in the KnativeServing
custom resource (CR). Currently, overriding default configuration settings is supported for the replicas
, labels
, annotations
, and nodeSelector
fields.
In the following example, a KnativeServing
CR overrides the webhook
deployment so that:
-
The deployment has 3 replicas.
-
The label is set to example-label: label
.
-
The label example-label: label
is added.
-
The nodeSelector
field is set to select nodes with the disktype: hdd
label.
|
The KnativeServing CR label and annotation settings override the deployment’s labels and annotations for both the deployment itself and the resulting pods.
|
KnativeServing CR example
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: ks
namespace: knative-serving
spec:
high-availability:
replicas: 2
deployments:
- name: webhook
replicas: 3
labels:
example-label: label
annotations:
example-annotation: annotation
nodeSelector:
disktype: hdd