Skip to content

Commit 5ea1410

Browse files
authored
chore: update version to 0.20.0 and enhance CI workflow (#1306)
- Bumped operator version to 0.20.0 in Makefile and Chart.yaml. - Simplified GitHub Actions workflow by renaming jobs and removing unnecessary comments. - Added hostPort field to CRDs for Redis resources to support additional configuration. - Deleted unused sidecar.go file to clean up the codebase. These changes improve versioning clarity and streamline the CI/CD process. Signed-off-by: drivebyer <wuyangmuc@gmail.com>
1 parent 45b33df commit 5ea1410

File tree

8 files changed

+48
-49
lines changed

8 files changed

+48
-49
lines changed

.github/workflows/publish-image.yaml

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Image to GitHub Container Registry
1+
name: Publish Image
22

33
on:
44
push:
@@ -8,9 +8,10 @@ on:
88
env:
99
REGISTRY: ghcr.io
1010
REPOSITORY: ot-container-kit/redis-operator
11+
QuayImageName: quay.io/opstree/redis-operator
1112

1213
jobs:
13-
build-and-push:
14+
release-ghcr-image:
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Checkout code
@@ -33,7 +34,7 @@ jobs:
3334
run: |
3435
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
3536
36-
- name: Build and Push Operator image
37+
- name: Build and push image
3738
uses: docker/build-push-action@v6
3839
with:
3940
context: .
@@ -44,49 +45,40 @@ jobs:
4445
${{ env.REGISTRY }}/${{ env.REPOSITORY }}/redis-operator:latest
4546
platforms: linux/amd64,linux/arm64
4647

47-
# name: Release container images
48-
# on:
49-
# pull_request:
50-
# types: [closed]
51-
# branches:
52-
# - main
53-
54-
# env:
55-
# APPLICATION_NAME: redis-operator
56-
# QuayImageName: quay.io/opstree/redis-operator
57-
# APP_VERSION: "v0.15.2"
58-
# DOCKERFILE_PATH: './Dockerfile'
59-
60-
# jobs:
61-
# release_image:
62-
# if: github.event.pull_request.merged == true
63-
# runs-on: ubuntu-latest
64-
# environment: release-image
65-
# steps:
66-
# - name: Checkout
67-
# uses: actions/checkout@v2
48+
release-quay-image:
49+
runs-on: ubuntu-latest
50+
environment: release-image
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
6854

69-
# - name: Set up Docker Buildx
70-
# uses: docker/setup-buildx-action@v2
55+
- name: Set up Docker Buildx
56+
uses: docker/setup-buildx-action@v3
7157

72-
# - name: Set up QEMU
73-
# uses: docker/setup-qemu-action@v3
58+
- name: Set up QEMU
59+
uses: docker/setup-qemu-action@v3
7460

75-
# - name: Login to Quay.io
76-
# uses: docker/login-action@v3
77-
# with:
78-
# registry: quay.io
79-
# username: ${{ secrets.QUAY_USERNAME }}
80-
# password: ${{ secrets.QUAY_PASSWORD }}
61+
- name: Login to Quay.io
62+
uses: docker/login-action@v3
63+
with:
64+
registry: quay.io
65+
username: ${{ secrets.QUAY_USERNAME }}
66+
password: ${{ secrets.QUAY_PASSWORD }}
8167

82-
# - name: Build and push multi-arch latest image
83-
# uses: docker/build-push-action@v2
84-
# with:
85-
# context: .
86-
# file: ${{ env.DOCKERFILE_PATH }}
87-
# platforms: linux/amd64,linux/arm64
88-
# push: true
89-
# tags: ${{ env.QuayImageName }}:${{ env.APP_VERSION }}, ${{ env.QuayImageName }}:latest
68+
- name: Setup Env
69+
run: |
70+
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
71+
72+
- name: Build and push image
73+
uses: docker/build-push-action@v6
74+
with:
75+
context: .
76+
file: Dockerfile
77+
platforms: linux/amd64,linux/arm64
78+
push: true
79+
tags: |
80+
${{ env.QuayImageName }}:${{ env.TAG }}
81+
${{ env.QuayImageName }}:latest
9082
9183
# trivy_scan:
9284
# needs: [release_image]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ===========================
44

55
# Current Operator version
6-
VERSION ?= 0.19.1
6+
VERSION ?= 0.20.0
77

88
# Default bundle image tag
99
BUNDLE_IMG ?= controller-bundle:$(VERSION)

charts/redis-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
apiVersion: v2
3-
version: 0.19.3
4-
appVersion: "0.19.1"
3+
version: 0.20.0
4+
appVersion: "0.20.0"
55
description: Provides easy redis setup definitions for Kubernetes services, and deployment.
66
engine: gotpl
77
maintainers:

charts/redis-operator/crds/redis.redis.opstreelabs.in_redis.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,8 @@ spec:
11791179
- name
11801180
type: object
11811181
type: array
1182+
hostPort:
1183+
type: integer
11821184
initContainer:
11831185
description: InitContainer for each Redis pods
11841186
properties:

charts/redis-operator/crds/redis.redis.opstreelabs.in_redisclusters.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ spec:
329329
type: array
330330
hostNetwork:
331331
type: boolean
332+
hostPort:
333+
type: integer
332334
initContainer:
333335
description: InitContainer for each Redis pods
334336
properties:

charts/redis-operator/crds/redis.redis.opstreelabs.in_redisreplications.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,8 @@ spec:
11881188
- name
11891189
type: object
11901190
type: array
1191+
hostPort:
1192+
type: integer
11911193
initContainer:
11921194
description: InitContainer for each Redis pods
11931195
properties:

charts/redis-operator/crds/redis.redis.opstreelabs.in_redissentinels.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,8 @@ spec:
11131113
- name
11141114
type: object
11151115
type: array
1116+
hostPort:
1117+
type: integer
11161118
initContainer:
11171119
description: InitContainer for each Redis pods
11181120
properties:
@@ -2524,6 +2526,9 @@ spec:
25242526
properties:
25252527
additionalSentinelConfig:
25262528
type: string
2529+
announceHostnames:
2530+
default: "no"
2531+
type: string
25272532
downAfterMilliseconds:
25282533
default: "30000"
25292534
type: string
@@ -2634,9 +2639,6 @@ spec:
26342639
resolveHostnames:
26352640
default: "no"
26362641
type: string
2637-
announceHostnames:
2638-
default: "no"
2639-
type: string
26402642
required:
26412643
- redisReplicationName
26422644
type: object

pkg/agent/sidecar.go

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)