Pulumi Kubernetes Operator v2.3.0
We're excited to announce the release of Pulumi Kubernetes Operator v2.3.0, featuring two major enhancements that expand GitOps workflows: preview mode and structured configuration support.
What's New
Preview Mode for Stack API
Preview mode enables running Pulumi stacks in a dry-run fashion, allowing you to visualize infrastructure changes before applying them. This feature supports sophisticated GitOps workflows where you can:
- Run what-if scenarios by creating multiple Stack objects for the same underlying Pulumi stack, with all-but-one operating in preview mode
- Preview changes across different branches/tags to validate configuration updates before deployment
- Roll out changes incrementally using a tick-tock approach by toggling the
previewflag on and off with external verification between each step
Simply add preview: true to your Stack spec to enable preview-only mode. The Stack's Ready condition will indicate preview success, and you'll get full status including preview links, standard output, and program outputs.
Example:
apiVersion: pulumi.com/v1
kind: Stack
metadata:
name: my-stack-preview-v2
spec:
stack: org/project/stack
projectRepo: https://github.com/example/infra
branch: feature-branch
preview: trueStructured Configuration Support
Configuration management gets a major upgrade with native support for complex configuration values and ConfigMap references. This feature addresses two long-standing requests:
- Complex configuration values: Objects, arrays, numbers, and booleans are now first-class citizens in Stack configuration
- ConfigMap integration: Load configuration from ConfigMaps with automatic JSON parsing support
- Fully backwards compatible: Existing string-only configurations continue to work unchanged
The implementation leverages Pulumi CLI's JSON configuration support (v3.202.0+) with automatic version detection and clear upgrade guidance when needed.
Example:
apiVersion: pulumi.com/v1
kind: Stack
spec:
config:
# Simple string (existing)
simpleKey: "value"
# Structured object (NEW)
dbConfig:
host: "localhost"
port: 5432
# Array (NEW)
regions: ["us-west-2", "us-east-1"]
# Number and boolean (NEW)
maxConns: 100
enableSSL: true
# ConfigMap references (NEW)
configRef:
appSettings:
name: app-config
key: settings.json
json: trueAdditional Improvements
- Stack name validation: Added validation to limit Stack names to 42 characters, preventing issues with long resource names #899
Bug Fixes
- secretsProvider: Fixed issue where
secretsProviderwasn't being applied to newly created stacks #935 - Helm template parsing: Resolved YAML parsing error for
podLabelsin Helm chart #1014 - Stack deletion: Fixed Stack deletion being blocked when prerequisites are missing #751
- Update TTL: Fixed TTL not being properly respected for completed Update objects #960
Upgrade Notes
CRD Updates Required
IMPORTANT: This release includes updates to the CRDs with new and changed fields to support preview mode and structured configuration.
If upgrading via Helm: Helm v3 does not automatically upgrade CRDs. You must manually apply the updated CRDs before upgrading:
kubectl apply --server-side -k 'github.com/pulumi/pulumi-kubernetes-operator//operator/config/crd?ref=v2.3.0'
helm upgrade -n pulumi-kubernetes-operator pulumi-kubernetes-operator \
oci://ghcr.io/pulumi/helm-charts/pulumi-kubernetes-operator --version 2.3.0If using the quickstart YAML: The CRDs will be updated automatically via kubectl apply.
Other Upgrade Considerations
- For structured configuration support, ensure your workspace pods use Pulumi CLI v3.202.0 or later
- The operator will automatically detect CLI version and provide clear error messages if an upgrade is needed
- All changes are backwards compatible - no manifest modifications required for existing Stack resources
Installation
Helm (recommended):
# For new installations:
helm install --create-namespace -n pulumi-kubernetes-operator pulumi-kubernetes-operator \
oci://ghcr.io/pulumi/helm-charts/pulumi-kubernetes-operator --version 2.3.0
# For upgrades, apply CRDs first:
kubectl apply --server-side -k 'github.com/pulumi/pulumi-kubernetes-operator//operator/config/crd?ref=v2.3.0'
helm upgrade -n pulumi-kubernetes-operator pulumi-kubernetes-operator \
oci://ghcr.io/pulumi/helm-charts/pulumi-kubernetes-operator --version 2.3.0Quickstart YAML:
kubectl apply -f https://raw.githubusercontent.com/pulumi/pulumi-kubernetes-operator/v2.3.0/deploy/quickstart/install.yamlFull Changelog
See CHANGELOG.md for complete details.