Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 #725

Merged
merged 48 commits into from
Oct 18, 2024
Merged

V2 #725

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5b5d8a7
[pkov2] agent RPC server (#624)
EronWright Aug 8, 2024
a21e0e4
[WIP] V2 low-level operator implementation (#626)
EronWright Sep 6, 2024
e850d02
[WIP] V2 stack controller (#648)
EronWright Sep 6, 2024
7fd37bb
[v2] E2E test groundwork (#665)
blampe Sep 18, 2024
9bc598d
[v2] Add workspaceTemplate to Stack API (#669)
blampe Sep 18, 2024
3f0a0b4
[v2] Run tests on v2 branch
blampe Sep 18, 2024
3cb8900
[v2] Git source (#658)
blampe Sep 19, 2024
ab6c570
Stack controller tests (#671)
EronWright Sep 20, 2024
af4964f
[v2] Stable envRefs (#678)
blampe Sep 23, 2024
2a40b39
[V2] Program controller and file server for program objects (#673)
rquitales Sep 24, 2024
181286c
[v2] Graceful shutdown (#659)
blampe Sep 24, 2024
8ac74b0
Remove v1 code (#681)
EronWright Sep 25, 2024
a3d2072
[v2] Capture stack outputs (#676)
blampe Sep 25, 2024
fcd9589
fixes to push docker image (#688)
EronWright Sep 26, 2024
7ce746c
[v2] Consolidate go.mod (#686)
blampe Sep 26, 2024
b912fd4
[v2] Use official nonroot images for e2e tests (#692)
blampe Sep 26, 2024
88a213d
[V2] Set default statefulset image based on securityProfile (#693)
rquitales Sep 26, 2024
3c0c7a9
Simplified deployment app (#691)
EronWright Sep 26, 2024
388a7ee
Helm chart update (#695)
EronWright Sep 27, 2024
b765bec
remove old deploy yaml
EronWright Sep 27, 2024
ef2c6f5
prerelease (v2.0-devel)
EronWright Sep 27, 2024
50080c3
makefile updates
EronWright Sep 27, 2024
f73a747
prepare for v2.0-beta.0
EronWright Sep 27, 2024
76c0595
release workflow (wip)
EronWright Sep 27, 2024
86a77b0
release workspace (wip)
EronWright Sep 27, 2024
583f1cc
release workflow (wip)
EronWright Sep 27, 2024
72fd65f
release workflow (wip)
EronWright Sep 27, 2024
74502b8
fix broken make
EronWright Sep 27, 2024
91fefc4
acceptance test to use docker build
EronWright Sep 27, 2024
58b0539
release workflow
EronWright Sep 27, 2024
3a91a9a
regenerate manifests
EronWright Oct 4, 2024
096b846
update version string
EronWright Oct 4, 2024
6fbcd4c
[V2] Clean up utils file (#708)
rquitales Oct 7, 2024
2a67d4c
Set some default resource requests on the workspace pod (#707)
EronWright Oct 7, 2024
d52dbe7
[V2] Enable metrics server (#706)
rquitales Oct 10, 2024
83f8438
[v2] E2E test for --target (#711)
blampe Oct 11, 2024
a4c8810
[v2] Retry failed updates with exponential backoff (#709)
blampe Oct 11, 2024
7883699
Implement an authorization layer for operator-to-workspace communicat…
EronWright Oct 12, 2024
2884fad
Clean up "object has already been modified" warnings #700 (#717)
EronWright Oct 17, 2024
d52056a
[v2] Use an apply configuration for the workspace template (#713)
blampe Oct 17, 2024
6b9e71f
[v2] Set config all at once (#718)
blampe Oct 17, 2024
eacc5ea
Use sequential numbering for naming the Update object (#722)
EronWright Oct 17, 2024
3556a4d
Add the serviceAccountName field to Stack.spec (#723)
EronWright Oct 18, 2024
542be71
Update the "max reconciles" for each controller to 25 (#724)
EronWright Oct 18, 2024
26e7086
Merge remote-tracking branch 'origin/master' into v2
EronWright Oct 18, 2024
638727f
update CI scripts
EronWright Oct 18, 2024
c8a1f00
remove version.go
EronWright Oct 18, 2024
a6daecd
changelog
EronWright Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
*.md
*.txt
*.out
*.yaml
*.yml
*_test.go
.dockerignore
.gitignore
.git
bin
config
examples
deploy
hack
Dockerfile
Makefile
10 changes: 3 additions & 7 deletions .github/workflows/chart-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
name: chart-publish
on:
push:
branches:
- master
paths:
- "deploy/helm/**"
- "!deploy/helm/pulumi-operator/README.md"
- "!deploy/helm/pulumi-operator/README.md.gotmpl"

tags:
- v*.*.* # e.g. v2.0.0

env:
HELM_DOCS_VERSION: "1.11.0"

Expand Down
90 changes: 0 additions & 90 deletions .github/workflows/master.yaml

This file was deleted.

97 changes: 33 additions & 64 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,79 +3,48 @@ name: Pulumi Kubernetes Operator Release
on:
push:
tags:
- v*.*.*
- v*.*.* # e.g. v2.0.0
- v*.*-*.* # e.g. v2.0-beta.1
- v*.*.*-*.* # e.g. v2.0.0-beta.1
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.ref_name }}
permissions:
contents: write
jobs:
operator-int-tests:
docker:
name: Build & Push Docker Images
runs-on: ubuntu-latest
name: Integration Testing
steps:
- name: Check out code
uses: actions/checkout@v2
with:
# The following are to allow tests to run against local commits.
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
# go-git doesn't like detached state.
- run: git switch -C "pull-request"
- name: Install Go
uses: actions/setup-go@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
go-version: "1.21.x"
- name: Install Ginkgo testing framework
run: |
# Do the install from outside the code tree to avoid messing with go.sum
cd /tmp; go install github.com/onsi/ginkgo/v2/[email protected]
- name: Configure AWS credentials to use in AWS Stack tests
uses: aws-actions/configure-aws-credentials@v1
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
role-duration-seconds: 3600
role-external-id: "pulumi-kubernetes-operator"
role-session-name: "pulumi-kubernetes-operator@githubActions"
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Install Pulumi CLI
uses: pulumi/setup-pulumi@v2
- name: Set env variables and path
run: |
echo '$HOME/.pulumi/bin' >> $GITHUB_PATH
echo "STACK=ci-cluster-$(head /dev/urandom | LC_CTYPE=C tr -dc '[:lower:]' | head -c5)" >> $GITHUB_ENV
- name: Tests
run: |
# Create GKE test cluster to install CRDs and use with the test operator.
scripts/ci-infra-create.sh
# Source the env variables created in the script above
cat ~/.envfile
. ~/.envfile

# Run tests
make test
- name: Cleanup
if: ${{ always() }}
run: |
scripts/ci-infra-destroy.sh
push: true
platforms: linux/amd64,linux/arm64
tags: |
pulumi/pulumi-kubernetes-operator:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}
release:
needs: [operator-int-tests]
name: Create a GitHub Release
needs: docker
runs-on: ubuntu-latest
name: Tag Release
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.21.x"
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login docker.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
- name: Checkout
uses: actions/checkout@v4
- name: Create a GH release
uses: softprops/action-gh-release@v2
with:
version: v1.26.2
args: release --skip-sign
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: pulumi-kubernetes-operator-${{ env.VERSION }}
prerelease: ${{ contains(env.VERSION, '-') }}
token: ${{ secrets.GITHUB_TOKEN }}
131 changes: 61 additions & 70 deletions .github/workflows/run-acceptance-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,98 +1,89 @@
---
name: Pulumi Kubernetes Operator PR Builds
on:
repository_dispatch:
types: [run-acceptance-tests-command]
push:
branches:
- master
pull_request:
branches:
- master
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULUMI_BOT_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
VERSION: v0.0-${{ github.sha }}
jobs:
comment-notification:
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
steps:
- name: Create URL to the run output
id: vars
run: echo run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID >> "$GITHUB_OUTPUT"
- name: Update with Result
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
body: |
Please view the PR build - ${{ steps.vars.outputs.run-url }}
operator-build:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
go-version: 1.21.x
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
version: v1.26.2
args: release --snapshot --skip-publish --rm-dist --skip-sign
operator-int-tests:
push: false
load: true
platforms: linux/amd64
tags: |
pulumi/pulumi-kubernetes-operator:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}

unit-tests:
runs-on: ubuntu-latest
name: Integration Testing
if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
name: Unit tests
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# The following are to allow tests to run against local commits.
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
# go-git doesn't like detached state.
- run: git switch -C "pull-request"
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache: true
- name: Install Ginkgo testing framework
run: |
# Do the install from outside the code tree to avoid messing with go.sum
cd /tmp; go install github.com/onsi/ginkgo/v2/[email protected]
- name: Configure AWS credentials to use in AWS Stack tests
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
role-duration-seconds: 3600
role-external-id: "pulumi-kubernetes-operator"
role-session-name: "pulumi-kubernetes-operator@githubActions"
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Install Pulumi CLI
uses: pulumi/setup-pulumi@v2
- name: Set env variables and path
run: |
echo '$HOME/.pulumi/bin' >> $GITHUB_PATH
echo "STACK=ci-cluster-$(head /dev/urandom | LC_CTYPE=C tr -dc '[:lower:]' | head -c5)" >> $GITHUB_ENV
- name: Tests
run: |
# Create GKE test cluster to install CRDs and use with the test operator.
scripts/ci-infra-create.sh
# Source the env variables created in the script above
cat ~/.envfile
. ~/.envfile

# Run tests
make test
go-version: 1.23.x
- name: Install Pulumi
uses: pulumi/actions@v5
- name: Run Tests (Agent)
run: make -C agent test
- name: Run Tests (Operator)
run: make -C operator test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: agent/coverage.out,operator/coverage.out
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Cleanup
if: ${{ always() }}
run: |
scripts/ci-infra-destroy.sh

e2e-tests:
runs-on: ubuntu-latest
name: E2E tests
steps:
- name: Setup cluster
uses: helm/kind-action@v1
with:
cluster_name: kind
node_image: kindest/node:v1.31.0
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Run tests
run: make -C operator test-e2e
Loading