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

Update K8s to latest version #379

Merged
merged 6 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version: 2.1
# Add additional CircleCI Orbs dependencies
orbs:
# https://circleci.com/orbs/registry/orb/circleci/kubernetes
kubernetes: circleci/kubernetes@0.11.0
kubernetes: circleci/kubernetes@1.3.1
# https://circleci.com/orbs/registry/orb/circleci/helm
helm: circleci/helm@1.1.1
helm: circleci/helm@3.0.0
# https://circleci.com/orbs/registry/orb/ccpgames/minikube
minikube: ccpgames/[email protected]

Expand All @@ -21,13 +21,13 @@ jobs:
resource_class: large
machine:
# Available images https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
image: ubuntu-2204:2022.10.2
image: ubuntu-2204:current
steps:
- checkout
- kubernetes/install
- minikube/minikube-install:
# https://github.com/kubernetes/minikube/releases
version: v1.29.0
version: v1.31.2
- run:
name: Install Helm v3
command: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
Expand All @@ -39,7 +39,7 @@ jobs:
command: helm dependency update
- run:
name: Helm install stackstorm-ha chart
command: helm install --timeout 10m0s --debug --wait --name-template stackstorm-ha .
command: helm install --timeout 15m0s --debug --wait --name-template stackstorm-ha .
- run:
name: Helm test
command: helm test stackstorm-ha
Expand All @@ -63,9 +63,9 @@ workflows:
parameters:
# https://kubernetes.io/releases
kubernetes-version:
- "v1.26.1"
- "v1.25.5"
- "v1.24.9"
- "v1.28.3"
- "v1.27.7"
- "v1.26.10"
# Run periodic nightly Helm tests to ensure there are no regressions
e2e-nightly:
jobs:
Expand All @@ -74,9 +74,9 @@ workflows:
parameters:
# https://kubernetes.io/releases
kubernetes-version:
- "v1.26.1"
- "v1.25.5"
- "v1.24.9"
- "v1.28.3"
- "v1.27.7"
- "v1.26.10"
triggers:
- schedule:
cron: "0 1 * * *"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# https://github.com/StackStorm/stackstorm-k8s/issues/342
# https://github.com/k3s-io/k3s/releases
k3s-channel:
- "v1.26.1+k3s1"
- "v1.28.3+k3s1"
steps:
- name: Checkout source
uses: actions/checkout@v3
Expand All @@ -46,7 +46,7 @@ jobs:

- name: Helm install
run: |
helm install --timeout 10m0s --debug --wait \
helm install --timeout 15m0s --debug --wait \
--name-template stackstorm-ha .

- name: Helm test
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## In Development
* Bump to latest CircleCI orb versions ([email protected] and [email protected] by @ZoeLeah)
* Remove unsupported k8s Versions (1.24.x and 1.25.x by @ZoeLeah)
* Update and add new K8s versions (1.28.3, 1.27.7 and 1.26.10 by @ZoeLeah)
* Switch from ubuntu-2204:2022.10.2 to ubuntu-2204:current (by @ZoeLeah)
* Update K3s to v1.28.3+k3s1 (by @ZoeLeah)
* Increase helm install timeout to 15 minutes (by @ZoeLeah)
Comment on lines +4 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's too much of the changelog details for a single PR 😃 (balance is the key), but let's go with that

* Shift K3s and K8s versions forward. (by @mamercad)
* BREAKING: Use the standardized labels recommended in the Helm docs. You can use `migrations/v1.0/standardize-labels.sh` to prepare an existing cluster before running `helm update`. (#351) (by @cognifloyd)
* Drop support for `networking.k8s.io/v1beta1` which was removed in kubernetes v1.22 (EOL 2022-10-28) (#353) (by @cognifloyd)
Expand Down
2 changes: 1 addition & 1 deletion migrations/v1.0/standardize-labels.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# We switched to the standard labels recommend in Helm's "Best Practices" doc.
# We switched to the standard labels recommend in Helm's "Best Practices" doc.
# https://helm.sh/docs/chart_best_practices/labels/#standard-labels
#
# This script adds those labels to all the resources in an existing release,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/ingress_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tests:
- it: Ingress not present if disabled
set:
ingress:
enabled: false
enabled: false
asserts:
- hasDocuments:
count: 0
Expand Down
11 changes: 1 addition & 10 deletions tests/unit/overrides_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,23 @@ tests:
asserts:
- hasDocuments:
count: 5

- contains: &overrides_volume
path: spec.template.spec.volumes
content:
name: st2-overrides-vol
configMap:
name: st2ha-st2-overrides-configs
documentIndex: 3 # register_content


- contains: &overrides_mnt
path: spec.template.spec.containers[0].volumeMounts
content:
name: st2-overrides-vol
mountPath: /opt/stackstorm/overrides
documentIndex: 3 # register_content

- contains: *overrides_mnt
documentIndex: 4 #Extra_jobs
- contains: *overrides_volume
documentIndex: 4 #extra_jobs

- notContains: *overrides_volume
documentIndex: 0
- notContains: *overrides_mnt
Expand All @@ -78,7 +73,7 @@ tests:
- notContains: *overrides_mnt
documentIndex: 2


- it: Deployments with overrides
template: deployments.yaml
set:
Expand All @@ -102,14 +97,10 @@ tests:
asserts:
- hasDocuments:
count: 14


- contains: *overrides_volume # always included
documentIndex: 12 # st2client
- contains: *overrides_mnt # always included
documentIndex: 12 # st2client


- notContains: *overrides_volume
documentIndex: 1
- notContains: *overrides_mnt
Expand Down
1 change: 0 additions & 1 deletion tests/unit/post_start_script_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,3 @@ tests:
- equal: *assert_lifecycle
- contains: *assert_volume_mount
- contains: *assert_volume

1 change: 0 additions & 1 deletion tests/unit/service_account_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,3 @@ tests:
documentIndex: 11
- equal: *assert_sa_custom
documentIndex: 13

7 changes: 3 additions & 4 deletions tests/unit/services_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ tests:
- it: st2web, st2auth, st2api, st2stream should work without externalName
set:
st2chatops:
enabled: false
enabled: false
asserts:
- hasDocuments:
count: 4
- isNull:
path: spec.externalName

- it: st2web, st2auth, st2api, st2stream should work with externalName if type is ExternalName
set:
st2web:
Expand All @@ -34,7 +34,7 @@ tests:
hostname: some-host-name
type: ExternalName
st2chatops:
enabled: false
enabled: false
asserts:
- hasDocuments:
count: 4
Expand All @@ -44,4 +44,3 @@ tests:
- equal:
path: spec.externalName
value: some-host-name

Loading