-
Notifications
You must be signed in to change notification settings - Fork 6
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
update GO and operator versions #18
Merged
almoggue
merged 2 commits into
main
from
almog-update-go-and-opeartor-versions-RED-113638
Jan 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
name: CI | ||
|
||
on: [push] | ||
on: | ||
- push | ||
- workflow_dispatch | ||
|
||
env: | ||
GO_VERSION: "1.16" | ||
GO_VERSION: "1.21.5" | ||
|
||
jobs: | ||
build: | ||
|
@@ -32,14 +34,14 @@ jobs: | |
uses: engineerd/[email protected] | ||
with: | ||
config: bootstrap/kind-config.yml | ||
version: v0.11.1 | ||
version: v0.18.0 | ||
|
||
- name: Test Kubernetes | ||
run: kubectl cluster-info | ||
|
||
- name: Install Redis Enterprise operator | ||
run: | | ||
curl --silent --fail https://raw.githubusercontent.com/RedisLabs/redis-enterprise-k8s-docs/v6.0.20-12/bundle.yaml | kubectl apply -f - | ||
curl --silent --fail https://raw.githubusercontent.com/RedisLabs/redis-enterprise-k8s-docs/v7.2.4-12/bundle.yaml | kubectl apply -f - | ||
kubectl rollout status deployment/redis-enterprise-operator --watch --timeout=5m || kubectl describe pod -lname=redis-enterprise-operator | ||
|
||
- name: Install cluster | ||
|
@@ -70,32 +72,6 @@ jobs: | |
sleep 5; | ||
kubectl get redisenterpriseclusters.app.redislabs.com test-cluster --output jsonpath='{.status}{"\n"}' | ||
|
||
- name: Install database | ||
timeout-minutes: 5 | ||
run: | | ||
cat <<EOF | | ||
apiVersion: app.redislabs.com/v1alpha1 | ||
kind: RedisEnterpriseDatabase | ||
metadata: | ||
name: mydb | ||
spec: | ||
memory: 100MB | ||
redisEnterpriseCluster: | ||
name: test-cluster | ||
rolesPermissions: | ||
- type: redis-enterprise | ||
role: "DB Member" | ||
acl: "Not Dangerous" | ||
EOF | ||
kubectl apply -f - | ||
while [[ "$(kubectl get redisenterprisedatabase.app.redislabs.com mydb --output jsonpath='{.status.status}')" != "active" ]]; do | ||
echo "waiting for the database to be running" | ||
kubectl get redisenterprisedatabase.app.redislabs.com mydb --output jsonpath='{.status}{"\n"}' | ||
sleep 5; | ||
done | ||
echo "waiting loop has finished." | ||
sleep 5; | ||
kubectl get redisenterprisedatabase.app.redislabs.com mydb --output jsonpath='{.status}{"\n"}' | ||
|
||
- name: Install a service to expose the Redis cluster on a port | ||
run: | | ||
|
@@ -130,6 +106,55 @@ jobs: | |
- name: Set URL | ||
run: echo "TEST_DB_URL=https://localhost:$(kubectl get svc external-access --output jsonpath='{.spec.ports[].nodePort}')" >> $GITHUB_ENV | ||
|
||
- name: Create role | ||
timeout-minutes: 5 | ||
run: | | ||
curl --insecure "${TEST_DB_URL}/v1/roles" \ | ||
--header "Content-Type: application/json" \ | ||
-u "${TEST_USERNAME}:${TEST_PASSWORD}" \ | ||
--data "{ | ||
\"name\": \"DB Member\", | ||
\"management\": \"db_member\" | ||
}" | ||
|
||
- name: Create ACL | ||
timeout-minutes: 5 | ||
run: | | ||
curl --insecure "${TEST_DB_URL}/v1/redis_acls" \ | ||
--header "Content-Type: application/json" \ | ||
-u "${TEST_USERNAME}:${TEST_PASSWORD}" \ | ||
--data "{ | ||
\"name\": \"Not Dangerous\", | ||
\"acl\": \"+@all -@dangerous ~*\" | ||
}" | ||
|
||
- name: Install database | ||
timeout-minutes: 5 | ||
run: | | ||
cat <<EOF | | ||
apiVersion: app.redislabs.com/v1alpha1 | ||
kind: RedisEnterpriseDatabase | ||
metadata: | ||
name: mydb | ||
spec: | ||
memorySize: 100MB | ||
redisEnterpriseCluster: | ||
name: test-cluster | ||
rolesPermissions: | ||
- type: redis-enterprise | ||
role: "DB Member" | ||
acl: "Not Dangerous" | ||
EOF | ||
kubectl apply -f - | ||
while [[ "$(kubectl get redisenterprisedatabase.app.redislabs.com mydb --output jsonpath='{.status.status}')" != "active" ]]; do | ||
echo "waiting for the database to be running" | ||
kubectl get redisenterprisedatabase.app.redislabs.com mydb --output jsonpath='{.status}{"\n"}' | ||
sleep 5; | ||
done | ||
echo "waiting loop has finished." | ||
sleep 5; | ||
kubectl get redisenterprisedatabase.app.redislabs.com mydb --output jsonpath='{.status}{"\n"}' | ||
|
||
# This check is ensure that the cluster is running and accessible so the CI fails fast, | ||
# rather than waiting several minutes for all of the Go tests to eventually time out | ||
- name: Check cluster access | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ kind: RedisEnterpriseDatabase | |
metadata: | ||
name: mydb | ||
spec: | ||
memory: 100MB | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. preserveUnknownFields: false |
||
memorySize: 100MB | ||
rolesPermissions: | ||
- type: redis-enterprise | ||
role: "DB Member" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ kind: RedisEnterpriseDatabase | |
metadata: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to be allied please consider adding the label to the REDB metadata here: |
||
name: mydb | ||
spec: | ||
memory: 100MB | ||
memorySize: 100MB | ||
rolesPermissions: | ||
- type: redis-enterprise | ||
role: "DB Member" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here:
to be allied please consider adding the label to the REDB metadata here:
labels:
app: redis-enterprise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added