Skip to content

Commit d50fa93

Browse files
authored
Merge pull request #188 from vovtz/patch-1
#187 Check `Capabilities` to render `PodDisruptionBudget` manifest
2 parents d5580e1 + 2c6e5b2 commit d50fa93

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

charts/redpanda/Chart.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,9 @@ type: application
2323
# The chart version and the app version are not the same and will not track
2424
# together. The chart version is a semver representation of changes to this
2525
# chart.
26-
version: 2.3.8
26+
version: 2.3.9
2727
# The app version is the default version of Redpanda to install.
2828
appVersion: v22.3.3
29-
# kubeVersion must be suffixed with "-0" to be able to match cloud providers
30-
# kubernetes versions like "v1.23.8-gke.1900". Their suffix is interpreted as a
31-
# pre-release. Our "-0" allows pre-releases to be matched.
32-
kubeVersion: "^1.21.0-0"
3329
icon: https://images.ctfassets.net/paqvtpyf8rwu/3cYHw5UzhXCbKuR24GDFGO/73fb682e6157d11c10d5b2b5da1d5af0/skate-stand-panda.svg
3430
sources:
3531
- https://github.com/redpanda-data/helm-charts

charts/redpanda/templates/poddisruptionbudget.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/}}
1717

18+
{{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
1819
apiVersion: policy/v1
1920
kind: PodDisruptionBudget
2021
metadata:
@@ -35,3 +36,6 @@ spec:
3536
app.kubernetes.io/name: {{ template "redpanda.name" . }}
3637
app.kubernetes.io/instance: {{ .Release.Name | quote }}
3738
maxUnavailable: {{ .Values.statefulset.budget.maxUnavailable | int64 }}
39+
{{- else if (not .Values.ephemeralUsage.enabled) }}
40+
{{- fail "You must use Kubernetes 1.21+ for a production cluster. If you're not using this in production and you know why doing this is a bad idea, you can set 'ephemeralUsage.enabled=false' to continue." }}
41+
{{- end }}

charts/redpanda/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,13 @@ listeners:
466466
# This listener port will be used for the external port if this is not included
467467
nodePort: 30081
468468

469+
### Non-production usage
470+
#
471+
# ephemeralUsage - Enabling this key relaxes some properties related to high availability, like the
472+
# implementation of a PodDisruptionBudget (this enables deployment onto older K8s versions as well)
473+
ephemeralUsage:
474+
enabled: false
475+
469476
# Expert Config
470477

471478
# This section contains various settings supported by Redpanda that may not work

0 commit comments

Comments
 (0)