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

Promote Develop to main for Splunk Operator Release 2.7.0 #1408

Merged
merged 59 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8280f03
Add PDB documentation
akondur Aug 23, 2024
c0ec26a
Merge pull request #1383 from splunk/main
akondur Oct 1, 2024
f3fb07d
Addresses PR#1372
akondur Oct 2, 2024
f9d1b6a
Merge branch 'develop' into CSPL_2756
akondur Oct 2, 2024
cc4fa4c
Change log
akondur Oct 9, 2024
e1718cd
Change log
akondur Oct 9, 2024
8393b3c
Merge pull request #1370 from splunk/CSPL_2756
akondur Oct 9, 2024
da71f09
Merge branch 'develop' into CSPL_2823
akondur Oct 9, 2024
1b1a385
Merge pull request #1385 from splunk/CSPL_2823
akondur Oct 10, 2024
f7b7e97
GITHUB-1124: Add Support for Configuring Custom Cluster Domain in Hel…
vivekr-splunk Oct 11, 2024
42eef6a
Change eks version to 1.31
akondur Oct 21, 2024
2a3e40c
Merge pull request #1391 from splunk/CSPL_2887
akondur Oct 23, 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
d6ccab9
Merge pull request #1394 from splunk/CSPL_2887
akondur Oct 26, 2024
ce39f0c
Use sha instead of label for docker build
rlieberman-splunk Nov 14, 2024
7be7f2c
Avoid upgrade path during enterprise deployments creation.
akondur Nov 15, 2024
5837b68
Trigger int tests
akondur Nov 15, 2024
c49e711
add comment for ubi tag version
rlieberman-splunk 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
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
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
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
44207b2
Merge pull request #1399 from splunk/CSPL_3060
akondur Nov 19, 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
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
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
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
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ 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
SPLUNK_ENTERPRISE_RELEASE_IMAGE=splunk/splunk:9.3.2
6 changes: 1 addition & 5 deletions .github/workflows/int-test-azure-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ jobs:
password: ${{ secrets.AZURE_ACR_DOCKER_PASSWORD }}
- name: Make Splunk Operator Image
run: |
make docker-build IMG=${{ secrets.AZURE_ACR_LOGIN_SERVER }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
- name: Push Splunk Operator Image to the Container Registry
run: |
echo "Uploading Image to the Container Registry :: ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA"
make docker-push IMG=${{ secrets.AZURE_ACR_LOGIN_SERVER }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
make docker-buildx IMG=${{ secrets.AZURE_ACR_LOGIN_SERVER }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
setup-aks-cluster:
runs-on: ubuntu-latest
needs: build-operator-image
Expand Down
277 changes: 277 additions & 0 deletions .github/workflows/int-test-gcp-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
name: Integration Test on GCP Workflow

on:
push:
branches:
- develop
- main

jobs:
build-operator-image:
runs-on: ubuntu-latest
env:
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }}
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
ARTIFACT_REGISTRY: ${{ secrets.GCP_ARTIFACT_REGISTRY }} # Updated for Artifact Registry
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Load Environment Variables
id: dotenv
uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
with:
path: .env # Adjust the path if your dotenv file is located elsewhere

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.dotenv.outputs.GO_VERSION }}

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Install Operator SDK
run: |
ARCH=$(case $(uname -m) in
x86_64) echo -n amd64 ;;
aarch64) echo -n arm64 ;;
*) echo -n $(uname -m) ;;
esac)
OS=$(uname | awk '{print tolower($0)}')
OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }}
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
chmod +x operator-sdk_${OS}_${ARCH}
sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk

- name: Authenticate to GCP
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

- name: Login to GCR
uses: docker/login-action@v3
with:
registry: ${{ secrets.GCP_ARTIFACT_REGISTRY }}
username: _json_key
password: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

- name: Build Splunk Operator Image
run: |
make docker-buildx IMG=${{ secrets.GCP_ARTIFACT_REGISTRY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA

create-cluster-and-run-tests:
strategy:
matrix:
test_focus:
- { order: 1, name: "c3_gcp_sanity" }
- { order: 2, name: "c3_mgr_gcp_sanity" }
- { order: 3, name: "m4_gcp_sanity" }
- { order: 4, name: "m4_mgr_gcp_sanity" }
- { order: 5, name: "s1_gcp_sanity" }
runs-on: ubuntu-latest
needs: build-operator-image
env:
CLUSTER_WORKERS: 5
TEST_CLUSTER_PLATFORM: gcp
CLUSTER_PROVIDER: gcp
ARTIFACT_REGISTRY: ${{ secrets.GCP_ARTIFACT_REGISTRY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_REGION: ${{ secrets.GCP_REGION }}
AWS_S3_REGION: ${{ secrets.GCP_REGION }}
GCP_ZONE: ${{ secrets.GCP_ZONE }}
GCP_NETWORK: default # Adjust if using a custom network
GCP_SUBNETWORK: default # Adjust if using a custom subnetwork
TEST_FOCUS: ${{ matrix.test_focus.name }}
CLUSTER_NODES: 2
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }}
SPLUNK_ENTERPRISE_RELEASE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_RELEASE_IMAGE }}
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator
TEST_TO_SKIP: "^(?:[^s]+|s(?:$|[^m]|m(?:$|[^o]|o(?:$|[^k]|k(?:$|[^e])))))*$"
TEST_BUCKET: ${{ secrets.TEST_BUCKET }}
TEST_S3_BUCKET: ${{ secrets.TEST_BUCKET }}
TEST_INDEXES_S3_BUCKET: ${{ secrets.TEST_INDEXES_S3_BUCKET }}
INDEXES_S3_BUCKET: ${{ secrets.TEST_INDEXES_S3_BUCKET }}
GCP_ENTERPRISE_LICENSE_LOCATION: "test_licenses"
ENTERPRISE_LICENSE_LOCATION: "test_licenses"
ENTERPRISE_LICENSE_S3_PATH: "test_licenses"
REGISTRY_REPOSITORY: ${{ secrets.GCP_ARTIFACT_REGISTRY }}
CLUSTER_WIDE: "true"
GCP_SERVICE_ACCOUNT_ENABLED: "false"
PRIVATE_REGISTRY: ${{ secrets.GCP_ARTIFACT_REGISTRY }}
GCP_STORAGE_ACCOUNT: ${{ secrets.GCP_STORAGE_ACCOUNT }}
GCP_STORAGE_ACCOUNT_KEY: ${{ secrets.GCP_STORAGE_ACCOUNT_KEY }}
GCP_TEST_CONTAINER: ${{ secrets.GCP_TEST_CONTAINER}}
GCP_INDEXES_CONTAINER: ${{ secrets.GCP_INDEXES_CONTAINER}}
ECR_REPOSITORY: ${{ secrets.GCP_ARTIFACT_REGISTRY }}
GCP_CONTAINER_REGISTRY_LOGIN_SERVER: ${{ secrets.AZURE_ACR_LOGIN_SERVER }}
steps:
- name: Set Test Cluster Name
run: |
echo "CLUSTER_NAME=gke-${{ matrix.test_focus.order }}-$GITHUB_RUN_ID" >> $GITHUB_ENV
echo "TEST_CLUSTER_NAME=gke-${{ matrix.test_focus.order }}-$GITHUB_RUN_ID" >> $GITHUB_ENV
- name: Checkout Code
uses: actions/checkout@v2

- name: Load Environment Variables
id: dotenv
uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
with:
path: .env

- name: Authenticate to GCP
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
install_components: 'kubectl'

- name: Set GCP Project
run: |
gcloud config set project ${{ env.GCP_PROJECT_ID }}

- name: Create GKE Cluster
run: |
export EKS_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }}
export GKE_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }}
make cluster-up

- name: Get Kubernetes Credentials
run: |
gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.GCP_ZONE }} --project ${{ env.GCP_PROJECT_ID }}

- name: Allow Pulling from Artifact Registry
run: |
gcloud auth configure-docker ${{ secrets.GCP_ARTIFACT_REGISTRY }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
install_components: 'kubectl'

- name: Change Splunk Enterprise 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: Authenticate to GCP
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

- name: Set GCP Project
run: |
gcloud config set project ${{ env.GCP_PROJECT_ID }}

- name: Install Kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ steps.dotenv.outputs.KUBECTL_VERSION }}

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Specify the Python version if needed

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.dotenv.outputs.GO_VERSION }}

- name: Install Go Lint
run: |
go version
go install golang.org/x/lint/golint@latest

- name: Install Ginkgo
run: |
make setup/ginkgo

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to GCR
uses: docker/login-action@v3
with:
registry: ${{ secrets.GCP_ARTIFACT_REGISTRY }}
username: _json_key
password: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

- name: Pull Splunk Enterprise Image
run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }}

- name: Pull Splunk Operator Image Locally
run: |
docker pull ${{ secrets.GCP_ARTIFACT_REGISTRY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
docker tag ${{ secrets.GCP_ARTIFACT_REGISTRY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
echo "SPLUNK_OPERATOR_IMAGE=${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA" >> $GITHUB_ENV

- name: Tag and Push Splunk Enterprise Image to Artifact Registry
run: |
docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.GCP_ARTIFACT_REGISTRY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}
docker push ${{ secrets.GCP_ARTIFACT_REGISTRY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}

- name: Get Kubernetes Credentials
run: |
gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.GCP_ZONE }} --project ${{ env.GCP_PROJECT_ID }}

- name: Get GKE Credentials
uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: ${{ env.CLUSTER_NAME }}
location: ${{ env.GCP_ZONE }}

- name: Install Metrics Server
run: |
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

- name: Install Kubernetes Dashboard
run: |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.5/aio/deploy/recommended.yaml

- name: Setup Kustomize
run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
sudo mv kustomize /usr/local/bin/

- name: Verify kubectl Configuration
run: |
kubectl config current-context

- name: Apply StorageClass
run: |
kubectl apply -f test/gcp-storageclass.yaml

- name: Run Integration Tests
run: |
export GCP_SERVICE_ACCOUNT_KEY=${{ secrets.GCP_SERVICE_ACCOUNT_KEY_BASE64 }}
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
with:
name: splunk-pods-logs-artifacts-${{ matrix.test_focus.name }}
path: /tmp/pod_logs/**
- name: Cleanup Test Case Artifacts
if: ${{ always() }}
run: |
export EKS_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }}
export GKE_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }}
tools/cleanup.sh
- name: Cleanup up EKS cluster
if: ${{ always() }}
run: |
make cluster-down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM registry.access.redhat.com/ubi8/ubi:8.10
# This sha relates to ubi version 8.10-1132, which is tagged as 8.10 and latest as of Nov 15, 2024
FROM registry.access.redhat.com/ubi8/ubi@sha256:8990388831e1b41c9a67389e4b691dae8b1283f77d5fb7263e1f4fc69c0a9d05
ENV OPERATOR=/manager \
USER_UID=1001 \
USER_NAME=nonroot
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ docker-buildx: test ## Build and push docker image for the manager for cross-pla
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- docker buildx create --name project-v3-builder
docker buildx use project-v3-builder
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
- docker buildx rm project-v3-builder
rm Dockerfile.cross

Expand Down
4 changes: 2 additions & 2 deletions api/v4/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ type VolumeSpec struct {
// Secret object name
SecretRef string `json:"secretRef"`

// Remote Storage type. Supported values: s3, blob. s3 works with aws or minio providers, whereas blob works with azure provider.
// Remote Storage type. Supported values: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.
Type string `json:"storageType"`

// App Package Remote Store provider. Supported values: aws, minio, azure.
// App Package Remote Store provider. Supported values: aws, minio, azure, gcp.
Provider string `json:"provider"`

// Region of the remote storage volume where apps reside. Used for aws, if provided. Not used for minio and azure.
Expand Down
Loading
Loading