-
Notifications
You must be signed in to change notification settings - Fork 123
CSPL-3768 Adding inputs to Graviton pipelines and tests #1521
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
Merged
kasiakoziol
merged 7 commits into
develop
from
CSPL-3768-graviton-pipelines-enhancements
Jun 13, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
57efee2
CSPL-3768 Adding inputs to Graviton pipelines and tests
kasiakoziol 176200f
CSPL-3768 Not disclosing ECR secret value
kasiakoziol 6a0c075
CSPL-3678 Introducing pipeline for Graviton and some fixes
kasiakoziol ae25c18
CSPL-3768 Fixes
kasiakoziol f6ff895
CSPL-3768 Fixes
kasiakoziol 8311e53
CSPL-3768 Addressing Copilot suggestions
kasiakoziol 68a9221
CSPL-3768 Addressing comments
kasiakoziol 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 hidden or 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 hidden or 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
205 changes: 205 additions & 0 deletions
205
.github/workflows/arm-RHEL-build-test-push-workflow.yml
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,205 @@ | ||
name: ARM RHEL Integration Test WorkFlow | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
pull-requests: write | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
splunk_image_repository_tag: | ||
description: 'Splunk RHEL-based Docker Image repository and tag (e.g. repository-name:tag)' | ||
required: true | ||
jobs: | ||
build-operator-image-arm-rhel: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 360 | ||
env: | ||
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.ECR_PREFIX }}/${{ github.event.inputs.splunk_image_repository_tag }} | ||
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator | ||
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }} | ||
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Dotenv Action | ||
id: dotenv | ||
uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ steps.dotenv.outputs.GO_VERSION }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2.5.0 | ||
- name: Install Operator SDK | ||
run: | | ||
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac) | ||
export OS=$(uname | awk '{print tolower($0)}') | ||
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }} | ||
sudo curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH} | ||
sudo chmod +x operator-sdk_${OS}_${ARCH} | ||
sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Build and push Splunk Operator Image | ||
run: | | ||
export PLATFORMS=linux/arm64,linux/amd64 | ||
export BASE_IMAGE=redhat/ubi9-minimal | ||
export BASE_IMAGE_VERSION=9.5 | ||
export IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA | ||
make docker-buildx PLATFORMS=$PLATFORMS BASE_IMAGE=$BASE_IMAGE BASE_IMAGE_VERSION=$BASE_IMAGE_VERSION IMG=$IMG | ||
int-tests-arm-rhel: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
[ | ||
appframeworksS1, | ||
managersecret, | ||
managersmartstore, | ||
managermc1, | ||
managermc2, | ||
managercrcrud, | ||
licensemanager, | ||
managerdeletecr, | ||
] | ||
runs-on: ubuntu-latest | ||
needs: build-operator-image-arm-rhel | ||
env: | ||
CLUSTER_NODES: 1 | ||
CLUSTER_WORKERS: 3 | ||
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.ECR_PREFIX }}/${{ github.event.inputs.splunk_image_repository_tag }} | ||
SPLUNK_ENTERPRISE_RELEASE_IMAGE: ${{ secrets.ECR_PREFIX }}/${{ github.event.inputs.splunk_image_repository_tag }} | ||
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator | ||
SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator | ||
TEST_FOCUS: "${{ matrix.test }}" | ||
# This regex matches any string not containing integration keyword | ||
TEST_TO_SKIP: "^(?:[^i]+|i(?:$|[^n]|n(?:$|[^t]|t(?:$|[^e]|e(?:$|[^g]|g(?:$|[^r]|r(?:$|[^a]|a(?:$|[^t]|t(?:$|[^i]|i(?:$|[^o]|o(?:$|[^n])))))))))))*$" | ||
TEST_CLUSTER_PLATFORM: eks | ||
EKS_VPC_PRIVATE_SUBNET_STRING: ${{ secrets.EKS_VPC_PRIVATE_SUBNET_STRING }} | ||
EKS_VPC_PUBLIC_SUBNET_STRING: ${{ secrets.EKS_VPC_PUBLIC_SUBNET_STRING }} | ||
TEST_BUCKET: ${{ secrets.TEST_BUCKET }} | ||
TEST_INDEXES_S3_BUCKET: ${{ secrets.TEST_INDEXES_S3_BUCKET }} | ||
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }} | ||
PRIVATE_REGISTRY: ${{ secrets.ECR_REPOSITORY }} | ||
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
ENTERPRISE_LICENSE_LOCATION: ${{ secrets.ENTERPRISE_LICENSE_LOCATION }} | ||
CLUSTER_WIDE: "true" | ||
DEPLOYMENT_TYPE: "" | ||
ARM64: "true" | ||
GRAVITON_TESTING: "true" | ||
steps: | ||
- name: Set Test Cluster Name | ||
run: | | ||
echo "TEST_CLUSTER_NAME=eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID" >> $GITHUB_ENV | ||
- name: Set Test Cluster Nodes and Parallel Runs | ||
run: >- | ||
if grep -q "appframework" <<< "${{ matrix.test }}"; then | ||
echo "CLUSTER_WORKERS=5" >> $GITHUB_ENV | ||
echo "CLUSTER_NODES=2" >> $GITHUB_ENV | ||
fi | ||
- name: Checkcout code | ||
uses: actions/checkout@v2 | ||
- name: Dotenv Action | ||
id: dotenv | ||
uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 | ||
- name: Change splunk enterprise to release image on main branches | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
echo "SPLUNK_ENTERPRISE_IMAGE=${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_RELEASE_IMAGE }}" >> $GITHUB_ENV | ||
- name: Install Kubectl | ||
uses: Azure/setup-kubectl@v3 | ||
with: | ||
version: ${{ steps.dotenv.outputs.KUBECTL_VERSION }} | ||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
- name: Install AWS CLI | ||
run: | | ||
curl "${{ steps.dotenv.outputs.AWSCLI_URL}}" -o "awscliv2.zip" | ||
unzip awscliv2.zip | ||
sudo ./aws/install --update | ||
aws --version | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ steps.dotenv.outputs.GO_VERSION }} | ||
- name: Install Ginkgo | ||
run: | | ||
make setup/ginkgo | ||
- name: Install Helm | ||
run: | | ||
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | ||
chmod 700 get_helm.sh | ||
./get_helm.sh | ||
DESIRED_VERSION=v3.8.2 bash get_helm.sh | ||
- name: Install EKS CTL | ||
run: | | ||
curl --silent --insecure --location "https://github.com/weaveworks/eksctl/releases/download/${{ steps.dotenv.outputs.EKSCTL_VERSION }}/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp | ||
sudo mv /tmp/eksctl /usr/local/bin | ||
eksctl version | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2.5.0 | ||
- name: Configure Docker Hub credentials | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN}} | ||
- name: Set Splunk Operator image | ||
run: | | ||
echo "SPLUNK_OPERATOR_IMAGE=${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA" >> $GITHUB_ENV | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Pull Splunk Enterprise Image | ||
run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} | ||
- name: Create EKS cluster | ||
run: | | ||
export EKS_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }} | ||
export EKS_INSTANCE_TYPE=${{ steps.dotenv.outputs.EKS_INSTANCE_TYPE_ARM64 }} | ||
make cluster-up | ||
- name: install metric server | ||
run: | | ||
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml | ||
- name: install k8s dashboard | ||
run: | | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.5/aio/deploy/recommended.yaml | ||
- name: Setup Kustomize | ||
run: | | ||
sudo snap install kustomize | ||
mkdir -p ./bin | ||
cp /snap/bin/kustomize ./bin/kustomize | ||
- name: Run Integration test | ||
run: | | ||
make int-test | ||
- name: Collect Test Logs | ||
if: ${{ always() }} | ||
run: | | ||
mkdir -p /tmp/pod_logs | ||
find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; | ||
- name: Archive Pod Logs | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4.4.0 | ||
with: | ||
name: "splunk-pods-logs--artifacts-${{ matrix.test }}" | ||
path: "/tmp/pod_logs/**" | ||
- name: Cleanup Test Case artifacts | ||
if: ${{ always() }} | ||
run: | | ||
make cleanup | ||
make clean | ||
- name: Cleanup up EKS cluster | ||
if: ${{ always() }} | ||
run: | | ||
make cluster-down | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.