Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 1.3.4
VERSION ?= 1.3.5

# First OCP release carrying the Kubernetes minor the operator needs (1.28 = OCP 4.15).
OPENSHIFT_VERSIONS ?= v4.15
# Image URL to use all building/pushing image targets
IMG ?= ghcr.io/inditextech/k8s-overcommit-operator:$(VERSION)
# IMAGE_TAG_BASE defines the docker.io namespace and part of the image name for remote images.
Expand Down Expand Up @@ -279,6 +282,12 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
$(OPERATOR_SDK) generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
# operator-sdk does not carry the OpenShift catalog annotation from the CSV into the
# bundle metadata, so it is injected here to survive regeneration.
grep -q 'com.redhat.openshift.versions' bundle/metadata/annotations.yaml || \
sed -i '/^annotations:/a\ com.redhat.openshift.versions: $(OPENSHIFT_VERSIONS)' bundle/metadata/annotations.yaml
grep -q 'com.redhat.openshift.versions' bundle.Dockerfile || \
sed -i '/^FROM scratch/a LABEL com.redhat.openshift.versions=$(OPENSHIFT_VERSIONS)' bundle.Dockerfile
$(OPERATOR_SDK) bundle validate ./bundle
mkdir -p deploy/olm/$(VERSION)
cp -r bundle/manifests/* deploy/olm/$(VERSION)/
Expand Down
1 change: 1 addition & 0 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM scratch
LABEL com.redhat.openshift.versions=v4.15

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
Expand Down
77 changes: 51 additions & 26 deletions bundle/manifests/k8s-overcommit.clusterserviceversion.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
annotations:
com.redhat.openshift.versions: v4.15
# Core bundle annotations.
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.manifests.v1: manifests/
Expand Down
18 changes: 18 additions & 0 deletions bundle/metadata/dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
dependencies:
# The operator issues a cert-manager Certificate and Issuer for every
# OvercommitClass, so cert-manager is mandatory: without it the generated
# mutating webhooks never get a serving certificate and pod admission fails.
#
# Declared as olm.gvk (not olm.package) on purpose: any provider of the API
# satisfies it, so a cluster that already runs cert-manager outside OLM
# (helm, manifests) does not get a second cert-manager installed on top.
- type: olm.gvk
value:
group: cert-manager.io
kind: Certificate
version: v1
- type: olm.gvk
value:
group: cert-manager.io
kind: Issuer
version: v1
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: k8s-overcommit-operator
description: K8s overcommit operator Helm chart for deploying the overcommit operator
type: application
version: "1.0.0"
appVersion: "1.3.4"
appVersion: "1.3.5"
maintainers:
- name: Enrique Andrés Villar
email: enriqueavi@inditex.dev
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/02-overcommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: Apache-2.0

{{ if .Values.createOvercommit}}
{{ if .Values.createOvercommit }}
apiVersion: overcommit.inditex.dev/v1alphav1
kind: Overcommit
metadata:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/03-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
args:
- --metrics-bind-address=:8080
- -metrics-secure=false
image: {{$.Values.deployment.image.registry}}/{{$.Values.deployment.image.image}}:{{$.Values.deployment.image.tag}}
image: {{ $.Values.deployment.image.registry }}/{{ $.Values.deployment.image.image }}:{{ $.Values.deployment.image.tag }}
env:
- name: ENABLE_OVERCOMMIT_CONTROLLER
value: 'true'
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/04-overcommitClass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: Apache-2.0

{{ if $.Values.createClasses}}
{{ if $.Values.createClasses }}
---
apiVersion: overcommit.inditex.dev/v1alphav1
kind: OvercommitClass
Expand Down
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ deployment:
# -- Image name
image: inditextech/k8s-overcommit-operator
# -- Image tag
tag: 1.3.4
tag: 1.3.5
resources:
requests:
# -- CPU request for the container
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/inditextech/k8s-overcommit-operator
newTag: 1.3.4
newTag: 1.3.5
56 changes: 37 additions & 19 deletions config/manifests/bases/k8s-overcommit.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ metadata:
annotations:
alm-examples: '[]'
capabilities: Basic Install
categories: OpenShift Optional
com.redhat.openshift.versions: v4.15
containerImage: ghcr.io/inditextech/k8s-overcommit-operator:1.3.5
description: Lower pod resource requests from declarative overcommit classes,
so the scheduler can pack more workloads per node.
repository: https://github.com/InditexTech/k8s-overcommit-operator
support: https://github.com/InditexTech/k8s-overcommit-operator/issues
name: k8s-overcommit.v0.0.0
namespace: placeholder
spec:
Expand All @@ -20,19 +27,22 @@ spec:
kind: Overcommit
name: overcommits.overcommit.inditex.dev
version: v1
required:
- description: Certificate resource from cert-manager
displayName: Certificate
kind: Certificate
name: certificates.cert-manager.io
version: v1
- description: Issuer resource from cert-manager
displayName: Issuer
kind: Issuer
name: issuers.cert-manager.io
version: v1
description: Operator for make overcommit to pods based in classes
displayName: k8s-overcommit-operator
description: |
The K8s Overcommit Operator manages pod resource overcommit on Kubernetes clusters.
It rewrites container requests at admission time as ratio x limit, driven by
declarative OvercommitClass resources, so the scheduler can pack more workloads per
node without touching the limits that protect the node.

### Features
- Overcommit classes with per-class CPU and memory ratios, namespace exclusions, node selectors and tolerations.
- One mutating webhook per class, generated and reconciled by the operator itself.
- Default class for namespace-level opt-in through a single label.
- Idempotent mutation: pods already processed by a class are skipped on re-admission.

### Prerequisites
- cert-manager is mandatory: the operator issues a Certificate and an Issuer for every overcommit class, and without them the generated mutating webhooks never get a serving certificate. The bundle declares it as an OLM dependency on cert-manager.io/v1 (Certificate, Issuer), so OLM installs cert-manager when no operator provides that API.
- The operator installs cluster-wide (AllNamespaces) and creates MutatingWebhookConfigurations.
displayName: K8s Overcommit Operator
icon:
- base64data: ""
mediatype: ""
Expand All @@ -53,14 +63,22 @@ spec:
- ocp
- k8s
- overcommit
- scheduling
- capacity
- resources
links:
- name: K8s Overcommit
url: https://k8s-overcommit.domain
- name: K8s Overcommit Operator Documentation
url: https://github.com/InditexTech/k8s-overcommit-operator/tree/1.3.5/docs
- name: K8s Overcommit Operator Source Code
url: https://github.com/InditexTech/k8s-overcommit-operator
- name: Blog Post
url: https://medium.com/@InditexTech/when-is-a-cluster-really-full-unlocking-hidden-capacity-with-the-k8s-overcommit-operator-9fd75af95712
maintainers:
- email: enriqueavi@inditex.com
name: enriqueAndresVillar
- email: lddinfrapaas@inditex.com
name: Enrique Andrés Villar
maturity: alpha
minKubeVersion: 1.22.0
minKubeVersion: 1.28.0
provider:
name: inditexTech
name: InditexTech
url: https://github.com/InditexTech
version: 0.0.0
2 changes: 1 addition & 1 deletion config/manifests/patches/icon.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/samples/overcommit_v1_overcommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
app.kubernetes.io/managed-by: kustomize
name: overcommit-sample
spec:
# TODO(user): Add fields here
overcommitLabel: inditex.com/overcommit-class
5 changes: 4 additions & 1 deletion config/samples/overcommit_v1_overcommitclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ metadata:
app.kubernetes.io/managed-by: kustomize
name: overcommitclass-sample
spec:
# TODO(user): Add fields here
cpuOvercommit: 0.5
memoryOvercommit: 0.8
isDefault: false
excludedNamespaces: ".*(kube|openshift|k8s-overcommit).*"
2 changes: 1 addition & 1 deletion deploy/catalog_source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
namespace: olm
spec:
sourceType: grpc
image: ghcr.io/inditextech/k8s-overcommit-operator-catalog:1.3.4
image: ghcr.io/inditextech/k8s-overcommit-operator-catalog:1.3.5
displayName: K8s Overcommit Operator Catalog
publisher: Inditex Tech
29 changes: 29 additions & 0 deletions deploy/chart/1.3.5/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
# SPDX-FileContributor: enriqueavi@inditex.com
#
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: v2
name: k8s-overcommit-operator
description: K8s overcommit operator Helm chart for deploying the overcommit operator
type: application
version: "1.0.0"
appVersion: "1.3.5"
maintainers:
- name: Enrique Andrés Villar
email: enriqueavi@inditex.dev
- name: Javier Terceiro López
email: javiertl@inditex.dev
keywords:
- kubernetes
- openshift
- operator
- overcommit
- resource-management
- cluster-optimization
- scheduling
- performance
- inditex
sources:
- https://github.com/InditexTech/k8s-overcommit-operator
Loading
Loading