Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from OT-CONTAINER-KIT:master #2

Open
wants to merge 183 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
7b8c375
ci: validate yaml before run e2e (#873)
drivebyer Apr 16, 2024
80e7f2f
fix: redis cluster update as scale out (#872)
drivebyer Apr 16, 2024
15df443
chore(deps): bump k8s.io/api from 0.29.3 to 0.29.4 (#874)
dependabot[bot] Apr 17, 2024
b37366a
test: cover func enableRedisMonitoring (#883)
k3mahesh Apr 19, 2024
7999a05
fix: ClusterSlaves result should be cut (#884)
drivebyer Apr 20, 2024
736836c
fix: should get the really leader count when scale in (#885)
drivebyer Apr 22, 2024
80bc4a4
test: cover generateInitContainerDef (#888)
k3mahesh Apr 23, 2024
f5028bd
chore(deps): bump helm/kind-action from 1.9.0 to 1.10.0 (#889)
dependabot[bot] Apr 25, 2024
40c4a0d
refactor: update status if not equal (#900)
drivebyer Apr 26, 2024
3c5373e
chore(deps): bump golangci/golangci-lint-action from 4 to 5 (#894)
dependabot[bot] Apr 27, 2024
4c7b570
chore(deps): bump github.com/onsi/gomega from 1.32.0 to 1.33.0 (#881)
dependabot[bot] Apr 27, 2024
9cd2ae9
fix: exporter can not connect to redis when enable tls (#902)
wkd-woo Apr 29, 2024
f59f71e
chore(deps): bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.17.2 (#903)
dependabot[bot] Apr 30, 2024
840675c
chore(deps): bump github.com/onsi/gomega from 1.33.0 to 1.33.1 (#910)
dependabot[bot] May 4, 2024
95d1f55
ci: run e2e after operator ci check (#913)
drivebyer May 6, 2024
4e60683
feat: probe use built-in, discarded healthcheck.sh (#907)
drivebyer May 6, 2024
10c1e6b
build: add workflow to publish image to ghcr (#914)
drivebyer May 7, 2024
c02d5a6
fix: runtime panic when `storage` param is empty (#887)
teocns May 7, 2024
c0b3c04
docs: update standalone pod name (#747)
MathieuCesbron May 7, 2024
37ac693
feat: WATCH_NAMESPACE support multi namespace (#919)
drivebyer May 7, 2024
a9fa699
fix: runtime panic when delete rediscluster which disable persistent …
drivebyer May 11, 2024
09a80f4
feat: add redis-role label to redis replication (#925)
drivebyer May 14, 2024
fae7db7
build: repository name must be lowercase (#926)
drivebyer May 14, 2024
bd1e4fa
fix: check redis replication after handling finalizer (#936)
drivebyer May 21, 2024
14fce7c
chore(deps): bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.17.3 (#920)
dependabot[bot] May 21, 2024
deb9cd6
chore(deps): bump golangci/golangci-lint-action from 5 to 6 (#916)
dependabot[bot] May 21, 2024
68d053b
chore(deps): bump docker/setup-buildx-action from 2 to 3 (#917)
dependabot[bot] May 21, 2024
39ed5d0
chore(deps): bump docker/setup-qemu-action from 2 to 3 (#915)
dependabot[bot] May 21, 2024
d15c80e
fix: return ASAP after handling finalizer (#940)
drivebyer May 22, 2024
e021986
build: add support for other container engines (#947)
montaguethomas May 23, 2024
8ba7390
feat: add redis operator helm chart and release workflow (#941)
drivebyer May 27, 2024
bd6ddac
build: separate chart and image release process (#956)
drivebyer May 30, 2024
5ec6ef3
feat: add support for configurable probe handlers (#934)
com6056 May 30, 2024
52ed749
Release operator chart 0.15.11
drivebyer May 30, 2024
df24341
ci: fix chart release yaml syntax (#957)
drivebyer May 30, 2024
64d376e
Release operator chart 0.16.1
drivebyer May 30, 2024
5554025
ci: remove unuse kuttl test workflow (#958)
drivebyer May 31, 2024
0fd0e42
refactor: remove duplicated tls code (#961)
drivebyer Jun 2, 2024
a207422
test: cover generateContainerDef (#962)
k3mahesh Jun 3, 2024
ba8dfa4
fix: sentinel should not reconcile until replication cluster ready (#…
drivebyer Jun 4, 2024
96a5ccf
test: generateInitContainerDef added additional env and resources (#963)
k3mahesh Jun 5, 2024
92ac24f
feat: rolling update sequence from leader to follower (#966)
drivebyer Jun 5, 2024
ae814ec
feat: add security context values in operator chart (#973)
drivebyer Jun 6, 2024
b44f303
refactor: add common controller util (#977)
drivebyer Jun 8, 2024
46ded9f
test: generateStatefulSetsDef cover (#980)
k3mahesh Jun 12, 2024
b22118c
refactor: reconcile on statefulset update (#988)
drivebyer Jun 15, 2024
a838608
feat: add securityContext for exporter, initcontainers and sidecars (…
lsoica Jun 15, 2024
4afc8c2
test: cluster connection must be run after ready (#989)
drivebyer Jun 15, 2024
052d2e5
fix: watchNamespace value does not take effect in chart (#990)
drivebyer Jun 15, 2024
b6194b0
feat: add automountServiceAccountToken values for deployment and serv…
drivebyer Jun 15, 2024
2838af4
fix: ReadyReplicas need to be checked in `IsStatefulSetReady` (#993)
drivebyer Jun 16, 2024
4f5f721
test: cover getSidecars (#997)
k3mahesh Jun 19, 2024
6794133
test: Cover Createorupdatestateful (#968)
k3mahesh Jun 19, 2024
909d9e4
feat: add support for extra volume mounts for redis sentinel (#994)
lsoica Jun 19, 2024
c58d54f
fix: add default port to enable `SENTINEL_PORT` environment (#999)
drivebyer Jun 19, 2024
dd4e8e1
chore: remove latest version for conversion webhook (#760)
MathieuCesbron Jun 21, 2024
f1080f5
feat: allow rbac to pe externally provisioned (#1005)
lsoica Jun 22, 2024
224c286
feat: add redis/redisreplication/redissentinel/rediscluster chart (#1…
drivebyer Jun 23, 2024
02fb120
chore(deps): bump docker/build-push-action from 3 to 6 (#998)
dependabot[bot] Jun 23, 2024
08eb5eb
docs: fix example broken links (#1008)
drivebyer Jun 23, 2024
0dddaea
feat: add redisReplicationPassword values to connect secured replicat…
drivebyer Jul 10, 2024
1f51a5e
Release operator chart 0.18.0
drivebyer Jul 12, 2024
d64670e
fix: indention error when enable additional config (#1031)
drivebyer Jul 23, 2024
c3bbe88
feat: support setting minReadySeconds on the stateful sets (#1023)
mattrobinsonsre Jul 23, 2024
b343653
fix: field validate error when enable additional config for sentinel …
drivebyer Jul 23, 2024
e3655af
fix: unknown field error when upgrade chart (#1034)
drivebyer Jul 24, 2024
3698e79
Update redis operator version
drivebyer Aug 1, 2024
31c5dca
fix: bad indentation on redis standalone additional configs (#1040)
dschaaff Aug 6, 2024
10087be
docs: generate chart README from helm-docs (#1041)
drivebyer Aug 8, 2024
7c2d396
feat: add tolerations to operator chart (#1051)
rhysjtevans Aug 30, 2024
1091124
feat: add image pull secret for redis operator (#1053)
civkule Aug 30, 2024
86adf56
ci: add helm docs test action (#1058)
drivebyer Sep 12, 2024
70bee6f
test: move controller to their own package (#1064)
drivebyer Sep 15, 2024
2b70f53
test: cleanup some e2e test move to envtest (#1065)
drivebyer Sep 15, 2024
c0dc636
chore(deps): bump kyverno/chainsaw from 0.0.9 to 0.2.9 (#1057)
dependabot[bot] Sep 16, 2024
64d7204
test: remove chainsaw test strategy (#1066)
drivebyer Sep 16, 2024
f48930c
test: add test strategy for redis version (#1067)
drivebyer Sep 16, 2024
72ce071
test: add test strategy version 6.2.14 (#1068)
drivebyer Sep 17, 2024
3d31886
ci: add stale pr/issue workflow
drivebyer Sep 17, 2024
dd94689
feat: add service monitor to redis sentinel chart (#1071)
drivebyer Sep 17, 2024
e73a1d4
feat: add readiness/liveness probe to redis operator chart (#1072)
drivebyer Sep 17, 2024
debcfd3
docs: fix image src path (#1073)
drivebyer Sep 18, 2024
c44d80b
chore: update redis-operator chart version to 0.18.3 (#1074)
shubham-cmyk Sep 19, 2024
0c036f0
ci: Fix Ci for the helm chart release (#1075)
shubham-cmyk Sep 19, 2024
1dcc0c9
ci: Revert GitHub Actions workflow for publishing charts (#1076)
shubham-cmyk Sep 19, 2024
36e2666
chore(deps): bump helm/kind-action from 1.5.0 to 1.10.0 (#1070)
dependabot[bot] Sep 23, 2024
0a48634
chore(deps): bump amannn/action-semantic-pull-request from 5.4.0 to 5…
dependabot[bot] Sep 23, 2024
69970d4
chore(deps): bump docker/login-action from 1 to 3 (#946)
dependabot[bot] Sep 23, 2024
1ba262a
chore(deps): bump actions/checkout from 2 to 4 (#944)
dependabot[bot] Sep 23, 2024
753798e
chore(deps): bump github.com/go-logr/logr from 1.4.1 to 1.4.2 (#942)
dependabot[bot] Sep 23, 2024
344b3d0
Revert "chore(deps): bump helm/kind-action from 1.5.0 to 1.10.0" (#1082)
shubham-cmyk Sep 23, 2024
324a09a
chore(deps): bump actions/setup-python from 4 to 5 (#1086)
dependabot[bot] Sep 25, 2024
9284b8f
chore(deps): bump azure/setup-helm from 3 to 4 (#1087)
dependabot[bot] Sep 25, 2024
10ba30a
chore(deps): bump actions/checkout from 3 to 4 (#1085)
dependabot[bot] Oct 5, 2024
94e2437
feat: upgrade redis/sentinel image to 7.0.15 (#1099)
drivebyer Oct 12, 2024
bee2bf7
chore: update makefile and various tooling dependencies (#1102)
Nashluffy Oct 14, 2024
de6b066
fix: Attempt to repair disconnected/failed master nodes before failin…
Nashluffy Oct 18, 2024
934896b
chore(deps): bump kyverno/action-install-chainsaw from 0.2.9 to 0.2.1…
dependabot[bot] Oct 22, 2024
791c1d9
chore(deps): bump sigstore/cosign-installer from 3.6.0 to 3.7.0 (#1096)
dependabot[bot] Oct 22, 2024
a4658ed
chore(deps): bump helm/chart-releaser-action from 1.5.0 to 1.6.0 (#1009)
dependabot[bot] Oct 22, 2024
89b18fe
Update CODEOWNERS
drivebyer Oct 29, 2024
9d37c6e
test: remove some duplicated e2e case (#1114)
drivebyer Nov 5, 2024
e6f354f
fix: set controller probe endpoint handler (#1121)
drivebyer Nov 6, 2024
c48c9c5
feat: reconcile redis sentinel only on master changed (#1122)
drivebyer Nov 6, 2024
d043326
Update redis operator version
drivebyer Nov 7, 2024
efb9624
feat: add PDB and probes, drop unspecified acl in sentinel helm (#1123)
Dariusch Nov 8, 2024
147d706
feat: add master/replica service to redis replication (#1124)
drivebyer Nov 11, 2024
5a8a345
feat: add recreateStatefulSetOnUpdateInvalid helm chart value (#1127)
drivebyer Nov 13, 2024
0eac383
test: remove unnecessary waits from e2e tests (#1106)
Nashluffy Nov 13, 2024
c6fcdb7
refactor(deps): bump go from 1.21 to 1.22 (#853)
shubham-cmyk Nov 14, 2024
38bc027
doc: fix "Image Compatibility" (#1128)
b1gb4by Nov 14, 2024
f72628d
chore(deps): bump github.com/onsi/gomega from 1.33.1 to 1.35.1 (#1119)
dependabot[bot] Nov 15, 2024
3135e0f
feat: add context param and get logger from it (#1132)
drivebyer Nov 15, 2024
aa2e895
chore(deps): bump codecov/codecov-action from 4 to 5 (#1130)
dependabot[bot] Nov 17, 2024
7953e53
chore(deps): bump github.com/redis/go-redis/v9 from 9.5.1 to 9.7.0 (#…
dependabot[bot] Nov 17, 2024
53b95a0
fix: pdb value mapping in redis-sentinel (#1136)
Dariusch Nov 18, 2024
b9034e8
fix: chart render error when enable initcontainer (#1146)
drivebyer Dec 2, 2024
a5dd80e
fix: initContainer enabled properties not define in template (#1152)
drivebyer Dec 5, 2024
e9ec33f
chore(deps): bump kyverno/action-install-chainsaw from 0.2.11 to 0.2.…
dependabot[bot] Dec 5, 2024
25aab8a
feat: enhance RedisReplication controller and CRD with additional sta…
drivebyer Dec 10, 2024
a8092ef
fix lint
drivebyer Dec 10, 2024
79febd3
lint
drivebyer Dec 10, 2024
62995c5
Updated LICENSE today
iamabhishek-dubey Dec 10, 2024
2d5e45c
upgrade go
drivebyer Dec 10, 2024
f59817c
add
drivebyer Dec 10, 2024
72d0e99
disable
drivebyer Dec 10, 2024
0a920ea
update
drivebyer Dec 10, 2024
371f057
disable
drivebyer Dec 10, 2024
a6454ab
update
drivebyer Dec 10, 2024
60ef5a2
update
drivebyer Dec 10, 2024
7a037e3
feat: enhance RedisReplication controller and CRD with additional sta…
drivebyer Dec 11, 2024
b0fe42c
chore(deps): bump github.com/onsi/ginkgo/v2 from 2.20.1 to 2.22.0
dependabot[bot] Dec 11, 2024
6832589
chore: update dependabot configuration to change update schedule from…
drivebyer Dec 11, 2024
b726082
chore(deps): bump github.com/onsi/ginkgo/v2 from 2.20.1 to 2.22.0 (#1…
drivebyer Dec 11, 2024
cda99a4
feat: support PDB in redisreplication (#1166)
husnialhamdani Dec 16, 2024
d28caf1
fix: redis-cluster unexpected downscaling (#1167) (#1173)
xiaozhuang-a Dec 16, 2024
2c7022a
feat(sentinel): enhance RedisSentinel reconciliation logic and update…
drivebyer Dec 19, 2024
ea98aa7
feat(cluster): support redis-cluster topologySpreadConstraints(# 868)…
xiaozhuang-a Dec 21, 2024
1db22ae
fix(cluster): reduce the impact of Redis cluster intermediate states …
xiaozhuang-a Dec 21, 2024
c6df0b3
test: enhance Redis controllers' test cases with testdata and validat…
drivebyer Dec 21, 2024
6ee6417
feat(cluster): add event recording functionality for RedisCluster con…
drivebyer Dec 22, 2024
81296c7
feat: use client.Client instead of K8sClient in finalizer. (#1183)
drivebyer Dec 22, 2024
c02c7c9
feat: support topologySpreadConstraints in replication & sentinel (#1…
husnialhamdani Dec 24, 2024
bf1c79f
feat: redis-cluster add podAntiAffinity(#1174 ) (#1180)
xiaozhuang-a Dec 27, 2024
5ccd226
fix: label selector mapping on redisreplication pdb (#1191)
husnialhamdani Dec 27, 2024
7a55f6d
Fix yaml lint
drivebyer Dec 27, 2024
f061869
chore(deps): bump github.com/onsi/gomega from 1.35.1 to 1.36.2 (#1194)
dependabot[bot] Jan 2, 2025
974a108
chore(deps): bump helm/kind-action from 1.5.0 to 1.12.0 (#1197)
dependabot[bot] Jan 2, 2025
888e0ed
feat: separate resources section for leader and follower (#1188)
husnialhamdani Jan 5, 2025
0d4ce9c
feat(cluster): enhance resource management by adding separate resourc…
drivebyer Jan 5, 2025
79d016e
feat: add serviceMonitor.extraLabels support (#1200)
drivebyer Jan 5, 2025
1a5a97f
Update version
drivebyer Jan 12, 2025
e7e6688
feat: add data-assert tool for Redis data management. (#1204)
drivebyer Jan 12, 2025
b00f1df
fix: skip-reconcile annotation still skipping reconcile even the valu…
husnialhamdani Jan 13, 2025
5850e81
feat: check data consistent by external tool. (#1205)
drivebyer Jan 13, 2025
850e121
chore: update crds (#1208)
husnialhamdani Jan 14, 2025
fff5a89
chore: bump redis-operator chart version to 0.19.1
drivebyer Jan 14, 2025
c32cd41
chore: move secret logging to v1 (#1211)
husnialhamdani Jan 15, 2025
bb4ed61
chore: added actions to publish charts to github container registry (…
a1994sc Jan 15, 2025
2979e21
test: enhance testing with data assertion scripts (#1209)
drivebyer Jan 16, 2025
79ea018
feat: add headless service configuration support (#1219)
drivebyer Jan 26, 2025
5f98c43
fix: add missing topologySpreadConstraint on RedisCluster follower (#…
husnialhamdani Jan 26, 2025
546eaf2
feat: update redis-operator cert manager configuration. (#1220)
drivebyer Jan 26, 2025
0ad77e2
chore: dockerfile command style consistency (#1222)
husnialhamdani Feb 1, 2025
8fbb4f7
feat: update certificate serverName to support wildcard certs (#1221)
MuhammadQadora Feb 1, 2025
111583b
feat: add additional service configuration with optional enable flag …
drivebyer Feb 1, 2025
b91f7f9
chore(deps): bump helm/chart-releaser-action from 1.6.0 to 1.7.0 (#1230)
dependabot[bot] Feb 1, 2025
834cbc4
chore(deps): bump helm/chart-testing-action from 2.6.0 to 2.7.0 (#1229)
dependabot[bot] Feb 1, 2025
5690dc0
chore(deps): bump github.com/onsi/ginkgo/v2 from 2.22.1 to 2.22.2 (#1…
dependabot[bot] Feb 1, 2025
2099316
fix: improve pod label patching with error handling and retry mechani…
drivebyer Feb 2, 2025
f7e9204
feat: enhance Redis HA and node scheduling strategy (#1237)
drivebyer Feb 7, 2025
9dbec50
feat: add securityContext config in chart for redis-exporter (#1238)
Hexoplon Feb 11, 2025
4256fd3
fix: make recreate statefulset only trigger when value true (#1240)
husnialhamdani Feb 13, 2025
230bb79
feat: add dynamic Redis configuration support for Redis Cluster (#1241)
drivebyer Feb 18, 2025
6264dae
feat: configurable operator maxConcurrentReconciles (#1242)
husnialhamdani Feb 18, 2025
84745ab
ci: add GitHub workflow for automatic PR rebase (#1243)
drivebyer Feb 18, 2025
9acbd41
Bump operator version
drivebyer Feb 19, 2025
7c91822
refactor: remove v1beta1 API version and migrate to v1beta2 (#1245)
drivebyer Feb 20, 2025
aafc663
feat: sentinel support hostname resolve and annonce (#1247)
mkl262 Feb 28, 2025
0ab5c60
chore(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#…
dependabot[bot] Mar 4, 2025
c34d1ee
chore(deps): bump sigstore/cosign-installer from 3.7.0 to 3.8.1 (#1255)
dependabot[bot] Mar 4, 2025
2677f0d
feat: add redis agent with bootstrap configuration generation (#1254)
drivebyer Mar 4, 2025
8d16e69
feat: Implement comprehensive Redis configuration generation for agen…
drivebyer Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
interval: monthly
31 changes: 31 additions & 0 deletions .github/workflows/auto-rebase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Automatic Rebase

on:
issue_comment:
types: [created]

jobs:
rebase:
name: Rebase
if: >-
github.event.issue.pull_request != '' &&
(
contains(github.event.comment.body, '/rebase') ||
contains(github.event.comment.body, '/autosquash')
)
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout the latest code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
with:
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
258 changes: 258 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master

permissions:
contents: read

env:
GOLANG_VERSION: 1.23.4
APPLICATION_NAME: redis-operator
DockerImagName: docker.io/opstree/redis-operator
BuildDocs: true
AppVersion: "v0.15.2"
DOCKERFILE_PATH: "**/Dockerfile"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
cache: false

- name: Run GolangCI-Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.2

gotest:
needs:
- lint
name: Go Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install integration test dependencies
run: make integration-test-setup
- name: Run Go Tests with coverage
run: go test ./... -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
file: ./coverage.txt
fail_ci_if_error: false
verbose: true

helm_docs_test:
needs: [lint]
name: Helm Docs Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Ensure documentation is updated
uses: docker://jnorwood/helm-docs:latest

- name: Check for changes
run: |
if git diff --exit-code; then
echo -e "\n####### Helm docs are up-to-date! #######\n"
else
git status
echo -e "\n####### Helm docs are not up-to-date! Please run generate helm docs locally and push the changes #######\n"
exit 1
fi

validate_examples:
needs: [gotest, helm_docs_test]
name: Validate Examples
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install yamllint
run: sudo apt-get install -y yamllint

- name: Lint YAML files
run: yamllint --strict ./example

- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: kind

- name: Apply CRD
run: |
for crd in $(find ./config/crd/bases -type f -name '*.yaml'); do
kubectl create -f $crd
done

- name: Validate CRD Installation
run: |
CRDs=("redis" "redissentinels" "redisclusters" "redisreplications")
for crd in "${CRDs[@]}"; do
kubectl get crd $crd.redis.redis.opstreelabs.in || exit 1
done

- name: Validate CR
run: |
for example in $(find ./example -type f -name '*.yaml'); do
kubectl apply --dry-run=server -f $example
done

validate_yaml:
needs: [validate_examples]
name: Validate YAML
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install yamllint
run: sudo apt-get install -y yamllint
- name: Lint YAML files
run: yamllint --strict ./tests/

container_quality_dockerfile_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Execute dockerlinter
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
ignore: DL3007,DL3018

build_go_binary:
needs: [lint]
runs-on: ubuntu-latest
strategy:
matrix:
arch: ["amd64", "arm64"]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go Environment
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Set GOARCH
run: echo "GOARCH=${{ matrix.arch }}" >> $GITHUB_ENV
- name: Build Go Binary
run: go build -o ${{ github.workspace }}/${{ env.APPLICATION_NAME }} cmd/manager/main.go
- name: Archive Binary
run: |
mkdir -p ${{ github.workspace }}/compiled/${{ matrix.arch }}
zip ${{ github.workspace }}/compiled/${{ matrix.arch }}/${{ env.APPLICATION_NAME }}-${{ matrix.arch }}.zip ${{ github.workspace }}/${{ env.APPLICATION_NAME }}

build_scan_container_image:
needs: [container_quality_dockerfile_lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build multi-arch image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/arm64,linux/amd64
push: false
tags: ${{ env.DockerImagName }}:latest

gosec_scan:
needs: [build_go_binary]
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Gosec Scan
uses: securego/gosec@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

GOSEC_OUTPUT: "junit-xml:/github/workspace/gosec-results.xml"

e2e_test:
needs: [validate_yaml]
name: E2E Test
runs-on: ubuntu-latest
strategy:
matrix:
redis-version: ["v7.0.15"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Dockerfile
run: docker build . --file Dockerfile --tag redis-operator:e2e
- name: Install Cosign
uses: sigstore/[email protected]
- name: Install chainsaw
uses: kyverno/[email protected]
with:
verify: true
- name: Check install
run: chainsaw version
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

# - name: Install Redis
# uses: shogo82148/actions-setup-redis@v1

- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
config: tests/_config/kind-config.yaml
cluster_name: kind

- name: Load Docker image into Kind
run: |
kubectl cluster-info --context kind-kind
kind load docker-image redis-operator:e2e --name kind

- name: Install Redis Operator
run: |
make deploy IMG=redis-operator:e2e

- name: Wait for Redis Operator to be ready
run: |
kubectl wait --for=condition=available --timeout=300s deployment/redis-operator-redis-operator -n redis-operator-system

- name: Replace Redis Image Version
run: |
find ./tests/e2e-chainsaw/v1beta2/ -type f -exec sed -i 's/quay.io\/opstree\/redis:latest/quay.io\/opstree\/redis:${{ matrix.redis-version }}/g' {} \;
find ./tests/e2e-chainsaw/v1beta2/ -type f -exec sed -i 's/quay.io\/opstree\/redis-sentinel:latest/quay.io\/opstree\/redis-sentinel:${{ matrix.redis-version }}/g' {} \;

- name: Run chainsaw test
run: chainsaw test --test-dir ./tests/e2e-chainsaw/v1beta2/ --config tests/_config/chainsaw-configuration.yaml
87 changes: 0 additions & 87 deletions .github/workflows/e2e-chainsaw.yml

This file was deleted.

Loading