Skip to content

openshift/cluster-resource-override-admission

Repository files navigation

Overview

ClusterResourceOverride Mutating Webhook Server.

Developer Workflow

Deploy

Prerequisites:

ClusterResourceOverride Admission Webhook Operator is located at cluster-resource-override-admission-operator.

ClusterResourceOverride Parameters

The file artifacts/configuration.yaml is copied to /etc/clusterresourceoverride/config/override.yaml inside the docker image. If you want to change the parameters then edit the file and rebuild the image.

apiVersion: v1
kind: ClusterResourceOverrideConfig
spec:
  memoryRequestToLimitPercent: 50
  cpuRequestToLimitPercent: 25
  limitCPUToMemoryPercent: 200

ClusterResourceOverride admission webhook server loads the configuration file when it starts.

Build:

make build

Build and push image:

# make local-image DEV_IMAGE_REGISTRY={url to repository} IMAGE_TAG={tag}
# Specify your image builder with IMAGE_BUILDER=podman|docker|buildah. Defaults to podman.
make local-image IMAGE_TAG_BASE=docker.io/redhat/clusterresourceoverride IMAGE_VERSION=dev

make local-push IMAGE_TAG_BASE=docker.io/redhat/clusterresourceoverride IMAGE_VERSION=dev

Deploy

If you build your own image then edit the deployment.yaml file inside artifacts/manifests and point to the right image.

    spec:
      serviceAccountName: clusterresourceoverride
      containers:
        - name: clusterresourceoverride
          image: docker.io/redhat/clusterresourceoverride:dev
          imagePullPolicy: Always

# generate manifests
make manifests

kubectl apply -f _output/manifests

About

Mutating admission webhook for ClusterResourceOverride

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published