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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# 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.0.3
VERSION ?= 1.1.0
# 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
5 changes: 5 additions & 0 deletions api/v1alphav1/overcommit_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package v1alphav1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -24,6 +25,10 @@ type OvercommitSpec struct {
Labels map[string]string `json:"labels,omitempty"`
// +kubebuilder:validation:Optional
Annotations map[string]string `json:"annotations,omitempty"`
// +kubebuilder:validation:Optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// +kubebuilder:validation:Optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

// OvercommitStatus defines the observed state of Overcommit
Expand Down
5 changes: 5 additions & 0 deletions api/v1alphav1/overcommitclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package v1alphav1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)
Expand All @@ -32,6 +33,10 @@ type OvercommitClassSpec struct {
IsDefault bool `json:"isDefault,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
// +kubebuilder:validation:Optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// +kubebuilder:validation:Optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

type ResourceStatus struct {
Expand Down
35 changes: 32 additions & 3 deletions api/v1alphav1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions bundle/manifests/k8s-overcommit.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2025-10-06T10:56:30Z"
createdAt: "2025-10-06T15:18:15Z"
operators.operatorframework.io/builder: operator-sdk-v1.40.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
name: k8s-overcommit.v1.0.3
name: k8s-overcommit.v1.1.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -221,7 +221,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: ghcr.io/inditextech/k8s-overcommit-operator:1.0.3
image: ghcr.io/inditextech/k8s-overcommit-operator:1.1.0
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -313,4 +313,4 @@ spec:
minKubeVersion: 1.22.0
provider:
name: inditexTech
version: 1.0.3
version: 1.1.0
42 changes: 42 additions & 0 deletions bundle/manifests/overcommit.inditex.dev_overcommitclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,48 @@ spec:
maximum: 1
minimum: 0.0001
type: number
nodeSelector:
additionalProperties:
type: string
type: object
tolerations:
items:
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: |-
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
type: string
operator:
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
type: string
tolerationSeconds:
description: |-
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
required:
- cpuOvercommit
- excludedNamespaces
Expand Down
42 changes: 42 additions & 0 deletions bundle/manifests/overcommit.inditex.dev_overcommits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,51 @@ spec:
additionalProperties:
type: string
type: object
nodeSelector:
additionalProperties:
type: string
type: object
overcommitLabel:
minLength: 1
type: string
tolerations:
items:
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: |-
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
type: string
operator:
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
type: string
tolerationSeconds:
description: |-
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
required:
- overcommitLabel
type: object
Expand Down
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.0.3"
appVersion: "1.1.0"
maintainers:
- name: Enrique Andrés Villar
email: enriqueavi@inditex.dev
Expand Down
42 changes: 42 additions & 0 deletions chart/crds/overcommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,51 @@ spec:
additionalProperties:
type: string
type: object
nodeSelector:
additionalProperties:
type: string
type: object
overcommitLabel:
minLength: 1
type: string
tolerations:
items:
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: |-
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
type: string
operator:
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
type: string
tolerationSeconds:
description: |-
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
required:
- overcommitLabel
type: object
Expand Down
42 changes: 42 additions & 0 deletions chart/crds/overcommitClass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,48 @@ spec:
maximum: 1
minimum: 0.0001
type: number
nodeSelector:
additionalProperties:
type: string
type: object
tolerations:
items:
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: |-
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
type: string
operator:
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
type: string
tolerationSeconds:
description: |-
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
required:
- cpuOvercommit
- excludedNamespaces
Expand Down
8 changes: 8 additions & 0 deletions chart/templates/02-overcommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ spec:
example.com/label: "true"
annotations:
example.com/annotation: "true"
{{- if .Values.overcommit.nodeSelector }}
nodeSelector:
{{- toYaml .Values.overcommit.nodeSelector | nindent 4 }}
{{- end }}
{{- if .Values.overcommit.tolerations }}
tolerations:
{{- toYaml .Values.overcommit.tolerations | nindent 4 }}
{{- end }}
{{ end }}
8 changes: 8 additions & 0 deletions chart/templates/03-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,11 @@ spec:
limits:
memory: {{ $.Values.deployment.resources.limits.memory }}
cpu: {{ $.Values.deployment.resources.limits.cpu }}
{{- if .Values.deployment.tolerations }}
tolerations:
{{- toYaml .Values.deployment.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.deployment.nodeSelector }}
nodeSelector:
{{- toYaml .Values.deployment.nodeSelector | nindent 8 }}
{{- end }}
Loading