Skip to content

Commit 7680044

Browse files
committed
[Backport] Add global.podSecurityStandards.enforced value for PSS migration.
1 parent d9dd689 commit 7680044

19 files changed

+223
-103
lines changed

.circleci/config.yml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1
22
orbs:
3-
architect: giantswarm/architect@4.28.1
3+
architect: giantswarm/architect@5.0.1
44

55
workflows:
66
build:
@@ -13,42 +13,12 @@ workflows:
1313
tags:
1414
only: /^v.*/
1515

16-
- architect/push-to-docker:
17-
context: "architect"
18-
name: push-app-operator-to-docker
19-
image: "docker.io/giantswarm/app-operator"
20-
username_envar: "DOCKER_USERNAME"
21-
password_envar: "DOCKER_PASSWORD"
22-
requires:
23-
- go-build
24-
# Needed to trigger job also on git tag.
25-
filters:
26-
tags:
27-
only: /^v.*/
28-
29-
- architect/push-to-docker:
30-
context: architect
31-
name: push-app-operator-to-quay
32-
image: "quay.io/giantswarm/app-operator"
33-
username_envar: "QUAY_USERNAME"
34-
password_envar: "QUAY_PASSWORD"
35-
requires:
36-
- go-build
37-
filters:
38-
# Trigger the job also on git tag.
39-
tags:
40-
only: /^v.*/
41-
42-
- architect/push-to-docker:
16+
- architect/push-to-registries:
4317
context: architect
44-
name: push-app-operator-to-aliyun
45-
image: "giantswarm-registry.cn-shanghai.cr.aliyuncs.com/giantswarm/app-operator"
46-
username_envar: "ALIYUN_USERNAME"
47-
password_envar: "ALIYUN_PASSWORD"
18+
name: push-to-registries
4819
requires:
4920
- go-build
5021
filters:
51-
# Trigger the job also on git tag.
5222
tags:
5323
only: /^v.*/
5424

@@ -59,14 +29,15 @@ workflows:
5929
app_catalog_test: "control-plane-test-catalog"
6030
chart: "app-operator"
6131
requires:
62-
- push-app-operator-to-quay
32+
- push-to-registries
6333
filters:
6434
tags:
6535
only: /^v.*/
6636

6737
- architect/integration-test:
6838
context: architect
6939
name: basic-integration-test
40+
install-app-platform: false
7041
setup-script: "integration/setup/setup.sh"
7142
test-dir: "integration/test/app/basic"
7243
requires:
@@ -106,8 +77,8 @@ workflows:
10677
app_name: "app-operator"
10778
app_collection_repo: "aws-app-collection"
10879
requires:
109-
- push-app-operator-to-aliyun
11080
- push-app-operator-to-control-plane-app-catalog
81+
- push-to-registries
11182
filters:
11283
branches:
11384
ignore: /.*/
@@ -167,6 +138,19 @@ workflows:
167138
tags:
168139
only: /^v.*/
169140

141+
- architect/push-to-app-collection:
142+
context: architect
143+
name: push-to-capz-app-collection
144+
app_name: "app-operator"
145+
app_collection_repo: "capz-app-collection"
146+
requires:
147+
- push-app-operator-to-control-plane-app-catalog
148+
filters:
149+
branches:
150+
ignore: /.*/
151+
tags:
152+
only: /^v.*/
153+
170154
- architect/push-to-app-collection:
171155
context: architect
172156
name: push-to-gcp-app-collection

.github/pull_request_template.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Checklist
2+
3+
- [ ] Update changelog in CHANGELOG.md.

.github/workflows/pre_commit_go.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ name: pre-commit
33
on:
44
pull_request:
55
push:
6-
branches: [master]
6+
branches: [main]
77

88
jobs:
99
pre-commit:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
steps:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-python@v4
1414
- uses: actions/setup-go@v3
1515
with:
16-
go-version: "1.18.4"
16+
go-version: "1.21"
1717
- name: Install goimports
1818
run: |
1919
go install golang.org/x/tools/cmd/goimports@latest
2020
- name: Install golangci-lint
2121
env:
22-
GOLANGCI_LINT_VERSION: "v1.47.2"
22+
GOLANGCI_LINT_VERSION: "v1.54.2"
2323
run: |
2424
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
2525
sudo sh -s -- -b $GOPATH/bin ${GOLANGCI_LINT_VERSION}

.github/workflows/zz_generated.add-team-labels.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
mkdir -p artifacts
1515
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \
1616
-O artifacts/users.yaml \
17-
https://raw.githubusercontent.com/giantswarm/github/master/tools/issue-automation/user-mapping.yaml
17+
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/user-mapping.yaml
1818
- name: Upload Artifact
19-
uses: actions/upload-artifact@v3
19+
uses: actions/upload-artifact@v4
2020
with:
2121
name: users
2222
path: artifacts/users.yaml
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
needs: build_user_list
2929
steps:
30-
- uses: actions/download-artifact@v3
30+
- uses: actions/download-artifact@v4
3131
id: download-users
3232
with:
3333
name: users
@@ -45,7 +45,7 @@ jobs:
4545
done
4646
echo "EOF" >> $GITHUB_ENV
4747
- name: Apply label to issue
48-
if: ${{ env.LABEL != '' }}
48+
if: ${{ env.LABEL != '' && env.LABEL != 'null' && env.LABEL != null }}
4949
uses: actions-ecosystem/action-add-labels@v1
5050
with:
5151
github_token: ${{ secrets.ISSUE_AUTOMATION }}

.github/workflows/zz_generated.add-to-project-board.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
mkdir -p artifacts
1717
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \
1818
-O artifacts/users.yaml \
19-
https://raw.githubusercontent.com/giantswarm/github/master/tools/issue-automation/user-mapping.yaml
19+
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/user-mapping.yaml
2020
- name: Upload Artifact
21-
uses: actions/upload-artifact@v3
21+
uses: actions/upload-artifact@v4
2222
with:
2323
name: users
2424
path: artifacts/users.yaml
@@ -28,9 +28,9 @@ jobs:
2828
mkdir -p artifacts
2929
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \
3030
-O artifacts/labels.yaml \
31-
https://raw.githubusercontent.com/giantswarm/github/master/tools/issue-automation/label-mapping.yaml
31+
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/label-mapping.yaml
3232
- name: Upload Artifact
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: labels
3636
path: artifacts/labels.yaml
@@ -42,7 +42,7 @@ jobs:
4242
needs: build_user_list
4343
if: github.event.action == 'assigned'
4444
steps:
45-
- uses: actions/download-artifact@v3
45+
- uses: actions/download-artifact@v4
4646
id: download-users
4747
with:
4848
name: users
@@ -56,7 +56,7 @@ jobs:
5656
5757
echo "BOARD=${BOARD}" >> $GITHUB_ENV
5858
- name: Add issue to personal board
59-
if: ${{ env.BOARD != 'null' && env.BOARD != '' }}
59+
if: ${{ env.BOARD != 'null' && env.BOARD != '' && env.BOARD != null }}
6060
uses: actions/add-to-project@main
6161
with:
6262
project-url: ${{ env.BOARD }}
@@ -68,7 +68,7 @@ jobs:
6868
needs: build_user_list
6969
if: github.event.action == 'labeled'
7070
steps:
71-
- uses: actions/download-artifact@v3
71+
- uses: actions/download-artifact@v4
7272
id: download-labels
7373
with:
7474
name: labels
@@ -82,7 +82,7 @@ jobs:
8282
8383
echo "BOARD=${BOARD}" >> $GITHUB_ENV
8484
- name: Add issue to team board
85-
if: ${{ env.BOARD != 'null' && env.BOARD != '' }}
85+
if: ${{ env.BOARD != 'null' && env.BOARD != '' && env.BOARD != null }}
8686
uses: actions/add-to-project@main
8787
with:
8888
project-url: ${{ env.BOARD }}
Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DO NOT EDIT. Generated with:
22
#
3-
# devctl@5.22.0
3+
# devctl@6.18.2
44
#
55
name: 'Values and schema'
66
on:
@@ -13,13 +13,15 @@ on:
1313
- 'helm/**/values.schema.json' # schema
1414
- 'helm/**/ci/ci-values.yaml' # overrides for CI (can contain required entries)
1515

16+
push: {}
17+
1618
jobs:
1719
check:
1820
name: 'validate values.yaml against values.schema.json'
1921
runs-on: ubuntu-latest
2022
steps:
2123
- name: Checkout
22-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2325
with:
2426
fetch-depth: 0
2527

@@ -30,15 +32,22 @@ jobs:
3032
3133
- name: 'Check if values.yaml is a valid instance of values.schema.json'
3234
run: |
33-
HELM_DIR=$(git diff --name-only origin/${GITHUB_BASE_REF} ${GITHUB_SHA} \
34-
| grep 'helm/[-a-z].*\/' | head -1 | awk -F '/' '{print $1"/"$2}')
35-
VALUES=${HELM_DIR}/values.yaml
36-
if [ -f ${HELM_DIR}/ci/ci-values.yaml ]; then
37-
# merge ci-values.yaml into values.yaml (providing required values)
38-
echo -e "\nMerged values:\n=============="
39-
yq '. *= load("'${HELM_DIR}'/ci/ci-values.yaml")' ${HELM_DIR}/values.yaml | tee ${HELM_DIR}/combined-values.yaml
40-
echo -e "\n==============\n"
41-
VALUES=${HELM_DIR}/combined-values.yaml
42-
fi
35+
for chart_yaml in helm/*/Chart.yaml; do
36+
helm_dir="${chart_yaml%/Chart.yaml}"
37+
38+
if [ ! -f ${helm_dir}/values.schema.json ]; then
39+
echo "Skipping validation for '${helm_dir}' folder, because 'values.schema.json' does not exist..."
40+
continue
41+
fi
42+
43+
values=${helm_dir}/values.yaml
44+
if [ -f ${helm_dir}/ci/ci-values.yaml ]; then
45+
# merge ci-values.yaml into values.yaml (providing required values)
46+
echo -e "\nMerged values:\n=============="
47+
yq '. *= load("'${helm_dir}'/ci/ci-values.yaml")' ${helm_dir}/values.yaml | tee ${helm_dir}/combined-values.yaml
48+
echo -e "\n==============\n"
49+
values=${helm_dir}/combined-values.yaml
50+
fi
4351
44-
${HOME}/yajsv -s ${HELM_DIR}/values.schema.json ${VALUES}
52+
${HOME}/yajsv -s ${helm_dir}/values.schema.json ${values}
53+
done

0 commit comments

Comments
 (0)