Skip to content

Commit

Permalink
Propagate resource requirements config to all init containers and upd…
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonheras committed Apr 17, 2024
1 parent 9fff407 commit 8d00bb8
Show file tree
Hide file tree
Showing 14 changed files with 2,334 additions and 2,261 deletions.
28 changes: 26 additions & 2 deletions charts/opensearch-cluster/templates/opensearch-cluster-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ spec:
{{- if .Values.opensearchCluster.dashboards.resources.limits.cpu }}
cpu: {{ .Values.opensearchCluster.dashboards.resources.limits.cpu }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.opensearchCluster.dashboards.tls }}
tls:
{{- if .Values.opensearchCluster.dashboards.tls.enable }}
Expand Down Expand Up @@ -280,6 +280,30 @@ spec:
securityConfigSecret:
name: {{ .Values.opensearchCluster.security.config.securityConfigSecret.name }}
{{- end }}
{{- if .Values.opensearchCluster.security.config.updateJob }}
updateJob:
{{- if .Values.opensearchCluster.security.config.updateJob.resources }}
resources:
{{- if .Values.opensearchCluster.security.config.updateJob.resources.requests }}
requests:
{{- if .Values.opensearchCluster.security.config.updateJob.resources.requests.memory }}
memory: {{ .Values.opensearchCluster.security.config.updateJob.resources.requests.memory }}
{{- end }}
{{- if .Values.opensearchCluster.security.config.updateJob.resources.requests.cpu }}
cpu: {{ .Values.opensearchCluster.security.config.updateJob.resources.requests.cpu }}
{{- end }}
{{- end }}
{{- if .Values.opensearchCluster.security.config.updateJob.resources.limits }}
limits:
{{- if .Values.opensearchCluster.security.config.updateJob.resources.limits.memory }}
memory: {{ .Values.opensearchCluster.security.config.updateJob.resources.limits.memory }}
{{- end }}
{{- if .Values.opensearchCluster.security.config.updateJob.resources.limits.cpu }}
cpu: {{ .Values.opensearchCluster.security.config.updateJob.resources.limits.cpu }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.opensearchCluster.security.tls }}
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.14.0
name: opensearchactiongroups.opensearch.opster.io
spec:
group: opensearch.opster.io
Expand All @@ -24,14 +23,19 @@ spec:
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -45,12 +49,15 @@ spec:
description:
type: string
opensearchCluster:
description: LocalObjectReference contains enough information to let
you locate the referenced object inside the same namespace.
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
type: object
x-kubernetes-map-type: atomic
Expand All @@ -67,10 +74,10 @@ spec:
existingActionGroup:
type: boolean
managedCluster:
description: UID is a type that holds unique ID values, including
UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being
a type captures intent and helps make sure that UIDs and names do
not get conflated.
description: |-
UID is a type that holds unique ID values, including UUIDs. Because we
don't ONLY use UUIDs, this is an alias to string. Being a type captures
intent and helps make sure that UIDs and names do not get conflated.
type: string
reason:
type: string
Expand Down
Loading

0 comments on commit 8d00bb8

Please sign in to comment.