Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Add support to PodDisruptionBudget policy/v1 (#1420)
Browse files Browse the repository at this point in the history
* Adding support to Ingress networking.k8s.io/v1

* Adjusting ES service name

* Removing ingress typo & adjusting python test

* Adjusting python tests to use the new ingress version

* fixing conflict

* Adding support to kubernetes ingress v1 & ClassName

* Adding reformatted files

* fixing conflict

* Adding ClassName & Pathtype on ingress settings

* Performing syntax adjustments and removing comments

* Adding support to policy/v1

* Add logstash support to policy/v1

* Adding support to podsecuritypolicy

Co-authored-by: jmlrt <8582351+jmlrt@users.noreply.github.com>
  • Loading branch information
framsouza and jmlrt authored Feb 28, 2022
1 parent e9f85ea commit 7a54fb1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion elasticsearch/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{{- if .Values.maxUnavailable }}
---
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else}}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: "{{ template "elasticsearch.uname" . }}-pdb"
Expand Down
4 changes: 4 additions & 0 deletions elasticsearch/templates/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{{- if .Values.podSecurityPolicy.create -}}
{{- $fullName := include "elasticsearch.uname" . -}}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else}}
apiVersion: policy/v1beta1
{{- end }}
kind: PodSecurityPolicy
metadata:
name: {{ default $fullName .Values.podSecurityPolicy.name | quote }}
Expand Down
4 changes: 4 additions & 0 deletions logstash/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
{{- if .Values.maxUnavailable }}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else}}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: "{{ template "logstash.fullname" . }}-pdb"
Expand Down
4 changes: 4 additions & 0 deletions logstash/templates/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{{- if .Values.podSecurityPolicy.create -}}
{{- $fullName := include "logstash.fullname" . -}}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else}}
apiVersion: policy/v1beta1
{{- end }}
kind: PodSecurityPolicy
metadata:
name: {{ default $fullName .Values.podSecurityPolicy.name | quote }}
Expand Down

0 comments on commit 7a54fb1

Please sign in to comment.