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

[Draft]: CSPL-2600: Integrate HashiCorp Vault Support in Splunk Operator #1388

Open
wants to merge 161 commits into
base: CSPL-2601
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
1a61128
adding logic to support vault
Oct 15, 2024
b70767a
Merge branch 'cspl-2601' into cspl-2600
Oct 15, 2024
c887b65
unit test
Oct 15, 2024
fe4d40c
adding secret monitor sidecar
Oct 17, 2024
e83b4a2
adding vault access code base
Oct 18, 2024
ad992f7
adding api changes
Oct 18, 2024
c905358
some doc changes
Oct 18, 2024
db0f05a
working code for standalone
Oct 18, 2024
42eef6a
Change eks version to 1.31
akondur Oct 21, 2024
b9b97de
working c3 changes
Oct 22, 2024
2a3e40c
Merge pull request #1391 from splunk/CSPL_2887
akondur Oct 23, 2024
eb2d5fc
get token from vault
Oct 24, 2024
1ae6f15
Use docker-buildx and make smoke tests run
akondur Oct 24, 2024
52ce30c
Add a '.'
akondur Oct 24, 2024
05400a3
Test again
akondur Oct 24, 2024
f6bef93
Change env variable value
akondur Oct 24, 2024
d2b7971
added vault secret validation
Oct 25, 2024
418976a
go lib changes
Oct 25, 2024
f2fc5f8
Trigger int testing
akondur Oct 25, 2024
2b0ae6f
Update K8s version, eksctl version
akondur Oct 25, 2024
e6979ec
Change def storage class
akondur Oct 25, 2024
e86436e
Remove Makefile change
akondur Oct 25, 2024
0c8cbed
Merge branch 'develop' into CSPL_2887
akondur Oct 25, 2024
68e49c4
Minimize changes only to smoke tests to start with
akondur Oct 25, 2024
b3eb55f
Initial changes for graviton smoke tests
akondur Oct 25, 2024
d6ccab9
Merge pull request #1394 from splunk/CSPL_2887
akondur Oct 26, 2024
b3f836d
Merge branch 'develop' into CSPL_2920
akondur Oct 28, 2024
dfd0876
Try this
akondur Oct 28, 2024
f7a2648
Add the argument again
akondur Oct 28, 2024
3f745cf
Try passing build arguments
akondur Oct 28, 2024
3d9e4e7
Add a default value
akondur Oct 28, 2024
36ac76c
Hardcode
akondur Oct 28, 2024
34379dc
Change tag
akondur Oct 28, 2024
40d8f66
Pull locally
akondur Oct 28, 2024
a391b10
Don't push for graviton
akondur Oct 29, 2024
bc3e661
Display operator image
akondur Oct 31, 2024
12531e7
Change eks instance type
akondur Oct 31, 2024
3e7345f
Dump version
akondur Oct 31, 2024
a3c1908
Describe
akondur Oct 31, 2024
9be9090
Don't need to tag for graviton
akondur Nov 1, 2024
6aafeb7
Re-run change kust
akondur Nov 1, 2024
ec29b76
Avoid describe
akondur Nov 1, 2024
dd88888
Enable everything and try again
akondur Nov 4, 2024
456d86a
Remove push-latest, re-run pipelines
akondur Nov 4, 2024
a18b2e7
Re-run tests
akondur Nov 6, 2024
789e478
Enable int tests
akondur Nov 6, 2024
45ea9da
Update error logs
akondur Nov 6, 2024
a5d7225
Further enhance
akondur Nov 6, 2024
1555d21
Don't use platform in FROM in dockerfile, remove TARGETOSIMAGE, ignor…
akondur Nov 7, 2024
8d9dfdb
Trigger int and smoke as well
akondur Nov 7, 2024
133bec4
Pull image fix - int tests
akondur Nov 7, 2024
11d1d3f
Set graviton to true int tests
akondur Nov 7, 2024
879ed33
Re-trigger
akondur Nov 8, 2024
991d80e
Trigger
akondur Nov 8, 2024
f2de239
Re-trigger
akondur Nov 8, 2024
945e149
Disable int tests for now.
akondur Nov 12, 2024
aa6ec96
Avoid vul testing for graviton for now
akondur Nov 12, 2024
d2d124c
Add support for Ubuntu
akondur Nov 14, 2024
b570cc7
Pass as build arg
akondur Nov 14, 2024
87fd60c
Echo BASE_OS
akondur Nov 14, 2024
ce39f0c
Use sha instead of label for docker build
rlieberman-splunk Nov 14, 2024
e56a203
Address review comments
akondur Nov 14, 2024
6c9b789
Fix docker builds
akondur Nov 15, 2024
33f3aba
Change logic for Ubuntu
akondur Nov 15, 2024
4ba29e4
Test package version
akondur Nov 15, 2024
2c61852
Run without package versions
akondur Nov 15, 2024
458b751
Fix unattended-upgrades
akondur Nov 15, 2024
7be7f2c
Avoid upgrade path during enterprise deployments creation.
akondur Nov 15, 2024
5837b68
Trigger int tests
akondur Nov 15, 2024
5187f08
Build for amd64 as well for pipelines
akondur Nov 15, 2024
c49e711
add comment for ubi tag version
rlieberman-splunk Nov 15, 2024
97c5bec
Remove space
akondur Nov 15, 2024
568290b
Change to AS
akondur Nov 15, 2024
6ea3964
Create a new folder for helm SVA testing only
akondur Nov 15, 2024
d6406be
Introduce corresponding kuttl yaml
akondur Nov 15, 2024
2850e3f
Run only managermc
akondur Nov 15, 2024
7127f60
Clean Up AWS Resources After Cluster Deletion (#1396)
vivekr-splunk Nov 18, 2024
08d2022
Merge branch 'develop' into CSPL_3085
rlieberman-splunk Nov 18, 2024
5983f25
Fix typo
akondur Nov 18, 2024
f27e9e0
Merge branch 'develop' into CSPL_3063_helm_sva
akondur Nov 18, 2024
524d5e6
Merge branch 'develop' into CSPL_2920
akondur Nov 19, 2024
a888197
Trigger for 9.2.4 AL2023 ARM
akondur Nov 19, 2024
31fa22f
Merge branch 'CSPL_2920' of github.com:splunk/splunk-operator into CS…
akondur Nov 19, 2024
0bfe4f9
Merge branch 'develop' into CSPL_3060
akondur Nov 19, 2024
89c4da4
Merge pull request #1400 from splunk/CSPL_3063_helm_sva
akondur Nov 19, 2024
8ab8c1a
Merge branch 'develop' into CSPL_2920
akondur Nov 19, 2024
cfd03c6
Merge branch 'develop' into CSPL_3085
rlieberman-splunk Nov 19, 2024
b85e3fb
Comment out one TC.
akondur Nov 19, 2024
ee7df2d
Merge branch 'CSPL_3060' of github.com:splunk/splunk-operator into CS…
akondur Nov 19, 2024
d94fb72
Merge branch 'develop' into CSPL_3060
akondur Nov 19, 2024
81e7502
Try installing certificates on SOK container
akondur Nov 19, 2024
354eefe
Trigger both arm and ubuntu. Add cert for ubuntu
akondur Nov 19, 2024
8fa1d83
remove xcontext
akondur Nov 19, 2024
213b9a4
Merge pull request #1398 from splunk/CSPL_3085
akondur Nov 19, 2024
e2e9541
Remove from int test workflow
akondur Nov 19, 2024
631624b
Remove from int test workflow
akondur Nov 19, 2024
801d2d6
Merge branch 'develop' into CSPL_3060
akondur Nov 19, 2024
0bab91f
Merge branch 'develop' into CSPL_2920
akondur Nov 19, 2024
44207b2
Merge pull request #1399 from splunk/CSPL_3060
akondur Nov 19, 2024
6685ec5
Merge branch 'develop' into CSPL_2920
akondur Nov 20, 2024
977bd78
Address openshift documentation
akondur Nov 20, 2024
da70078
Use block
akondur Nov 20, 2024
02c0cf3
Merge pull request #1403 from splunk/CSPL_3149
akondur Nov 20, 2024
07714c7
[CSPL-2699]: adding Azure and GCP bucket access using sdk (#1340)
vivekr-splunk Nov 21, 2024
ab2acb4
[create-pull-request] automated change
akondur Nov 21, 2024
17a7bc2
Further changes
akondur Nov 21, 2024
77dbf34
Merge pull request #1406 from splunk/release/2.7.0
akondur Nov 22, 2024
da1f11a
Merge branch 'develop' into CSPL_2920
akondur Nov 22, 2024
09ea427
Run helm and integration
akondur Nov 22, 2024
4592318
Split managermc into two different matrix entries, increase suite tim…
akondur Nov 22, 2024
7323d73
Remove helm and trigger
akondur Nov 23, 2024
002c406
Try commenting SHC ready. Manually works fine.
akondur Nov 24, 2024
9a03aca
Try removing gcp test cases from int test workflow
akondur Nov 25, 2024
4a05ace
Try removing tag for gcp test cases
akondur Nov 26, 2024
44e54e0
Trigger workflows for 9.2.4 AL2023 ARM64
akondur Nov 26, 2024
a88493c
Remove appframeworks1 from gcp
akondur Nov 26, 2024
1ec5019
removed trailing / if exist in url
Nov 26, 2024
a12be5d
Change tag from appframeworks1 to appframeworksS1
akondur Nov 27, 2024
f5ec107
Merge branch 'promote-develop-to-main-2.7.0' of github.com:splunk/spl…
akondur Nov 27, 2024
fccb635
Remove from int tests workflow
akondur Dec 3, 2024
d1f1fac
Merge pull request #1409 from splunk/promote-develop-to-main-2.7.0
akondur Dec 3, 2024
35f3e15
Merge branch 'develop' into CSPL_2920
akondur Dec 3, 2024
2a07a31
trigger AL2023 build for splunk 9.2.4
rlieberman-splunk Dec 4, 2024
a625571
trigger AL2023 build for splunk 9.3.2
rlieberman-splunk Dec 4, 2024
a02f50d
trigger Ubuntu build for splunk 9.2.4
rlieberman-splunk Dec 4, 2024
98df5dd
trigger Ubuntu build for splunk 9.3.2
rlieberman-splunk Dec 4, 2024
6270cdd
trigger AL2023 build for splunk 9.2.4
rlieberman-splunk Dec 5, 2024
7d7e2f2
Merge pull request #1408 from splunk/promote-develop-to-main-2.7.0
rlieberman-splunk Dec 5, 2024
0e066ac
Merge pull request #1414 from splunk/main
rlieberman-splunk Dec 6, 2024
012d5c1
Merge branch 'develop' into CSPL_2920
akondur Dec 9, 2024
8d4568b
use new label to test app framework tests that hang during teardown
rlieberman-splunk Dec 10, 2024
fc95d7c
use shorter label for testing tag
rlieberman-splunk Dec 10, 2024
3a78dfa
trigger integration test for PR
rlieberman-splunk Dec 10, 2024
f70f23d
trigger rebuild of sok images for arm64 architectures
rlieberman-splunk Dec 11, 2024
223a957
trigger rebuild for sok container on linux arm64
rlieberman-splunk Dec 11, 2024
501dea2
remove build and test workflow for now
rlieberman-splunk Dec 11, 2024
44a01d4
trigger rebuild for sok container on ubuntu arm64
rlieberman-splunk Dec 11, 2024
2bee1d0
separate suite tag for failing test
rlieberman-splunk Dec 11, 2024
68cf212
get correct standalone for readiness checks
rlieberman-splunk Dec 12, 2024
b116765
get correct standalone for readiness checks
rlieberman-splunk Dec 12, 2024
2d1f4a0
add sleep for managermc1 failing test case
rlieberman-splunk Dec 12, 2024
f620d4b
dump splunk version during consistently check for search head cluster
rlieberman-splunk Dec 13, 2024
4b50e13
clean up new workflows
rlieberman-splunk Dec 13, 2024
ddbb6b1
merge integration test fixes branch
rlieberman-splunk Dec 13, 2024
85acc39
merge commit for pulling splunk enterprise image
akondur Dec 9, 2024
5749ef8
re-enable test case, correct merge conflict
rlieberman-splunk Dec 13, 2024
22fba1a
feat: [CSPL-3253]: Change default storageClassName value in PVC
Dec 16, 2024
261d84c
add back feature branch for integration test workflow trigger
rlieberman-splunk Dec 17, 2024
5fa3bd2
Merge pull request #1393 from splunk/CSPL_2920
rlieberman-splunk Dec 18, 2024
21b12b2
Merge branch 'develop' into feature/CSPL-3253
akondur Dec 18, 2024
e819012
Remove change splunk operator name step in integration test workflow
rlieberman-splunk Dec 18, 2024
713d14e
Trigger int testing again
akondur Dec 19, 2024
9b3a1f3
remove specific branch to run integration tests
rlieberman-splunk Dec 19, 2024
1696ce3
Merge pull request #1420 from splunk/feature/CSPL_3298
rlieberman-splunk Dec 19, 2024
987c4cf
Merge branch 'develop' into feature/CSPL-3253
patrykw-splunk Dec 20, 2024
8306aea
Merge pull request #1417 from splunk/feature/CSPL-3253
akondur Dec 20, 2024
6b4d759
adding vault merge from develop
Jan 10, 2025
6f1a8b8
adding vault doc changes
Jan 10, 2025
8541465
adding vault doc changes
Jan 10, 2025
f2de2d9
adding vault doc changes
Jan 10, 2025
a04c222
adding vault go modules
Jan 11, 2025
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
8 changes: 5 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ GO_VERSION=1.23.0
AWSCLI_URL=https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.8.6.zip
KUBECTL_VERSION=v1.29.1
AZ_CLI_VERSION=2.30.0
EKSCTL_VERSION=v0.143.0
EKS_CLUSTER_K8_VERSION=1.27
SPLUNK_ENTERPRISE_RELEASE_IMAGE=splunk/splunk:9.3.0
EKSCTL_VERSION=v0.191.0
EKS_CLUSTER_K8_VERSION=1.31
EKS_INSTANCE_TYPE=m5.2xlarge
EKS_INSTANCE_TYPE_ARM64=c6g.4xlarge
SPLUNK_ENTERPRISE_RELEASE_IMAGE=splunk/splunk:9.3.2
303 changes: 303 additions & 0 deletions .github/workflows/arm-AL2023-build-test-push-workflow-AL2023.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
name: Arm AL2023 Smoke Test WorkFlow
on:
push:
branches:
- develop
- main
jobs:
check-formating:
runs-on: ubuntu-latest
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: Check Source formatting
run: make fmt && if [[ $? -ne 0 ]]; then false; fi
- name: Lint source code
run: make vet && if [[ $? -ne 0 ]]; then false; fi
unit-tests:
runs-on: ubuntu-latest
needs: check-formating
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: Install goveralls
run: |
go version
go install github.com/mattn/goveralls@latest
- name: Install Ginkgo
run: |
make setup/ginkgo
go mod tidy
- name: Run Unit Tests
run: make test
- name: Run Code Coverage
run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }}
- name: Upload Coverage artifacts
uses: actions/[email protected]
with:
name: coverage.out
path: coverage.out
build-operator-image-arm-al2023:
runs-on: ubuntu-latest
needs: unit-tests
env:
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }}
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
steps:
- name: Set up cosign
uses: sigstore/cosign-installer@main

- 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: Install Ginkgo
run: |
make setup/ginkgo
- name: Set up Docker Buildx
uses: docker/[email protected]
- 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=public.ecr.aws/amazonlinux/amazonlinux
export BASE_IMAGE_VERSION=2023
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
- name: Sign Splunk Operator image with a key
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
env:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
vulnerability-scan:
permissions:
actions: read
contents: read
security-events: write
runs-on: ubuntu-latest
needs: build-operator-image-arm-al2023
env:
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }}
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
IMAGE_NAME: ${{ secrets.ECR_REPOSITORY }}/splunk/splunk-operator:${{ github.sha }}
steps:
- name: Set up cosign
uses: sigstore/cosign-installer@main
- uses: actions/checkout@v2
- name: Dotenv Action
id: dotenv
uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
- name: Set up Docker Buildx
uses: docker/[email protected]
- 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
uses: aws-actions/amazon-ecr-login@v1
- name: Pull Splunk Operator Image Locally
run: |
docker pull ${{ env.IMAGE_NAME }}
- name: Verify Signed Splunk Operator image
run: |
cosign verify --key env://COSIGN_PUBLIC_KEY ${{ env.IMAGE_NAME }}
env:
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ env.IMAGE_NAME }}'
format: sarif
#exit-code: 1
severity: 'CRITICAL'
ignore-unfixed: true
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
smoke-tests-arm-al2023:
needs: vulnerability-scan
strategy:
fail-fast: false
matrix:
test: [
basic,
appframeworksS1,
managerappframeworkc3,
managerappframeworkm4,
managersecret,
managermc,
]
runs-on: ubuntu-latest
env:
CLUSTER_NODES: 1
CLUSTER_WORKERS: 3
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE_ARM64 }}
SPLUNK_ENTERPRISE_RELEASE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE_ARM64 }}
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator
TEST_FOCUS: "${{ matrix.test }}"
# This regex matches any string not containing smoke keyword
TEST_TO_SKIP: "^(?:[^s]+|s(?:$|[^m]|m(?:$|[^o]|o(?:$|[^k]|k(?:$|[^e])))))*$"
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 }}
EKS_SSH_PUBLIC_KEY: ${{ secrets.EKS_SSH_PUBLIC_KEY }}
CLUSTER_WIDE: "true"
DEPLOYMENT_TYPE: ""
ARM64: "true"
steps:
- name: Set Test Cluster Name
run: |
echo "TEST_CLUSTER_NAME=eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID" >> $GITHUB_ENV
- name: Chekcout 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/[email protected]
- name: Install Operator SDK
run: |
sudo curl -L -o /usr/local/bin/operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }}/operator-sdk-${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }}-x86_64-linux-gnu
sudo chmod +x /usr/local/bin/operator-sdk
- 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 smoke test
id: smoketest
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/[email protected]
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
Loading
Loading