Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/kyma-projec…
Browse files Browse the repository at this point in the history
…t#1839-deprecate-channel-field-module-template
  • Loading branch information
LeelaChacha committed Oct 6, 2024
2 parents ce90b9a + c772e54 commit 9b063e8
Show file tree
Hide file tree
Showing 115 changed files with 2,991 additions and 983 deletions.
8 changes: 8 additions & 0 deletions .github/actions/deploy-template-operator/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ runs:
run: |
kubectl apply -f tests/moduletemplates/moduletemplate_template_operator_v2_fast.yaml
kubectl apply -f tests/moduletemplates/moduletemplate_template_operator_v1_regular.yaml
- name: Create Template Operator Module for installation by version
working-directory: lifecycle-manager
if: ${{ matrix.e2e-test == 'module-install-by-version' }}
shell: bash
run: |
kubectl apply -f tests/moduletemplates/moduletemplate_template_operator_v2_fast.yaml
kubectl apply -f tests/moduletemplates/moduletemplate_template_operator_v1_regular.yaml
kubectl apply -f tests/moduletemplates/moduletemplate_template_operator_v2_direct_version.yaml
- name: Create Template Operator Module as Mandatory Module
working-directory: lifecycle-manager
if: ${{ matrix.e2e-test == 'mandatory-module' ||
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/get-configuration/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ runs:
id: define-variables
shell: bash
run: |
echo "k8s_version=${{ github.event.inputs.k8s_version || '1.29.6' }}" >> $GITHUB_OUTPUT
echo "k8s_version=${{ github.event.inputs.k8s_version || '1.30.3' }}" >> $GITHUB_OUTPUT
echo "istio_version=1.20.3" >> $GITHUB_OUTPUT
echo "k3d_version=5.6.0" >> $GITHUB_OUTPUT
echo "k3d_version=5.7.4" >> $GITHUB_OUTPUT
echo "cert_manager_version=1.15.0" >> $GITHUB_OUTPUT
echo "klm_version_tag=PR-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
echo "klm_image_repo=dev" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-tools/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
- uses: ./lifecycle-manager/.github/actions/install-k3d
with:
k3d_version: ${{ inputs.k3d_version }}
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: ${{ inputs.go-version-file }}
cache-dependency-path: ${{ inputs.cache-dependency-path }}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

version: 2
updates:
- package-ecosystem: "github-actions"
directories:
- "/"
- "/.github/actions"
schedule:
interval: "weekly"
commit-message:
prefix: "chore(dependabot)"
- package-ecosystem: "gomod"
directory: "/"
labels:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-test-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Get list of changed files
id: changed-files
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { data: pullRequest } = await github.rest.pulls.get({
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-conventional-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Check Title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@47b15d52c5c30e94a17ec87eb8dd51ff5221fed9
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- module-upgrade-channel-switch
- module-upgrade-new-version
- unmanage-module
- module-install-by-version
- skip-manifest-reconciliation
- ca-certificate-rotation
- self-signed-certificate-rotation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout lifecycle-manager
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run 'make test'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-unit-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
path: codebase
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: ${{ github.workspace }}/codebase/go.mod
- name: Run the quality gate verification
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
atlassian-ide-plugin.xml

## VSCode
**/*.vscode
**/*.devcontainer*

### OSX template
Expand Down
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
// use task "Deploy Kyma" with "localhost" option
"name": "Launch KLM",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${cwd}/cmd/main.go",
"args": ["--in-kcp-mode"],
"env": {
"KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",
"ENABLE_WEBHOOKS": "false"
},
"preLaunchTask": "Install CRDs"
}
]
}
181 changes: 181 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Delete Test Clusters",
"type": "shell",
"command": "k3d cluster rm kcp skr",
},
{
"label": "Ensure Test Clusters",
"type": "shell",
"command": "${cwd}/scripts/tests/create_test_clusters.sh",
},
{
"label": "Create New Test Clusters",
"type": "shell",
"command": "${cwd}/scripts/tests/create_test_clusters.sh",
"dependsOn": [
"Delete Test Clusters"
]
},
// re-run if encountering error that the watcher CRD is missing
{
"label": "Deploy KLM from sources",
"type": "shell",
"command": "TAG=\"$(date +%Y%m%d%H%M%S)\" && make docker-build IMG=${LOCAL_IMG}:${TAG}; make docker-push IMG=${LOCAL_IMG}:${TAG}; make local-deploy-with-watcher IMG=${CLUSTER_IMG}:${TAG}",
"options": {
"env": {
"LOCAL_IMG": "localhost:5111/lifecycle-manager",
"CLUSTER_IMG": "k3d-myregistry.localhost:5000/lifecycle-manager",
"KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",

}
}
},
// re-run if encountering error that the watcher CRD is missing
{
"label": "Deploy KLM from registry",
"type": "shell",
"command": "make local-deploy-with-watcher IMG=${IMG_REGISTRY_HOST}/${input:klmImageRegistry}/${IMG_NAME}:${input:klmImageTag}",
"options": {
"env": {
"IMG_REGISTRY_HOST": "europe-docker.pkg.dev/kyma-project",
"IMG_NAME": "lifecycle-manager",
"KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",
}
}
},
{
"label": "Deploy template-operator",
"type": "shell",
"command": "kubectl apply -f ${cwd}/tests/moduletemplates/${input:templateOperatorVersion}",
"options": {
"env": {
"KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",
}
}
},
{
"label": "Deploy kyma",
"type": "shell",
"command": "export SKR_HOST=${input:skrHost} && ${cwd}/scripts/tests/deploy_kyma.sh",
"options": {
"env": {
"KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",
}
}
},
{
"label": "Un-Deploy kyma",
"type": "shell",
"command": "kubectl -n kcp-system delete kyma kyma-sample; kubectl -n kcp-system delete secret kyma-sample",
"options": {
"env": {
"KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",
}
}
},
{
"label": "E2E Tests",
"type": "shell",
"command": "make -C ${cwd}/tests/e2e ${input:e2eTestTarget}",
"group": {
"kind": "test"
},
"options": {
"env": {
"KCP_KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",
"SKR_KUBECONFIG": "${env:HOME}/.k3d/skr-local.yaml"
}
}
},
{
"label": "Install CRDs",
"type": "shell",
"command": "make install",
"options": {
"env": {
"KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml",
}
}
}
],
"inputs": [
{
// not all of the options work OOTB, see deploy-lifecycle-manager-e2e action.yaml for specific patches
"id": "e2eTestTarget",
"type": "pickString",
"description": "E2E test target",
"options": [
"watcher-enqueue",
"rbac-privileges",
"kyma-deprovision-with-foreground-propagation",
"kyma-deprovision-with-background-propagation",
"module-status-decoupling-with-statefulset",
"module-status-decoupling-with-deployment",
"kyma-metrics",
"module-without-default-cr",
"module-consistency",
"non-blocking-deletion",
"upgrade-under-deletion",
"purge-controller",
"purge-metrics",
"module-upgrade-channel-switch",
"module-upgrade-new-version",
"unmanage-module",
"skip-manifest-reconciliation",
"ca-certificate-rotation",
"self-signed-certificate-rotation",
"mandatory-module",
"mandatory-module-metrics",
"misconfigured-kyma-secret",
"ocm-compatible-module-template",
]
},
{
"id": "templateOperatorVersion",
"type": "pickString",
"description": "Template-operator manifest",
"options": [
"mandatory_moduletemplate_template_operator_v1.yaml",
"mandatory_moduletemplate_template_operator_v2.yaml",
"moduletemplate_template_operator_regular_new_ocm.yaml",
"moduletemplate_template_operator_v1_regular.yaml",
"moduletemplate_template_operator_v2_fast.yaml",
"moduletemplate_template_operator_v2_regular_new_version.yaml",
"operator_v1beta2_moduletemplate_kcp-module_updated.yaml",
"operator_v1beta2_moduletemplate_kcp-module-cred-label.yaml",
"operator_v1beta2_moduletemplate_kcp-module.yaml",
"operator_v1beta2_moduletemplate_ocm.software.v3alpha1.yaml"
]
},
{
"id": "klmImageRegistry",
"type": "pickString",
"description": "Registry of KLM image",
"options": [
"dev",
"prod"
]
},
{
"id": "klmImageTag",
"type": "promptString",
"description": "Tag of the KLM image, e.g. 'latest'",
},
{
"id": "skrHost",
"type": "pickString",
"description": "Host of the SKR",
"options": [
// use host.k3d.internal when deploying KLM into the cluster
"host.k3d.internal",
// use localhost when running KLM locally on the machine
"localhost"
]
},
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22.7-alpine as builder
FROM golang:1.23.2-alpine as builder

WORKDIR /lifecycle-manager
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ IMG := $(IMG_NAME):$(DOCKER_TAG)
BUILD_VERSION := from_makefile

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28.0
ENVTEST_K8S_VERSION = 1.30.3

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down
Loading

0 comments on commit 9b063e8

Please sign in to comment.