Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Dev: Update module sigs.k8s.io/kustomize/kustomize/v5 to v5.3.0 - autoclosed #5

Closed
wants to merge 26 commits into from
Closed
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
15 changes: 5 additions & 10 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,22 @@
"labels": ["dependencies"],
"digest": { "enabled": false },
"enabledManagers": [ "regex", "dockerfile", "gomod", "github-actions" ],
"prHourlyLimit": 10,
"regexManagers": [
{
"fileMatch": [ "(^|/|\\.)prerequisites.mk$", "(^|/|\\.)third-party-licenses.sh$" ],
"matchStrings": [
// dependencies like "go install github.com/golangci/golangci-lint/cmd/[email protected]", make sure to only use repository and ignore sub-packages
"go install (?<repository>.*?)\/(?<package>[a-zA-Z0-9\\-]+\/.+?)(\/.*)?@(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?)",
// catches and handles "sigs.k8s.io/controller-tools/cmd/[email protected]"
"\"(?<repository>.*?)\/(?<package>[a-zA-Z0-9\\-]+\/.+?)(\/.*)?@(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?)\"",
// catches and handles "sigs.k8s.io/kustomize/kustomize/[email protected]"
"\"(?<repository>.*?)\/(?<package>.*?)@(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?)\""
"depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s.*?_version=(?<currentValue>.*)\\s"
],
"datasourceTemplate": "go",
"depNameTemplate": "{{repository}}/{{package}}"
"datasourceTemplate": "go"
}
],
"packageRules": [
{
"matchManagers": ["dockerfile"],
"commitMessagePrefix": "Docker:",
"enabled": true,
"allowedVersions": "/^v[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?$/"
"allowedVersions": "/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?$/"
},
{
"matchManagers": ["gomod"],
Expand All @@ -35,7 +30,7 @@
"allowedVersions": "/^v[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?$/",
"postUpdateOptions": [ "gomodTidy" ]
},

{
"matchManagers": ["gomod"],
"matchDepTypes": ["indirect"],
Expand Down
172 changes: 89 additions & 83 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,81 +13,81 @@ permissions:
contents: read

env:
DOCKER_REGISTRY: "quay.io"
DOCKER_REPOSITORY: "dynatrace/dynatrace-operator"
DOCKER_REGISTRY: "ghcr.io"
DOCKER_REPOSITORY: "wepudt/dynatrace-operator"

jobs:
helm-test:
name: Run helm unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download dependencies
id: helm-unittest-download
run: |
make prerequisites/helm
- name: Run Unit tests
id: helm-unittest
run: |
make test/helm/unit
# helm-test:
# name: Run helm unit tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# - name: Set up Helm
# uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Download dependencies
# id: helm-unittest-download
# run: |
# make prerequisites/helm
# - name: Run Unit tests
# id: helm-unittest
# run: |
# make test/helm/unit

helm-lint:
name: Run helm linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Linting
id: helm-linting
run: |
make test/helm/lint
# helm-lint:
# name: Run helm linting
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# - name: Set up Helm
# uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Run Linting
# id: helm-linting
# run: |
# make test/helm/lint

tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup Golang
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: "${{ github.workspace }}/go.mod"
- name: Download dependencies
id: depdownload
run: |
hack/build/ci/install-cgo-dependencies.sh
- name: Run Unit tests
id: unittest
run: |
make go/test
# tests:
# name: Run unit tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# - name: Setup Golang
# uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
# with:
# go-version-file: "${{ github.workspace }}/go.mod"
# - name: Download dependencies
# id: depdownload
# run: |
# hack/build/ci/install-cgo-dependencies.sh
# - name: Run Unit tests
# id: unittest
# run: |
# make go/test

linting:
name: Run linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: "${{ github.workspace }}/go.mod"
- name: Download dependencies
id: depdownload
run: |
hack/build/ci/install-cgo-dependencies.sh
- name: golangci-lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
with:
version: v1.51.1
args: --build-tags containers_image_storage_stub,e2e --timeout 300s --out-${NO_FUTURE}format colored-line-number
# linting:
# name: Run linting
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
# with:
# go-version-file: "${{ github.workspace }}/go.mod"
# - name: Download dependencies
# id: depdownload
# run: |
# hack/build/ci/install-cgo-dependencies.sh
# - name: golangci-lint
# uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
# with:
# version: v1.51.1
# args: --build-tags containers_image_storage_stub,e2e --timeout 300s --out-${NO_FUTURE}format colored-line-number

prepare:
name: Prepare properties
Expand Down Expand Up @@ -126,10 +126,10 @@ jobs:
build:
name: Build images
runs-on: ubuntu-latest
needs: [prepare, tests, linting]
needs: [prepare]
strategy:
matrix:
platform: [amd64, arm64]
platform: [amd64]
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand All @@ -144,20 +144,23 @@ jobs:
push:
name: Push images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [prepare, build]
strategy:
matrix:
platform: [amd64, arm64]
platform: [amd64]
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Login to Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Image
if: matrix.platform != 'arm64' || github.ref_protected
uses: ./.github/actions/upload-image
Expand All @@ -172,18 +175,21 @@ jobs:
name: Create manifest
needs: [prepare, push]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
COMBINED: ${{ github.ref_protected }}
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Login to Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create Manifests
uses: ./.github/actions/create-manifests
with:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/publish-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+ # include prerelease tags too

permissions:
contents: read
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
needs: [prepare]
strategy:
matrix:
platform: [amd64, arm64]
platform: [amd64, arm64, ppc64le]
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand All @@ -59,7 +60,7 @@ jobs:
id-token: write
strategy:
matrix:
platform: [amd64, arm64]
platform: [amd64]
registry: [gcr, dockerhub]
include:
- registry: gcr
Expand All @@ -68,7 +69,7 @@ jobs:
username: GCR_USERNAME
password: GCR_JSON_KEY
- registry: dockerhub
url: docker.io
url: ghcr.io
repository: DOCKERHUB_REPOSITORY
username: DOCKERHUB_USERNAME
password: DOCKERHUB_PASSWORD
Expand Down Expand Up @@ -104,11 +105,12 @@ jobs:

push-rhcc:
name: Push amd64 image to RHCC
if: ${{ !contains(github.ref, '-rc') }}
environment: Release
needs: [prepare, build]
runs-on: ubuntu-latest
env:
SCAN_REGISTRY: "quay.io"
SCAN_REGISTRY: "ghcr.io"
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# setup build image
FROM golang:1.20.3@sha256:403f48633fb5ebd49f9a2b6ad6719f912df23dae44974a0c9445be331e72ff5e AS go-base
FROM golang:1.20.5@sha256:344193a70dc3588452ea39b4a1e465a8d3c91f788ae053f7ee168cebf18e0a50 AS go-base
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get update && apt-get install -y libbtrfs-dev libdevmapper-dev
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SHELL ?= bash
## Installs dependencies
deps: prerequisites/setup-pre-commit prerequisites/kustomize prerequisites/controller-gen

## Builds the operator image and pushes it to quay with a snapshot tag
## Builds the operator image and pushes it to ghcr with a snapshot tag
build: images/build/push

## Installs (deploys) the operator on a k8s/openshift cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ metadata:
]
capabilities: Deep Insights
categories: Monitoring,Logging & Tracing,OpenShift Optional
containerImage: quay.io/dynatrace/dynatrace-operator
containerImage: ghcr.io/dynatrace/dynatrace-operator
operators.operatorframework.io/builder: operator-sdk-v1.3.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
repository: https://github.com/Dynatrace/dynatrace-operator
Expand Down Expand Up @@ -247,7 +247,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
image: quay.io/dynatrace/dynatrace-operator:v0.1.0
image: ghcr.io/dynatrace/dynatrace-operator:v0.1.0
imagePullPolicy: Always
name: dynatrace-operator
resources:
Expand Down
2 changes: 1 addition & 1 deletion hack/build/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ mkdir -p third_party_licenses
docker build . -f ./Dockerfile -t "${out_image}" \
--build-arg "GO_LINKER_ARGS=${go_linker_args}" \
--build-arg "GO_BUILD_TAGS=${go_build_tags}" \
--label "quay.expires-after=14d"
--label "ghcr.expires-after=14d"
rm -rf third_party_licenses
2 changes: 1 addition & 1 deletion hack/build/bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [ -n "${BUNDLE_DEFAULT_CHANNEL}" ]; then
fi

"${OPERATOR_SDK}" generate kustomize manifests -q --apis-dir ./src/api/
(cd "config/deploy/${PLATFORM}" && ${KUSTOMIZE} edit set image quay.io/dynatrace/dynatrace-operator:snapshot="${OLM_IMAGE}")
(cd "config/deploy/${PLATFORM}" && ${KUSTOMIZE} edit set image ghcr.io/dynatrace/dynatrace-operator:snapshot="${OLM_IMAGE}")
"${KUSTOMIZE}" build "config/olm/${PLATFORM}" | "${OPERATOR_SDK}" generate bundle --overwrite --version "${VERSION}" "${SDK_PARAMS[@]}"
"${OPERATOR_SDK}" bundle validate ./bundle

Expand Down
2 changes: 1 addition & 1 deletion hack/build/ci/prepare-build-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ createDockerImageTag() {

createDockerImageLabels() {
if [[ "${GITHUB_REF_TYPE}" != "tag" ]] && [[ ! "${GITHUB_REF_NAME}" =~ ^release-* ]]; then
echo "quay.expires-after=10d"
echo "ghcr.expires-after=10d"
fi

echo "build-date=$(date --iso-8601)"
Expand Down
5 changes: 3 additions & 2 deletions hack/build/ci/third-party-licenses.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
#renovate depName=github.com/google/go-licenses
golang_licenses_version=v1.5.0

# get licenses if no cache exists
if ! [ -d ./third_party_licenses ]; then
go install github.com/google/go-licenses@v1.6.0 && go-licenses save ./... --save_path third_party_licenses --force
go install github.com/google/go-licenses@${golang_licenses_version} && go-licenses save ./... --save_path third_party_licenses --force
fi

2 changes: 1 addition & 1 deletion hack/make/images.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMAGE ?= quay.io/dynatrace/dynatrace-operator
IMAGE ?= ghcr.io/wepudt/dynatrace-operator
#Needed for the e2e pipeline to work
BRANCH ?= $(shell git branch --show-current)
SNAPSHOT_SUFFIX ?= $(shell echo "${BRANCH}" | sed "s/[^a-zA-Z0-9_-]/-/g")
Expand Down
Loading