From 4a95a813cdfeb2e3d5861398e5c29ee0b8ccef54 Mon Sep 17 00:00:00 2001 From: Safwan Date: Mon, 12 Jan 2026 23:02:26 +0500 Subject: [PATCH 1/7] Add Edition variable in metadata --- .github/workflows/pull_request.yaml | 6 ++++++ .github/workflows/push.yaml | 9 ++++++++- .github/workflows/release.yaml | 3 +++ Dockerfile | 4 +++- go.mod | 2 +- pkg/common/metainfo.go | 7 ++++++- 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index c428826e..9b403bfa 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -22,6 +22,7 @@ env: KUBERNETES_VERSION: "1.30.0" KIND_VERSION: "0.23.0" REGISTRY: ghcr.io + RELOADER_EDITION: oss jobs: qa: @@ -154,6 +155,7 @@ jobs: VERSION=merge-${{ steps.generate_tag.outputs.GIT_TAG }} COMMIT=${{github.event.pull_request.head.sha}} BUILD_DATE=${{ steps.prep.outputs.created }} + EDITION=${{ env.RELOADER_EDITION }} BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} cache-to: type=inline @@ -173,6 +175,10 @@ jobs: pull: true push: false build-args: | + VERSION=merge-${{ steps.generate_tag.outputs.GIT_UBI_TAG }} + COMMIT=${{github.event.pull_request.head.sha}} + BUILD_DATE=${{ steps.prep.outputs.created }} + EDITION=${{ env.RELOADER_EDITION }} BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} BUILDER_IMAGE=${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.highest_tag.outputs.tag }} cache-to: type=inline diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index dda9a1c1..6340f0fd 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -15,6 +15,7 @@ env: KIND_VERSION: "0.23.0" HELM_REGISTRY_URL: "https://stakater.github.io/stakater-charts" REGISTRY: ghcr.io + RELOADER_EDITION: oss jobs: build: @@ -103,7 +104,12 @@ jobs: file: ${{ env.DOCKER_FILE_PATH }} pull: true push: true - build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} + build-args: | + VERSION=merge-${{ github.event.number }} + COMMIT=${{ github.sha }} + BUILD_DATE=${{ steps.prep.outputs.created }} + EDITION=${{ env.RELOADER_EDITION }} + BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} cache-to: type=inline platforms: linux/amd64,linux/arm,linux/arm64 tags: | @@ -152,6 +158,7 @@ jobs: VERSION=merge-${{ github.event.number }} COMMIT=${{ github.sha }} BUILD_DATE=${{ steps.prep.outputs.created }} + EDITION=${{ env.RELOADER_EDITION }} BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} cache-to: type=inline platforms: linux/amd64,linux/arm,linux/arm64 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6bd392f7..32cecd6d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,6 +11,7 @@ env: KUBERNETES_VERSION: "1.30.0" KIND_VERSION: "0.23.0" REGISTRY: ghcr.io + RELOADER_EDITION: oss jobs: release: @@ -110,6 +111,7 @@ jobs: VERSION=${{ steps.generate_tag.outputs.RELEASE_VERSION }} COMMIT=${{ github.sha }} BUILD_DATE=${{ steps.prep.outputs.created }} + EDITION=${{ env.RELOADER_EDITION }} labels: | org.opencontainers.image.source=${{ github.event.repository.clone_url }} org.opencontainers.image.created=${{ steps.prep.outputs.created }} @@ -160,6 +162,7 @@ jobs: VERSION=${{ steps.generate_tag.outputs.RELEASE_VERSION }} COMMIT=${{ github.sha }} BUILD_DATE=${{ steps.prep.outputs.created }} + EDITION=${{ env.RELOADER_EDITION }} labels: | org.opencontainers.image.source=${{ github.event.repository.clone_url }} org.opencontainers.image.created=${{ steps.prep.outputs.created }} diff --git a/Dockerfile b/Dockerfile index 53cc26d8..6325a103 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ ARG GOPRIVATE ARG COMMIT ARG VERSION ARG BUILD_DATE +ARG EDITION WORKDIR /workspace @@ -36,7 +37,8 @@ RUN CGO_ENABLED=0 \ GO111MODULE=on \ go build -ldflags="-s -w -X github.com/stakater/Reloader/pkg/common.Version=${VERSION} \ -X github.com/stakater/Reloader/pkg/common.Commit=${COMMIT} \ - -X github.com/stakater/Reloader/pkg/common.BuildDate=${BUILD_DATE}" \ + -X github.com/stakater/Reloader/pkg/common.BuildDate=${BUILD_DATE} \ + -X github.com/stakater/Reloader/pkg/common.Edition=${EDITION}" \ -installsuffix 'static' -mod=mod -a -o manager ./ # Use distroless as minimal base image to package the manager binary diff --git a/go.mod b/go.mod index 48f13d8e..f2200fdc 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( k8s.io/apimachinery v0.35.0 k8s.io/client-go v0.35.0 k8s.io/kubectl v0.35.0 - k8s.io/utils v0.0.0-20251222233032-718f0e51e6d2 sigs.k8s.io/secrets-store-csi-driver v1.5.5 ) @@ -65,6 +64,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect + k8s.io/utils v0.0.0-20251222233032-718f0e51e6d2 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect diff --git a/pkg/common/metainfo.go b/pkg/common/metainfo.go index b792c529..b11c3446 100644 --- a/pkg/common/metainfo.go +++ b/pkg/common/metainfo.go @@ -18,11 +18,12 @@ import ( var Version = "dev" var Commit = "unknown" var BuildDate = "unknown" +var Edition = "oss" const ( MetaInfoConfigmapName = "reloader-meta-info" MetaInfoConfigmapLabelKey = "reloader.stakater.com/meta-info" - MetaInfoConfigmapLabelValue = "reloader-oss" + MetaInfoConfigmapLabelValue = "reloader" ) // MetaInfo contains comprehensive metadata about the Reloader instance. @@ -47,6 +48,9 @@ type BuildInfo struct { CommitHash string `json:"commitHash"` // CommitTime is the timestamp of the Git commit used to build this binary CommitTime time.Time `json:"commitTime"` + + // Edition indicates the edition of Reloader (e.g., OSS, Enterprise) + Edition string `json:"edition"` } func NewBuildInfo() *BuildInfo { @@ -55,6 +59,7 @@ func NewBuildInfo() *BuildInfo { ReleaseVersion: Version, CommitHash: Commit, CommitTime: ParseUTCTime(BuildDate), + Edition: Edition, } return metaInfo From 6c15e5db24233cc5764e2f0a8704693d0972f61b Mon Sep 17 00:00:00 2001 From: Safwan Date: Mon, 12 Jan 2026 23:29:16 +0500 Subject: [PATCH 2/7] test by pushing images --- .github/workflows/pull_request.yaml | 3 ++- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 9b403bfa..d9174d7b 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -38,6 +38,7 @@ jobs: contents: read pull-requests: write issues: write + packages: write # FOR TESTING ONLY runs-on: ubuntu-latest name: Build @@ -150,7 +151,7 @@ jobs: context: . file: ${{ env.DOCKER_FILE_PATH }} pull: true - push: false + push: true # true FOR TESTING ONLY build-args: | VERSION=merge-${{ steps.generate_tag.outputs.GIT_TAG }} COMMIT=${{github.event.pull_request.head.sha}} diff --git a/Dockerfile b/Dockerfile index 6325a103..67a6a53c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ ARG GOPRIVATE ARG COMMIT ARG VERSION ARG BUILD_DATE -ARG EDITION +ARG EDITION=oss WORKDIR /workspace From 32899e19830ab7e3f30feea7e683c1b01261a7b0 Mon Sep 17 00:00:00 2001 From: Safwan Date: Tue, 13 Jan 2026 00:17:22 +0500 Subject: [PATCH 3/7] login to registry --- .github/workflows/pull_request.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index d9174d7b..863196fa 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -143,6 +143,13 @@ jobs: run: | echo GHCR_IMAGE_REPOSITORY=${{env.REGISTRY}}/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + - name: Login to ghcr registry + uses: docker/login-action@v3 + with: + registry: ${{env.REGISTRY}} + username: stakater-user + password: ${{secrets.GITHUB_TOKEN}} + # To identify any broken changes in dockerfiles or dependencies - name: Build Docker Image From fd5f03adfb8e85ca61a7fe4212b78375ebcb91c3 Mon Sep 17 00:00:00 2001 From: Safwan Date: Tue, 13 Jan 2026 00:24:39 +0500 Subject: [PATCH 4/7] disable testing temporarily --- .github/workflows/pull_request.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 863196fa..dadf8bb4 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -110,19 +110,19 @@ jobs: kubectl cluster-info - - name: Test - run: make test + # - name: Test + # run: make test - - name: Run quick A/B load tests - uses: ./.github/actions/loadtest - with: - old-ref: ${{ github.event.pull_request.base.sha }} - # new-ref defaults to current checkout (PR branch) - scenarios: 'S1,S4,S6' - test-type: 'quick' - kind-cluster: 'kind' # Use the existing cluster created above - post-comment: 'true' - pr-number: ${{ github.event.pull_request.number }} + # - name: Run quick A/B load tests + # uses: ./.github/actions/loadtest + # with: + # old-ref: ${{ github.event.pull_request.base.sha }} + # # new-ref defaults to current checkout (PR branch) + # scenarios: 'S1,S4,S6' + # test-type: 'quick' + # kind-cluster: 'kind' # Use the existing cluster created above + # post-comment: 'true' + # pr-number: ${{ github.event.pull_request.number }} - name: Generate Tags id: generate_tag @@ -149,7 +149,7 @@ jobs: registry: ${{env.REGISTRY}} username: stakater-user password: ${{secrets.GITHUB_TOKEN}} - + # To identify any broken changes in dockerfiles or dependencies - name: Build Docker Image From 8537502bbdc67744be7422d5f645fb754b22a331 Mon Sep 17 00:00:00 2001 From: Safwan Date: Tue, 13 Jan 2026 00:41:12 +0500 Subject: [PATCH 5/7] revert extra changes --- .github/workflows/pull_request.yaml | 27 +++++++++---------- .../kubernetes/chart/reloader/values.yaml | 4 +-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index dadf8bb4..9a1798f5 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -38,7 +38,6 @@ jobs: contents: read pull-requests: write issues: write - packages: write # FOR TESTING ONLY runs-on: ubuntu-latest name: Build @@ -110,19 +109,19 @@ jobs: kubectl cluster-info - # - name: Test - # run: make test + - name: Test + run: make test - # - name: Run quick A/B load tests - # uses: ./.github/actions/loadtest - # with: - # old-ref: ${{ github.event.pull_request.base.sha }} - # # new-ref defaults to current checkout (PR branch) - # scenarios: 'S1,S4,S6' - # test-type: 'quick' - # kind-cluster: 'kind' # Use the existing cluster created above - # post-comment: 'true' - # pr-number: ${{ github.event.pull_request.number }} + - name: Run quick A/B load tests + uses: ./.github/actions/loadtest + with: + old-ref: ${{ github.event.pull_request.base.sha }} + # new-ref defaults to current checkout (PR branch) + scenarios: 'S1,S4,S6' + test-type: 'quick' + kind-cluster: 'kind' # Use the existing cluster created above + post-comment: 'true' + pr-number: ${{ github.event.pull_request.number }} - name: Generate Tags id: generate_tag @@ -158,7 +157,7 @@ jobs: context: . file: ${{ env.DOCKER_FILE_PATH }} pull: true - push: true # true FOR TESTING ONLY + push: false build-args: | VERSION=merge-${{ steps.generate_tag.outputs.GIT_TAG }} COMMIT=${{github.event.pull_request.head.sha}} diff --git a/deployments/kubernetes/chart/reloader/values.yaml b/deployments/kubernetes/chart/reloader/values.yaml index a6074919..e36d11dc 100644 --- a/deployments/kubernetes/chart/reloader/values.yaml +++ b/deployments/kubernetes/chart/reloader/values.yaml @@ -18,8 +18,8 @@ fullnameOverride: "" image: name: stakater/reloader - repository: ghcr.io/stakater/reloader - tag: v1.4.12 + repository: reloader + tag: edition # digest: sha256:1234567 pullPolicy: IfNotPresent From 5c3593fb1c27da4ff5d004c2f57e465d346fce39 Mon Sep 17 00:00:00 2001 From: Safwan Date: Tue, 13 Jan 2026 00:59:51 +0500 Subject: [PATCH 6/7] revert values.yaml --- deployments/kubernetes/chart/reloader/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployments/kubernetes/chart/reloader/values.yaml b/deployments/kubernetes/chart/reloader/values.yaml index e36d11dc..a6074919 100644 --- a/deployments/kubernetes/chart/reloader/values.yaml +++ b/deployments/kubernetes/chart/reloader/values.yaml @@ -18,8 +18,8 @@ fullnameOverride: "" image: name: stakater/reloader - repository: reloader - tag: edition + repository: ghcr.io/stakater/reloader + tag: v1.4.12 # digest: sha256:1234567 pullPolicy: IfNotPresent From 3ee87d37259413f6662b34bd566194b9c9510be4 Mon Sep 17 00:00:00 2001 From: Safwan Date: Tue, 20 Jan 2026 16:26:48 +0500 Subject: [PATCH 7/7] resolved comments --- .github/workflows/pull_request.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 9a1798f5..9b403bfa 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -142,13 +142,6 @@ jobs: run: | echo GHCR_IMAGE_REPOSITORY=${{env.REGISTRY}}/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - - name: Login to ghcr registry - uses: docker/login-action@v3 - with: - registry: ${{env.REGISTRY}} - username: stakater-user - password: ${{secrets.GITHUB_TOKEN}} - # To identify any broken changes in dockerfiles or dependencies - name: Build Docker Image