Skip to content

Commit

Permalink
[ci] dev in tag fix (automatic) (#100)
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Stefurishin <aleksandr.stefurishin@flant.com>
  • Loading branch information
astef authored Feb 11, 2025
1 parent 5083bbc commit f47f502
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion templates/sds-local-volume-scheduler-extender/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ data:
log-level: "4"
{{- end }}

{{- if and (not (eq "dev" .Values.global.deckhouseVersion)) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
{{- $dhVersionIsDev := or (hasPrefix "dev" .Values.global.deckhouseVersion) (hasSuffix "dev" .Values.global.deckhouseVersion) }}
{{- if and (not $dhVersionIsDev) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
---
apiVersion: v1
kind: ConfigMap
Expand Down
7 changes: 4 additions & 3 deletions templates/sds-local-volume-scheduler-extender/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $dhVersionIsDev := or (hasPrefix "dev" .Values.global.deckhouseVersion) (hasSuffix "dev" .Values.global.deckhouseVersion) }}
{{- define "kube_scheduler_resources" }}
cpu: 10m
memory: 30Mi
Expand Down Expand Up @@ -77,7 +78,7 @@ spec:
imagePullSecrets:
- name: {{ .Chart.Name }}-module-registry
containers:
{{- if and (not (eq "dev" .Values.global.deckhouseVersion)) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
{{- if and (not $dhVersionIsDev) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
- name: kube-scheduler
{{- include "helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all" . | nindent 10 }}
command:
Expand Down Expand Up @@ -140,7 +141,7 @@ spec:
{{- if not ( .Values.global.enabledModules | has "vertical-pod-autoscaler-crd") }}
{{- include "sds_local_volume_scheduler_extender_resources" . | nindent 14 }}
{{- end }}
{{- if or (eq "dev" .Values.global.deckhouseVersion) (semverCompare ">=1.64" .Values.global.deckhouseVersion) }}
{{- if or $dhVersionIsDev (semverCompare ">=1.64" .Values.global.deckhouseVersion) }}
ports:
- containerPort: 8099
protocol: TCP
Expand All @@ -153,7 +154,7 @@ spec:
- name: scheduler-extender-certs
secret:
secretName: scheduler-extender-https-certs
{{- if and (not (eq "dev" .Values.global.deckhouseVersion)) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
{{- if and (not $dhVersionIsDev) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
- configMap:
defaultMode: 420
name: sds-local-volume-scheduler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if or (eq "dev" .Values.global.deckhouseVersion) (semverCompare ">=1.64" .Values.global.deckhouseVersion) }}
{{- $dhVersionIsDev := or (hasPrefix "dev" .Values.global.deckhouseVersion) (hasSuffix "dev" .Values.global.deckhouseVersion) }}

{{- if or $dhVersionIsDev (semverCompare ">=1.64" .Values.global.deckhouseVersion) }}
apiVersion: deckhouse.io/v1alpha1
kind: KubeSchedulerWebhookConfiguration
metadata:
Expand Down
4 changes: 3 additions & 1 deletion templates/sds-local-volume-scheduler-extender/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if or (eq "dev" .Values.global.deckhouseVersion) (semverCompare ">=1.64" .Values.global.deckhouseVersion) }}
{{- $dhVersionIsDev := or (hasPrefix "dev" .Values.global.deckhouseVersion) (hasSuffix "dev" .Values.global.deckhouseVersion) }}

{{- if or ($dhVersionIsDev) (semverCompare ">=1.64" .Values.global.deckhouseVersion) }}
---
apiVersion: v1
kind: Service
Expand Down
4 changes: 3 additions & 1 deletion templates/webhooks/webhook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if and (not (eq "dev" .Values.global.deckhouseVersion)) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
{{- $dhVersionIsDev := or (hasPrefix "dev" .Values.global.deckhouseVersion) (hasSuffix "dev" .Values.global.deckhouseVersion) }}

{{- if and (not $dhVersionIsDev) (semverCompare "<1.64" .Values.global.deckhouseVersion) }}
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
Expand Down

0 comments on commit f47f502

Please sign in to comment.