Skip to content
Merged
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
40 changes: 20 additions & 20 deletions .github/workflows/chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ name: Chart Test
on:
pull_request:
branches:
- '*'
- "*"
paths:
- 'charts/**'
- '.github/workflows/chart-test.yml'
- "charts/**"
- ".github/workflows/chart-test.yml"

env:
GOPRIVATE: github.com/streamnative
Expand All @@ -37,7 +37,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check if the CRDs are update to date
run: |
diff config/crd/bases/resource.streamnative.io_pulsarconnections.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarconnections.yaml && \
Expand All @@ -63,14 +63,14 @@ jobs:

- name: Install plugin unittest
run: |
helm plugin install https://github.com/quintush/helm-unittest
helm plugin install https://github.com/helm-unittest/helm-unittest

# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
Expand Down Expand Up @@ -158,23 +158,23 @@ jobs:
run: |
echo "Waiting for pods to be ready..."
kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s

echo "Checking pod status..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
echo "Some pods are not running:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "Checking for pod restarts..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
echo "Some pods have restarted:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "All pods are running properly!"
kubectl get pods -n chart-testing

Expand Down Expand Up @@ -237,31 +237,31 @@ jobs:
run: |
echo "Waiting for pods to be ready..."
kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s

echo "Checking pod status..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
echo "Some pods are not running:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "Checking for pod restarts..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
echo "Some pods have restarted:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "All pods are running properly!"
kubectl get pods -n chart-testing

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()

install-on-v1-28:
runs-on: ubuntu-22.04
needs: lint-test
Expand Down Expand Up @@ -316,23 +316,23 @@ jobs:
run: |
echo "Waiting for pods to be ready..."
kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s

echo "Checking pod status..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
echo "Some pods are not running:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "Checking for pod restarts..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
echo "Some pods have restarted:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "All pods are running properly!"
kubectl get pods -n chart-testing

Expand Down Expand Up @@ -395,27 +395,27 @@ jobs:
run: |
echo "Waiting for pods to be ready..."
kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s

echo "Checking pod status..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
echo "Some pods are not running:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "Checking for pod restarts..."
if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
echo "Some pods have restarted:"
kubectl get pods -n chart-testing
kubectl describe pods -n chart-testing
exit 1
fi

echo "All pods are running properly!"
kubectl get pods -n chart-testing

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()
if: failure()
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ spec:
For confidential clients, this would be the client secret.
For public clients using JWT authentication, this would be the path to the JSON credentials file.
properties:
file:
description: |-
File points to a local file path whose contents will be used as the value.
This is useful when running the operator locally without creating Kubernetes secrets.
type: string
secretRef:
description: SecretKeyRef indicates a secret name and
key
Expand Down Expand Up @@ -187,6 +192,11 @@ spec:
This can be either a direct token value or a reference to a secret containing the token.
If using a secret, the token should be stored under the specified key in the secret.
properties:
file:
description: |-
File points to a local file path whose contents will be used as the value.
This is useful when running the operator locally without creating Kubernetes secrets.
type: string
secretRef:
description: SecretKeyRef indicates a secret name and key
properties:
Expand Down