Skip to content

Commit

Permalink
Fix nodeSelector, affinity, tolerations in the Helm chart (#548)
Browse files Browse the repository at this point in the history
## Proposed changes

`nodeSelector`, `affinity`, and `tolerations` are currently ignored
unless `initContainers` is set to a non-empty value, due to a misplaced
`if` in the template.
This change fixes the issue.

---------

Co-authored-by: Ramon Quitales <[email protected]>
Co-authored-by: Engin Diri <[email protected]>
  • Loading branch information
3 people authored Feb 8, 2024
1 parent c32cfc1 commit 758a514
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ CHANGELOG
=========

## HEAD (unreleased)
- Fixed `nodeSelector`, `affinity`, and `tolerations` Helm chart values that were previously effectively ignored.
[#548](https://github.com/pulumi/pulumi-kubernetes-operator/pull/548)

## 1.14.0 (2023-11-08)
- Changed indentation in deploy/helm/pulumi-operator/templates/deployment.yaml for volumes and volumeMounts.
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/pulumi-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ icon: https://www.pulumi.com/logos/brand/twitter-card.png

type: application

version: 0.5.0
version: 0.6.0
appVersion: 1.14.0

keywords:
Expand All @@ -25,7 +25,7 @@ maintainers:
annotations:
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/changes: |
- set terminationGracePeriodSeconds for HelmCharts (#520)
- Fix nodeSelector, affinity, tolerations in the Helm chart (#548)
artifacthub.io/images: |
- name: pulumi-kubernetes-operator
image: docker.io/pulumi-kubernetes-operator:v1.14.0
Expand Down
6 changes: 3 additions & 3 deletions deploy/helm/pulumi-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# node-red ⚙

![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=for-the-badge) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) ![AppVersion: 1.14.0](https://img.shields.io/badge/AppVersion-1.14.0-informational?style=for-the-badge)
![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=for-the-badge) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) ![AppVersion: 1.14.0](https://img.shields.io/badge/AppVersion-1.14.0-informational?style=for-the-badge)

## Description 📜

Expand All @@ -11,7 +11,7 @@ A Helm chart for the Pulumi Kubernetes Operator
To install the chart using the OCI artifact, run:

```bash
helm install pulumi-kubernetes-operator oci://ghcr.io/pulumi/helm-charts/pulumi-kubernetes-operator --version 0.5.0
helm install pulumi-kubernetes-operator oci://ghcr.io/pulumi/helm-charts/pulumi-kubernetes-operator --version 0.6.0
```

## Usage
Expand All @@ -27,7 +27,7 @@ helm repo update
To install the chart with the release name `pulumi-kubernetes-operator` run:

```bash
helm install pulumi-kubernetes-operator pulumi-kubernetes-operator/pulumi-kubernetes-operator --version 0.5.0
helm install pulumi-kubernetes-operator pulumi-kubernetes-operator/pulumi-kubernetes-operator --version 0.6.0
```

After a few seconds, the `pulumi-kubernetes-operator` should be running.
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/pulumi-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
{{- if .Values.initContainers }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -103,6 +102,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.initContainers }}
initContainers:
{{- with .Values.initContainers }}
{{- toYaml . | nindent 6 }}
Expand Down

0 comments on commit 758a514

Please sign in to comment.