The ibm common service webhook is used to inject other runtime requirements into the Pod at creation time. Mutating admission webhooks are invoked first, and can modify objects sent to the API server to enforce custom defaults. A CustomResourceDefinition (CRD) called PodPreset in the operator.ibm.com
API group has the same specifications as upstream API resources.
This operator will install single-request-reopen
into the dnsConfig of the pods and also it can support propreset functions from upstream. You can take a look at How to use podpreset for more information.
The following is an example of a PodPreset that injects to pods with the label app: nginx
in the nginx-namespace
namespce.
apiVersion: operator.ibm.com/v1alpha1
kind: PodPreset
metadata:
name: nginx-patch
namespce: nginx-namespace
spec:
selector:
matchLabels:
app: nginx
The ibm common service webhook will be installed by ibm common service operator in 2Q 2020.
By default the following PodPreset is installed
apiVersion: operator.ibm.com/v1alpha1
kind: PodPreset
metadata:
name: ibm-common-service-webhook
namespace: ibm-common-services
spec: {}
The webhook will insert all the pods in the ibm-common-service
namespace.
If Cloud Paks want to use this webhook to solve the dns issue. Cloud Paks can create the PodPreset is the Cloud Pak namespaces.
apiVersion: operator.ibm.com/v1alpha1
kind: PodPreset
metadata:
name: ibm-common-service-webhook
namespace: ibm-cloud-paks
spec: {}
Then all the pods in the ibm-cloud-paks
namespace will be inserted by the webhook.