diff --git a/.github/workflows/arm-AL2023-build-test-push-workflow-AL2023.yml b/.github/workflows/arm-AL2023-build-test-push-workflow-AL2023.yml index 0a6ac60e9..143111628 100644 --- a/.github/workflows/arm-AL2023-build-test-push-workflow-AL2023.yml +++ b/.github/workflows/arm-AL2023-build-test-push-workflow-AL2023.yml @@ -1,11 +1,12 @@ name: Arm AL2023 Smoke Test WorkFlow permissions: contents: read + checks: write packages: write id-token: write pull-requests: write on: - workflow_dispatch: + workflow_dispatch: inputs: splunk_image_repository_tag: description: 'Splunk AL2023-based Docker Image repository and tag (e.g. repository-name:tag)' @@ -17,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -33,7 +34,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -50,11 +51,25 @@ jobs: run: make test - name: Run Code Coverage run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }} + continue-on-error: true - name: Upload Coverage artifacts - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: coverage.out path: coverage.out + - name: Upload Unit Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: test-report-unit + path: unit_test*.xml + - name: Publish Unit Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'unit_test*.xml' + check_name: 'Unit Test Results (ARM AL2023)' + detailed_summary: true build-operator-image-arm-al2023: runs-on: ubuntu-latest needs: unit-tests @@ -65,12 +80,12 @@ jobs: S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }} steps: - name: Set up cosign - uses: sigstore/cosign-installer@main + uses: sigstore/cosign-installer@v4.0.0 - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -97,7 +112,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export PLATFORMS=linux/arm64,linux/amd64 @@ -165,7 +180,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -207,7 +222,7 @@ jobs: 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 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -223,7 +238,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Enterprise Image run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} - name: Create EKS cluster @@ -247,6 +262,7 @@ jobs: id: smoketest timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -258,10 +274,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Smoke Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-smoke-arm-al2023-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Smoke Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Smoke Test Results (ARM AL2023) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | diff --git a/.github/workflows/arm-AL2023-int-test-workflow.yml b/.github/workflows/arm-AL2023-int-test-workflow.yml index 2697ff1af..39986ebca 100644 --- a/.github/workflows/arm-AL2023-int-test-workflow.yml +++ b/.github/workflows/arm-AL2023-int-test-workflow.yml @@ -2,6 +2,7 @@ name: Arm AL2023 Integration Test WorkFlow permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -22,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -46,7 +47,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export PLATFORMS=linux/arm64,linux/amd64 @@ -118,7 +119,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -156,7 +157,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -172,7 +173,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Enterprise Image run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} - name: Create EKS cluster @@ -195,6 +196,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -206,10 +208,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-arm-al2023-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Integration Test Results (ARM AL2023) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | diff --git a/.github/workflows/arm-RHEL-build-test-push-workflow.yml b/.github/workflows/arm-RHEL-build-test-push-workflow.yml index f860f1c43..07848683c 100644 --- a/.github/workflows/arm-RHEL-build-test-push-workflow.yml +++ b/.github/workflows/arm-RHEL-build-test-push-workflow.yml @@ -2,6 +2,7 @@ name: ARM RHEL Smoke Test WorkFlow permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -22,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -46,7 +47,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export PLATFORMS=linux/arm64,linux/amd64 @@ -55,7 +56,6 @@ jobs: 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 smoke-tests-arm-rhel: - timeout-minutes: 240 strategy: fail-fast: false matrix: @@ -73,7 +73,9 @@ jobs: ] runs-on: ubuntu-latest needs: build-operator-image-arm-rhel + timeout-minutes: 240 env: + TEST_TIMEOUT: 225m CLUSTER_NODES: 1 CLUSTER_WORKERS: 3 SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.ECR_PREFIX }}/${{ github.event.inputs.splunk_image_repository_tag }} @@ -119,7 +121,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -157,7 +159,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -173,7 +175,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Enterprise Image run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} - name: Create EKS cluster @@ -196,6 +198,7 @@ jobs: - name: Run smoke test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -207,10 +210,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Smoke Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-smoke-arm-rhel-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Smoke Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Smoke Test Results (ARM RHEL) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | diff --git a/.github/workflows/arm-RHEL-int-test-workflow.yml b/.github/workflows/arm-RHEL-int-test-workflow.yml index ff9baddcb..83c7e8fb9 100644 --- a/.github/workflows/arm-RHEL-int-test-workflow.yml +++ b/.github/workflows/arm-RHEL-int-test-workflow.yml @@ -2,6 +2,7 @@ name: ARM RHEL Integration Test WorkFlow permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -22,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -46,7 +47,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export PLATFORMS=linux/arm64,linux/amd64 @@ -118,7 +119,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -156,7 +157,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -172,7 +173,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Enterprise Image run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} - name: Create EKS cluster @@ -195,6 +196,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -206,10 +208,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-arm-rhel-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Integration Test Results (ARM RHEL) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | diff --git a/.github/workflows/arm-Ubuntu-build-test-push-workflow.yml b/.github/workflows/arm-Ubuntu-build-test-push-workflow.yml index 8922bf89b..05aa9a1fc 100644 --- a/.github/workflows/arm-Ubuntu-build-test-push-workflow.yml +++ b/.github/workflows/arm-Ubuntu-build-test-push-workflow.yml @@ -2,6 +2,7 @@ name: Arm Ubuntu Smoke Test WorkFlow permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -17,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -33,7 +34,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -50,11 +51,25 @@ jobs: run: make test - name: Run Code Coverage run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }} + continue-on-error: true - name: Upload Coverage artifacts - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: coverage.out path: coverage.out + - name: Upload Unit Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: test-report-unit + path: unit_test*.xml + - name: Publish Unit Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'unit_test*.xml' + check_name: 'Unit Test Results (ARM Ubuntu)' + detailed_summary: true build-operator-image-arm-ubuntu: runs-on: ubuntu-latest needs: unit-tests @@ -65,12 +80,12 @@ jobs: S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }} steps: - name: Set up cosign - uses: sigstore/cosign-installer@main + uses: sigstore/cosign-installer@v4.0.0 - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -97,7 +112,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export PLATFORMS=linux/arm64,linux/amd64 @@ -165,7 +180,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -207,7 +222,7 @@ jobs: 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 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -223,7 +238,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Enterprise Image run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} - name: Create EKS cluster @@ -247,6 +262,7 @@ jobs: id: smoketest timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -258,10 +274,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Smoke Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-smoke-arm-ubuntu-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Smoke Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Smoke Test Results (ARM Ubuntu) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | diff --git a/.github/workflows/arm-Ubuntu-int-test-workflow.yml b/.github/workflows/arm-Ubuntu-int-test-workflow.yml index fe0a69e91..b3f133abe 100644 --- a/.github/workflows/arm-Ubuntu-int-test-workflow.yml +++ b/.github/workflows/arm-Ubuntu-int-test-workflow.yml @@ -2,6 +2,7 @@ name: Arm Ubuntu Integration Test WorkFlow Ubuntu permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -22,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -46,7 +47,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export PLATFORMS=linux/arm64,linux/amd64 @@ -118,7 +119,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -156,7 +157,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -172,7 +173,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Enterprise Image run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} - name: Create EKS cluster @@ -195,6 +196,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -206,10 +208,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-arm-ubuntu-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Integration Test Results (ARM Ubuntu) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | @@ -218,11 +233,4 @@ jobs: - name: Cleanup up EKS cluster if: ${{ always() }} run: | - make cluster-down - #- name: Test Report - # uses: dorny/test-reporter@v1 - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Integration Tests # Name of the check run which will be created - # path: inttest-*.xml # Path to test results - # reporter: jest-junit # Format of test results \ No newline at end of file + make cluster-down \ No newline at end of file diff --git a/.github/workflows/automated-release-workflow.yml b/.github/workflows/automated-release-workflow.yml index 348dea7ed..3c9bd63d1 100644 --- a/.github/workflows/automated-release-workflow.yml +++ b/.github/workflows/automated-release-workflow.yml @@ -28,7 +28,7 @@ jobs: SPLUNK_OPERATOR_RC_IMAGE_NAME: splunk/splunk-operator-rc steps: - name: Set up cosign - uses: sigstore/cosign-installer@main + uses: sigstore/cosign-installer@v4.0.0 - name: Checkout code uses: actions/checkout@v2 @@ -39,7 +39,7 @@ jobs: - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v5 @@ -63,7 +63,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}} @@ -85,7 +85,7 @@ jobs: make generate-artifacts IMG=splunk/splunk-operator:${{ github.event.inputs.release_version }} VERSION=${{ github.event.inputs.release_version }} SPLUNK_ENTERPRISE_IMAGE=splunk/splunk:${{ github.event.inputs.enterprise_version }} - name: Upload Release Artifacts - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "release-artifacts-${{ github.event.inputs.release_version }}" path: "release-**" @@ -108,14 +108,14 @@ jobs: run: | regctl image copy ${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_RC_IMAGE_NAME }}:${{ github.event.inputs.release_version }}-RC splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }} regctl image copy ${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_RC_IMAGE_NAME }}:${{ github.event.inputs.release_version }}-RC splunk/splunk-operator:latest - + - name: Sign Splunk Operator image with a key run: | cosign sign --yes --key env://COSIGN_PRIVATE_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }} env: COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} - + - name: Verify Splunk Operator image with a key run: | cosign verify --key env://COSIGN_PUBLIC_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }} @@ -125,14 +125,14 @@ jobs: - name: Promote Distroless RC Image to Release run: | regctl image copy ${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_RC_IMAGE_NAME }}:${{ github.event.inputs.release_version }}-RC-distroless splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}-distroless - + - name: Sign Distroless Splunk Operator image with a key run: | cosign sign --yes --key env://COSIGN_PRIVATE_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}-distroless env: COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} - + - name: Verify Distroless Splunk Operator image with a key run: | cosign verify --key env://COSIGN_PUBLIC_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}-distroless diff --git a/.github/workflows/build-test-push-workflow.yml b/.github/workflows/build-test-push-workflow.yml index 68fa219f6..e457272b8 100644 --- a/.github/workflows/build-test-push-workflow.yml +++ b/.github/workflows/build-test-push-workflow.yml @@ -2,6 +2,7 @@ name: Build and Test permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -23,7 +24,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -40,12 +41,11 @@ jobs: 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 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -62,15 +62,29 @@ jobs: run: | make test - name: Run Code Coverage - run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }} + run: goveralls -shallow -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }} + continue-on-error: true - name: Upload Coverage artifacts - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: coverage.out path: coverage.out + - name: Upload Unit Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: test-report-unit + path: unit_test*.xml + - name: Publish Unit Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'unit_test*.xml' + check_name: 'Unit Test Results' + detailed_summary: true build-operator-image: runs-on: ubuntu-latest - needs: unit-tests + needs: [check-formating, unit-tests] env: SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }} SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator @@ -78,12 +92,12 @@ jobs: S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }} steps: - name: Set up cosign - uses: sigstore/cosign-installer@main + uses: sigstore/cosign-installer@v4.0.0 - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -110,7 +124,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | make docker-buildx IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA @@ -136,11 +150,11 @@ jobs: IMAGE_NAME: ${{ secrets.ECR_REPOSITORY }}/splunk/splunk-operator:${{ github.sha }} steps: - name: Set up cosign - uses: sigstore/cosign-installer@main + uses: sigstore/cosign-installer@v4.0.0 - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure AWS credentials @@ -152,7 +166,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Operator Image Locally run: | docker pull ${{ env.IMAGE_NAME }} @@ -171,7 +185,7 @@ jobs: ignore-unfixed: true output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v3 + uses: github/codeql-action/upload-sarif@v4 with: sarif_file: 'trivy-results.sarif' smoke-tests: @@ -227,7 +241,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -269,7 +283,7 @@ jobs: 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 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -287,7 +301,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Tag and Push Splunk Enterprise Image to ECR run: | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} @@ -312,6 +326,7 @@ jobs: id: smoketest timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -323,10 +338,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Smoke Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-smoke-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Smoke Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Smoke Test Results - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | @@ -336,10 +364,3 @@ jobs: if: ${{ always() }} run: | make cluster-down - #- name: Test Report - # uses: dorny/test-reporter@v1 - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Integration Tests # Name of the check run which will be created - # path: inttest-*.xml # Path to test results - # reporter: jest-junit # Format of test results diff --git a/.github/workflows/bundle-push-post-release.yml b/.github/workflows/bundle-push-post-release.yml index 7b10c5061..36a6b6bdc 100644 --- a/.github/workflows/bundle-push-post-release.yml +++ b/.github/workflows/bundle-push-post-release.yml @@ -27,7 +27,7 @@ jobs: - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 @@ -36,7 +36,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}} diff --git a/.github/workflows/distroless-build-test-push-workflow.yml b/.github/workflows/distroless-build-test-push-workflow.yml index 6efadcf15..69a005c8d 100644 --- a/.github/workflows/distroless-build-test-push-workflow.yml +++ b/.github/workflows/distroless-build-test-push-workflow.yml @@ -2,6 +2,7 @@ name: Build and Test Distroles permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -23,7 +24,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -39,7 +40,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -55,12 +56,26 @@ jobs: - name: Run Unit Tests run: make test - name: Run Code Coverage - run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }} + run: goveralls -shallow -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }} + continue-on-error: true - name: Upload Coverage artifacts - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: coverage.out path: coverage.out + - name: Upload Unit Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: test-report-unit + path: unit_test*.xml + - name: Publish Unit Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'unit_test*.xml' + check_name: 'Unit Test Results' + detailed_summary: true build-operator-image: runs-on: ubuntu-latest needs: unit-tests @@ -71,12 +86,12 @@ jobs: S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }} steps: - name: Set up cosign - uses: sigstore/cosign-installer@main + uses: sigstore/cosign-installer@v4.0.0 - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -103,7 +118,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export BASE_IMAGE=gcr.io/distroless/static-debian12 @@ -130,11 +145,11 @@ jobs: # IMAGE_NAME: ${{ secrets.ECR_REPOSITORY }}/splunk/splunk-operator:${{ github.sha }}-distroless # steps: # - name: Set up cosign -# uses: sigstore/cosign-installer@main +# uses: sigstore/cosign-installer@v4.0.0 # - uses: actions/checkout@v2 # - name: Dotenv Action # id: dotenv -# uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 +# uses: falti/dotenv-action@v1 # - name: Set up Docker Buildx # uses: docker/setup-buildx-action@v2.5.0 # - name: Configure AWS credentials @@ -146,7 +161,7 @@ jobs: # role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} # # - name: Login to Amazon ECR -# uses: aws-actions/amazon-ecr-login@v1 +# uses: aws-actions/amazon-ecr-login@v2 # - name: Pull Splunk Operator Image Locally # run: | # docker pull ${{ env.IMAGE_NAME }} @@ -165,7 +180,7 @@ jobs: # ignore-unfixed: true # output: 'trivy-results.sarif' # - name: Upload Trivy scan results to GitHub Security tab -# uses: github/codeql-action/upload-sarif@v3 +# uses: github/codeql-action/upload-sarif@v4 # with: # sarif_file: 'trivy-results.sarif' smoke-tests: @@ -222,7 +237,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -264,7 +279,7 @@ jobs: 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 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -282,7 +297,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Tag and Push Splunk Enterprise Image to ECR run: | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} @@ -307,6 +322,7 @@ jobs: id: smoketest timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -318,10 +334,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Smoke Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-smoke-distroless-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Smoke Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Smoke Test Results (Distroless) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | @@ -331,10 +360,3 @@ jobs: if: ${{ always() }} run: | make cluster-down - #- name: Test Report - # uses: dorny/test-reporter@v1 - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Integration Tests # Name of the check run which will be created - # path: inttest-*.xml # Path to test results - # reporter: jest-junit # Format of test results diff --git a/.github/workflows/distroless-int-test-workflow.yml b/.github/workflows/distroless-int-test-workflow.yml index 6238aed14..01a024247 100644 --- a/.github/workflows/distroless-int-test-workflow.yml +++ b/.github/workflows/distroless-int-test-workflow.yml @@ -2,6 +2,7 @@ name: Integration Test Workflow Distroless permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -24,7 +25,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -48,7 +49,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | export PLATFORMS=linux/arm64,linux/amd64 @@ -120,7 +121,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -158,7 +159,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -174,7 +175,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Enterprise Image run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }} - name: Create EKS cluster @@ -196,6 +197,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -207,10 +209,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-distroless-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Integration Test Results (Distroless) - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | @@ -220,10 +235,3 @@ jobs: if: ${{ always() }} run: | make cluster-down - #- name: Test Report - # uses: dorny/test-reporter@v1 - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Integration Tests # Name of the check run which will be created - # path: inttest-*.xml # Path to test results - # reporter: jest-junit # Format of test results diff --git a/.github/workflows/helm-test-workflow.yml b/.github/workflows/helm-test-workflow.yml index 8f7549ab5..7aceea88a 100644 --- a/.github/workflows/helm-test-workflow.yml +++ b/.github/workflows/helm-test-workflow.yml @@ -2,6 +2,7 @@ name: Helm Test WorkFlow permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -26,7 +27,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -50,15 +51,16 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and Push Splunk Operator Image run: | make docker-buildx IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA int-tests: - timeout-minutes: 240 runs-on: ubuntu-latest needs: build-operator-image + timeout-minutes: 240 env: + TEST_TIMEOUT: 225m SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }} SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator @@ -103,7 +105,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -148,7 +150,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -163,7 +165,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Operator Image Locally and change name run: | docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA @@ -218,11 +220,18 @@ jobs: TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | kubectl kuttl test --config kuttl/kuttl-test-helm.yaml --report xml - - name: Publish Results - uses: mikepenz/action-junit-report@v3 + - name: Upload Helm Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: test-report-helm + path: '**/kuttl-artifacts/*.xml' + - name: Publish Helm Test Report + uses: mikepenz/action-junit-report@v6 if: always() with: - report_paths: '*/kuttl-artifacts/.xml' + report_paths: '**/kuttl-artifacts/*.xml' + check_name: 'Helm Test Results' detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} diff --git a/.github/workflows/int-test-azure-workflow.yml b/.github/workflows/int-test-azure-workflow.yml index 8b4d0e9a8..743bb5df6 100644 --- a/.github/workflows/int-test-azure-workflow.yml +++ b/.github/workflows/int-test-azure-workflow.yml @@ -2,6 +2,7 @@ name: Integration Test on Azure WorkFlow permissions: contents: read packages: write + checks: write pull-requests: write on: push: @@ -22,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -69,7 +70,7 @@ jobs: uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Set Cluster Name run: | echo "TEST_CLUSTER_NAME=az${{ github.run_id }}" >> $GITHUB_ENV @@ -144,7 +145,7 @@ jobs: uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -173,7 +174,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -224,6 +225,8 @@ jobs: cp /snap/bin/kustomize ./bin/kustomize - name: Run Integration test timeout-minutes: 240 + env: + TEST_TIMEOUT: 225m run: | make int-test - name: Collect Test Logs @@ -233,10 +236,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-appframeworkazure" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-azure" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Integration Test Results (Azure)' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | diff --git a/.github/workflows/int-test-gcp-workflow.yml b/.github/workflows/int-test-gcp-workflow.yml index 1d3dce0ce..c72c05579 100644 --- a/.github/workflows/int-test-gcp-workflow.yml +++ b/.github/workflows/int-test-gcp-workflow.yml @@ -3,7 +3,7 @@ permissions: contents: read packages: write pull-requests: write - + checks: write on: push: branches: @@ -25,7 +25,7 @@ jobs: - name: Load Environment Variables id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 with: path: .env # Adjust the path if your dotenv file is located elsewhere @@ -123,7 +123,7 @@ jobs: - name: Load Environment Variables id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 with: path: .env @@ -258,6 +258,8 @@ jobs: - name: Run Integration Tests timeout-minutes: 240 + env: + TEST_TIMEOUT: 225m run: | export GCP_SERVICE_ACCOUNT_KEY=${{ secrets.GCP_SERVICE_ACCOUNT_KEY_BASE64 }} make int-test @@ -270,10 +272,23 @@ jobs: - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: splunk-pods-logs-artifacts-${{ matrix.test_focus.name }} path: /tmp/pod_logs/** + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: test-report-integration-gcp-${{ matrix.test_focus.name }} + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Integration Test Results (GCP) - ${{ matrix.test_focus.name }}' + detailed_summary: true - name: Cleanup Test Case Artifacts if: ${{ always() }} run: | diff --git a/.github/workflows/int-test-workflow.yml b/.github/workflows/int-test-workflow.yml index 4d0ef5379..001a34cee 100644 --- a/.github/workflows/int-test-workflow.yml +++ b/.github/workflows/int-test-workflow.yml @@ -2,6 +2,7 @@ name: Integration Test WorkFlow permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -25,7 +26,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -49,7 +50,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and push Splunk Operator Image run: | make docker-buildx IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA @@ -115,7 +116,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Change splunk enterprise to release image on main branches if: github.ref == 'refs/heads/main' run: | @@ -153,7 +154,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -171,7 +172,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Tag and Push Splunk Enterprise Image to ECR run: | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} @@ -195,6 +196,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -206,10 +208,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Integration Test Results - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | @@ -218,11 +233,4 @@ jobs: - name: Cleanup up EKS cluster if: ${{ always() }} run: | - make cluster-down - #- name: Test Report - # uses: dorny/test-reporter@v1 - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Integration Tests # Name of the check run which will be created - # path: inttest-*.xml # Path to test results - # reporter: jest-junit # Format of test results \ No newline at end of file + make cluster-down \ No newline at end of file diff --git a/.github/workflows/manual-int-test-workflow.yml b/.github/workflows/manual-int-test-workflow.yml index f5150b3ac..96629316e 100644 --- a/.github/workflows/manual-int-test-workflow.yml +++ b/.github/workflows/manual-int-test-workflow.yml @@ -2,6 +2,7 @@ name: Manual Integration Test WorkFlow permissions: contents: read packages: write + checks: write id-token: write pull-requests: write on: @@ -74,7 +75,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Install Kubectl uses: Azure/setup-kubectl@v3 with: @@ -106,7 +107,7 @@ jobs: 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 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -121,7 +122,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and Push Splunk Operator Image run: | docker pull registry.access.redhat.com/ubi8/ubi-minimal:latest @@ -149,6 +150,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -161,10 +163,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-manual-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Manual Integration Test Results - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | @@ -185,7 +200,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure AWS credentials @@ -196,7 +211,7 @@ jobs: aws-region: ${{ vars.AWS_REGION }} role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Operator Image Locally run: | docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA @@ -204,7 +219,7 @@ jobs: run: | docker tag ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }} - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}} diff --git a/.github/workflows/merge-develop-to-main-workflow.yml b/.github/workflows/merge-develop-to-main-workflow.yml index cab11eb85..b94624df1 100644 --- a/.github/workflows/merge-develop-to-main-workflow.yml +++ b/.github/workflows/merge-develop-to-main-workflow.yml @@ -33,7 +33,7 @@ jobs: git reset --hard develop - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Create Pull Request uses: peter-evans/create-pull-request@v3.10.1 with: @@ -62,7 +62,7 @@ jobs: - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 @@ -121,7 +121,7 @@ jobs: make generate-artifacts IMG=${{ secrets.PUBLIC_ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_RC_IMAGE_NAME }}:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }} VERSION=${{ github.event.inputs.release_version }} SPLUNK_ENTERPRISE_IMAGE=splunk/splunk:${{ github.event.inputs.enterprise_version }} - name: Upload Release Artifacts - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "release-artifacts-${{ github.event.inputs.release_version }}-RC" path: "release-**" diff --git a/.github/workflows/namespace-scope-int-workflow.yml b/.github/workflows/namespace-scope-int-workflow.yml index b3576b1ee..fc3d3554f 100644 --- a/.github/workflows/namespace-scope-int-workflow.yml +++ b/.github/workflows/namespace-scope-int-workflow.yml @@ -4,6 +4,7 @@ permissions: packages: write id-token: write pull-requests: write + checks: write on: schedule: - cron: "0 02 * * WED,SUN" @@ -71,7 +72,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Install Kubectl uses: Azure/setup-kubectl@v3 with: @@ -103,7 +104,7 @@ jobs: 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 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -118,7 +119,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and Push Splunk Operator Image run: | docker pull registry.access.redhat.com/ubi8/ubi-minimal:latest @@ -146,6 +147,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -158,10 +160,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-namespace-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Namespace-Scope Integration Test Results - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup up EKS cluster if: ${{ always() }} run: | diff --git a/.github/workflows/nightly-int-test-workflow.yml b/.github/workflows/nightly-int-test-workflow.yml index 6079816af..3f886dd9a 100644 --- a/.github/workflows/nightly-int-test-workflow.yml +++ b/.github/workflows/nightly-int-test-workflow.yml @@ -4,6 +4,7 @@ permissions: packages: write id-token: write pull-requests: write + checks: write on: schedule: - cron: "0 06 * * 0" @@ -21,7 +22,7 @@ jobs: ref: develop - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Setup Go uses: actions/setup-go@v2 with: @@ -45,7 +46,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Build and Push Splunk Operator Image run: | make docker-buildx IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA @@ -112,7 +113,7 @@ jobs: echo "TEST_CLUSTER_NAME=${{ steps.set-cluster-name.outputs.cluster-name }}" >> $GITHUB_ENV - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Install Kubectl uses: Azure/setup-kubectl@v3 with: @@ -140,7 +141,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} @@ -155,7 +156,7 @@ jobs: role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Tag and Push Splunk Enterprise Image to ECR run: | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} @@ -186,6 +187,7 @@ jobs: - name: Run Integration test timeout-minutes: 240 env: + TEST_TIMEOUT: 225m TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} TEST_S3_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_ACCESS_KEY }} run: | @@ -198,10 +200,23 @@ jobs: find ./test -name "*.log" -exec cp {} /tmp/pod_logs \; - name: Archive Pod Logs if Failure in Smoke Test if: ${{ always() }} - uses: actions/upload-artifact@v4.4.0 + uses: actions/upload-artifact@v6 with: name: "splunk-pods-logs--artifacts-${{ matrix.test }}" path: "/tmp/pod_logs/**" + - name: Upload Integration Test Results + if: always() + uses: actions/upload-artifact@v6 + with: + name: "test-report-integration-nightly-${{ matrix.test }}" + path: report-junit*.xml + - name: Publish Integration Test Report + uses: mikepenz/action-junit-report@v6 + if: always() + with: + report_paths: 'report-junit*.xml' + check_name: 'Nightly Integration Test Results - ${{ matrix.test }}' + detailed_summary: true - name: Cleanup Test Case artifacts if: ${{ always() }} run: | @@ -219,13 +234,13 @@ jobs: TAG: edge steps: - name: Set up cosign - uses: sigstore/cosign-installer@main + uses: sigstore/cosign-installer@v4.0.0 - uses: actions/checkout@v2 with: ref: develop - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure AWS credentials @@ -236,7 +251,7 @@ jobs: aws-region: ${{ vars.AWS_REGION }} role-duration-seconds: ${{ vars.AWS_ROLE_DURATION_SECONDS }} - name: Login to Amazon ECR - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Pull Splunk Operator Image Locally run: | docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA @@ -244,7 +259,7 @@ jobs: run: | docker tag ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }} - name: Configure Docker Hub credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}} @@ -256,9 +271,8 @@ jobs: env: COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} - - name: Verify Signed Splunk Operator image + - name: Verify Signed Splunk Operator image run: | cosign verify --key env://COSIGN_PUBLIC_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }} env: COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }} - \ No newline at end of file diff --git a/.github/workflows/pre-release-workflow.yml b/.github/workflows/pre-release-workflow.yml index bdf1cc9b2..cb5e42dcf 100644 --- a/.github/workflows/pre-release-workflow.yml +++ b/.github/workflows/pre-release-workflow.yml @@ -53,13 +53,13 @@ jobs: - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.5.0 - name: Configure Docker Credentials - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}} diff --git a/.github/workflows/prodsec-workflow.yml b/.github/workflows/prodsec-workflow.yml index 64fe43b9a..ea0929f0a 100644 --- a/.github/workflows/prodsec-workflow.yml +++ b/.github/workflows/prodsec-workflow.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - name: Dotenv Action id: dotenv - uses: falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359 + uses: falti/dotenv-action@v1 - name: Run FOSSA Test uses: fossas/fossa-action@main with: diff --git a/.gitignore b/.gitignore index 4846768ad..5de8f6d85 100644 --- a/.gitignore +++ b/.gitignore @@ -91,7 +91,8 @@ clair-scanner clair-scanner-logs release-* deploy/olm-certified -*junit.xml +report-junit*.xml +unit_test*.xml # Bias Language Linter .biaslanguage/ bin/ diff --git a/Makefile b/Makefile index fab6fad78..df5dfaf34 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ SPLUNK_ENTERPRISE_IMAGE ?= "docker.io/splunk/splunk" # add namespace to this WATCH_NAMESPACE ?= "" -# SPLUNK_GENERAL_TERMS is used for the mandatory acknowledgment mechanism for +# SPLUNK_GENERAL_TERMS is used for the mandatory acknowledgment mechanism for # the Splunk General Terms (SGT) https://www.splunk.com/en_us/legal/splunk-general-terms.html. # See README for more information on the required value. SPLUNK_GENERAL_TERMS ?= "" @@ -138,7 +138,8 @@ vet: setup/ginkgo ## Run go vet against code. go vet ./... test: manifests generate fmt vet setup-envtest ## Run tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use ${ENVTEST_K8S_VERSION} --bin-dir $(LOCALBIN) -p path)" ginkgo --junit-report=unit_test.xml --output-dir=`pwd` -vv --trace --keep-going --timeout=3h --cover --covermode=count --coverprofile=coverage.out ./pkg/splunk/common ./pkg/splunk/enterprise ./pkg/splunk/client ./pkg/splunk/util ./internal/controller ./pkg/splunk/splkcontroller + REPORT_FILE="unit_test-$$(date +%Y%m%d-%H%M%S)$${GITHUB_RUN_ID:+-$$GITHUB_RUN_ID}.xml"; \ + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use ${ENVTEST_K8S_VERSION} --bin-dir $(LOCALBIN) -p path)" ginkgo --junit-report=$$REPORT_FILE --output-dir=`pwd` -vv --trace --keep-going --timeout=$${TEST_TIMEOUT:-170m} --cover --covermode=count --coverprofile=coverage.out ./pkg/splunk/common ./pkg/splunk/enterprise ./pkg/splunk/client ./pkg/splunk/util ./internal/controller ./pkg/splunk/splkcontroller ##@ Documentation @@ -284,7 +285,6 @@ ln -sf $(1)-$(3) $(1) endef ## Generate bundle manifests and metadata, then validate generated files. -## In addition, copy the newly generated crd files to helm crds. .PHONY: bundle bundle: manifests kustomize operator-sdk generate kustomize manifests -q @@ -295,7 +295,6 @@ bundle: manifests kustomize $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle ${BUNDLE_GEN_FLAGS} operator-sdk bundle validate ./bundle operator-sdk bundle validate bundle --select-optional suite=operatorframework - cp bundle/manifests/enterprise.splunk.com* helm-chart/splunk-operator/crds .PHONY: bundle-build bundle-build: ## Build the bundle image. @@ -473,4 +472,3 @@ build-installer: manifests generate kustomize mkdir -p dist cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default > dist/install.yaml - diff --git a/api/v4/clustermanager_types.go b/api/v4/clustermanager_types.go index bf5c6d4fb..cd986b868 100644 --- a/api/v4/clustermanager_types.go +++ b/api/v4/clustermanager_types.go @@ -39,6 +39,7 @@ type ClusterManagerSpec struct { CommonSplunkSpec `json:",inline"` // Splunk Smartstore configuration. Refer to indexes.conf.spec and server.conf.spec on docs.splunk.com + // +optional SmartStore SmartStoreSpec `json:"smartstore,omitempty"` // Splunk Enterprise App repository. Specifies remote App location and scope for Splunk App management diff --git a/api/v4/common_types.go b/api/v4/common_types.go index 78b6a3bd7..689540b37 100644 --- a/api/v4/common_types.go +++ b/api/v4/common_types.go @@ -92,10 +92,13 @@ type Spec struct { Image string `json:"image"` // Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent") - // +kubebuilder:validation:Enum=Always;Never;IfNotPresent + // +kubebuilder:validation:Enum=Always;IfNotPresent;Never + // +kubebuilder:default=IfNotPresent + // +optional ImagePullPolicy string `json:"imagePullPolicy"` // Name of Scheduler to use for pod placement (defaults to “default-scheduler”) + // +optional SchedulerName string `json:"schedulerName"` // Kubernetes Affinity rules that control how pods are assigned to particular nodes. @@ -164,12 +167,15 @@ type CommonSplunkSpec struct { Spec `json:",inline"` // Storage configuration for /opt/splunk/etc volume + // +optional EtcVolumeStorageConfig StorageClassSpec `json:"etcVolumeStorageConfig"` // Storage configuration for /opt/splunk/var volume + // +optional VarVolumeStorageConfig StorageClassSpec `json:"varVolumeStorageConfig"` // List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ + // +optional Volumes []corev1.Volume `json:"volumes"` // Inline map of default.yml overrides used to initialize the environment @@ -210,10 +216,12 @@ type CommonSplunkSpec struct { // ServiceAccount is the service account used by the pods deployed by the CRD. // If not specified uses the default serviceAccount for the namespace as per // https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + // +optional ServiceAccount string `json:"serviceAccount"` // ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers // WARNING: Setting environment variables used by Splunk or Ansible will affect Splunk installation and operation + // +optional ExtraEnv []corev1.EnvVar `json:"extraEnv,omitempty"` // ReadinessInitialDelaySeconds defines initialDelaySeconds(See https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes) for Readiness probe @@ -227,45 +235,64 @@ type CommonSplunkSpec struct { LivenessInitialDelaySeconds int32 `json:"livenessInitialDelaySeconds"` // LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command + // +optional + // +kubebuilder:default:={"initialDelaySeconds":30,"timeoutSeconds":30,"periodSeconds":30,"failureThreshold":3} LivenessProbe *Probe `json:"livenessProbe,omitempty"` // ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes + // +optional + // +kubebuilder:default:={"initialDelaySeconds":10,"timeoutSeconds":5,"periodSeconds":5,"failureThreshold":3} ReadinessProbe *Probe `json:"readinessProbe,omitempty"` // StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes + // +optional + // +kubebuilder:default:={"initialDelaySeconds":40,"timeoutSeconds":30,"periodSeconds":30,"failureThreshold":12} StartupProbe *Probe `json:"startupProbe,omitempty"` // Sets imagePullSecrets if image is being pulled from a private registry. // See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` } // StorageClassSpec defines storage class configuration +// +kubebuilder:validation:XValidation:rule="!(size(self.storageClassName) > 0 && self.ephemeralStorage == true)",message="storageClassName and ephemeralStorage are mutually exclusive" +// +kubebuilder:validation:XValidation:rule="!(size(self.storageCapacity) > 0 && self.ephemeralStorage == true)",message="storageCapacity and ephemeralStorage are mutually exclusive" type StorageClassSpec struct { // Name of StorageClass to use for persistent volume claims + // +optional StorageClassName string `json:"storageClassName"` - // Storage capacity to request persistent volume claims (default=”10Gi” for etc and "100Gi" for var) + // Storage capacity to request persistent volume claims (default="10Gi" for etc and "100Gi" for var) + // +optional StorageCapacity string `json:"storageCapacity"` // If true, ephemeral (emptyDir) storage will be used - // default false // +optional + // +kubebuilder:default=false EphemeralStorage bool `json:"ephemeralStorage"` } // SmartStoreSpec defines Splunk indexes and remote storage volume configuration type SmartStoreSpec struct { // List of remote storage volumes + // +optional + // +listType=map + // +listMapKey=name VolList []VolumeSpec `json:"volumes,omitempty"` // List of Splunk indexes + // +optional + // +listType=map + // +listMapKey=name IndexList []IndexSpec `json:"indexes,omitempty"` // Default configuration for indexes + // +optional Defaults IndexConfDefaultsSpec `json:"defaults,omitempty"` // Defines Cache manager settings + // +optional CacheManagerConf CacheManagerSpec `json:"cacheManager,omitempty"` } @@ -274,18 +301,23 @@ type CacheManagerSpec struct { IndexAndCacheManagerCommonSpec `json:",inline"` // Eviction policy to use + // +optional EvictionPolicy string `json:"evictionPolicy,omitempty"` // Max cache size per partition + // +optional MaxCacheSizeMB uint `json:"maxCacheSize,omitempty"` // Additional size beyond 'minFreeSize' before eviction kicks in + // +optional EvictionPaddingSizeMB uint `json:"evictionPadding,omitempty"` // Maximum number of buckets that can be downloaded from remote storage in parallel + // +optional MaxConcurrentDownloads uint `json:"maxConcurrentDownloads,omitempty"` // Maximum number of buckets that can be uploaded to remote storage in parallel + // +optional MaxConcurrentUploads uint `json:"maxConcurrentUploads,omitempty"` } @@ -295,26 +327,38 @@ type IndexConfDefaultsSpec struct { } // VolumeSpec defines remote volume config +// +kubebuilder:validation:XValidation:rule="self.provider != 'aws' || size(self.region) > 0",message="region is required when provider is aws" type VolumeSpec struct { // Remote volume name + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Remote volume URI + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 Endpoint string `json:"endpoint"` // Remote volume path + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 Path string `json:"path"` // Secret object name + // +optional SecretRef string `json:"secretRef"` // 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. + // +kubebuilder:validation:Enum=s3;blob;gcs Type string `json:"storageType"` // App Package Remote Store provider. Supported values: aws, minio, azure, gcp. + // +optional + // +kubebuilder:validation:Enum=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. + // Region of the remote storage volume where apps reside. Required for aws, optional for azure and gcp. + // +optional Region string `json:"region"` } @@ -326,9 +370,12 @@ type VolumeAndTypeSpec struct { // IndexSpec defines Splunk index name and storage path type IndexSpec struct { // Splunk index name + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Index location relative to the remote volume path + // +optional RemotePath string `json:"remotePath,omitempty"` IndexAndCacheManagerCommonSpec `json:",inline"` @@ -340,21 +387,26 @@ type IndexSpec struct { type IndexAndGlobalCommonSpec struct { // Remote Volume name + // +optional VolName string `json:"volumeName,omitempty"` // MaxGlobalDataSizeMB defines the maximum amount of space for warm and cold buckets of an index + // +optional MaxGlobalDataSizeMB uint `json:"maxGlobalDataSizeMB,omitempty"` // MaxGlobalDataSizeMB defines the maximum amount of cumulative space for warm and cold buckets of an index + // +optional MaxGlobalRawDataSizeMB uint `json:"maxGlobalRawDataSizeMB,omitempty"` } // IndexAndCacheManagerCommonSpec defines configurations that can be configured at index level or at server level type IndexAndCacheManagerCommonSpec struct { // Time period relative to the bucket's age, during which the bucket is protected from cache eviction + // +optional HotlistRecencySecs uint `json:"hotlistRecencySecs,omitempty"` // Time period relative to the bucket's age, during which the bloom filter file is protected from cache eviction + // +optional HotlistBloomFilterRecencyHours uint `json:"hotlistBloomFilterRecencyHours,omitempty"` } @@ -377,6 +429,7 @@ type AppSourceDefaultSpec struct { type PremiumAppsProps struct { // Type: enterpriseSecurity for now, can accommodate itsi etc.. later // +optional + // +kubebuilder:validation:Enum=enterpriseSecurity Type string `json:"type,omitempty"` // Enterpreise Security App defaults @@ -403,9 +456,13 @@ type EsDefaults struct { // AppSourceSpec defines list of App package (*.spl, *.tgz) locations on remote volumes type AppSourceSpec struct { // Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Location relative to the volume path + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 Location string `json:"location"` AppSourceDefaultSpec `json:",inline"` @@ -423,17 +480,18 @@ type AppFrameworkSpec struct { // 1. If no value or 0 is specified then it means periodic polling is disabled. // 2. If anything less than min is specified then we set it to 1 min. // 3. If anything more than the max value is specified then we set it to 1 day. + // +optional AppsRepoPollInterval int64 `json:"appsRepoPollIntervalSeconds,omitempty"` // App installation period within a reconcile. Apps will be installed during this period before the next reconcile is attempted. // Note: Do not change this setting unless instructed to do so by Splunk Support - // +kubebuilder:validation:Optional + // +optional // +kubebuilder:validation:Minimum:=30 // +kubebuilder:default:=90 SchedulerYieldInterval uint64 `json:"appInstallPeriodSeconds,omitempty"` // Maximum number of retries to install Apps - // +kubebuilder:validation:Optional + // +optional // +kubebuilder:validation:Minimum:=0 // +kubebuilder:default:=2 PhaseMaxRetries uint32 `json:"installMaxRetries,omitempty"` @@ -442,9 +500,13 @@ type AppFrameworkSpec struct { VolList []VolumeSpec `json:"volumes,omitempty"` // List of App sources on remote storage + // +optional + // +listType=map + // +listMapKey=name AppSources []AppSourceSpec `json:"appSources,omitempty"` // Maximum number of apps that can be downloaded at same time + // +optional MaxConcurrentAppDownloads uint64 `json:"maxConcurrentAppDownloads,omitempty"` } diff --git a/api/v4/indexercluster_types.go b/api/v4/indexercluster_types.go index 537f2863a..1adaf2576 100644 --- a/api/v4/indexercluster_types.go +++ b/api/v4/indexercluster_types.go @@ -49,7 +49,7 @@ type IndexerClusterSpec struct { // Object Storage reference ObjectStorageRef corev1.ObjectReference `json:"objectStorageRef"` - // Number of search head pods; a search head cluster will be created if > 1 + // Number of indexer cluster peers Replicas int32 `json:"replicas"` } diff --git a/api/v4/queue_types.go b/api/v4/queue_types.go index 6bc7d6337..b86bd23a9 100644 --- a/api/v4/queue_types.go +++ b/api/v4/queue_types.go @@ -30,11 +30,11 @@ const ( // +kubebuilder:validation:XValidation:rule="self.sqs.authRegion == oldSelf.sqs.authRegion",message="sqs.authRegion is immutable once created" // +kubebuilder:validation:XValidation:rule="self.sqs.dlq == oldSelf.sqs.dlq",message="sqs.dlq is immutable once created" // +kubebuilder:validation:XValidation:rule="self.sqs.endpoint == oldSelf.sqs.endpoint",message="sqs.endpoint is immutable once created" -// +kubebuilder:validation:XValidation:rule="self.provider != 'sqs' || has(self.sqs)",message="sqs must be provided when provider is sqs" +// +kubebuilder:validation:XValidation:rule="(self.provider != 'sqs' && self.provider != 'sqs_cp') || has(self.sqs)",message="sqs must be provided when provider is sqs or sqs_cp" // QueueSpec defines the desired state of Queue type QueueSpec struct { // +kubebuilder:validation:Required - // +kubebuilder:validation:Enum=sqs + // +kubebuilder:validation:Enum=sqs;sqs_cp // Provider of queue resources Provider string `json:"provider"` diff --git a/api/v4/searchheadcluster_types.go b/api/v4/searchheadcluster_types.go index 00ea9febe..26edf1402 100644 --- a/api/v4/searchheadcluster_types.go +++ b/api/v4/searchheadcluster_types.go @@ -40,6 +40,8 @@ type SearchHeadClusterSpec struct { CommonSplunkSpec `json:",inline"` // Number of search head pods; a search head cluster will be created if > 1 + // +optional + // +kubebuilder:default=3 Replicas int32 `json:"replicas"` // Splunk Enterprise App repository. Specifies remote App location and scope for Splunk App management diff --git a/api/v4/standalone_types.go b/api/v4/standalone_types.go index f19c09b5c..6a3761b56 100644 --- a/api/v4/standalone_types.go +++ b/api/v4/standalone_types.go @@ -39,9 +39,12 @@ type StandaloneSpec struct { CommonSplunkSpec `json:",inline"` // Number of standalone pods + // +optional + // +kubebuilder:default=1 Replicas int32 `json:"replicas"` //Splunk Smartstore configuration. Refer to indexes.conf.spec and server.conf.spec on docs.splunk.com + // +optional SmartStore SmartStoreSpec `json:"smartstore,omitempty"` // Splunk Enterprise App repository. Specifies remote App location and scope for Splunk App management diff --git a/config/crd/bases/enterprise.splunk.com_clustermanagers.yaml b/config/crd/bases/enterprise.splunk.com_clustermanagers.yaml index 0019d7504..a19a639ae 100644 --- a/config/crd/bases/enterprise.splunk.com_clustermanagers.yaml +++ b/config/crd/bases/enterprise.splunk.com_clustermanagers.yaml @@ -1002,10 +1002,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1030,6 +1032,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1041,8 +1045,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1080,6 +1090,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1110,21 +1122,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1133,8 +1152,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1244,19 +1274,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1382,12 +1418,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1509,6 +1546,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1585,6 +1627,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2263,6 +2310,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -2271,8 +2319,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -2280,21 +2333,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -2303,11 +2363,30 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2549,19 +2628,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4374,11 +4459,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4404,6 +4491,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4415,8 +4504,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4455,6 +4550,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4485,21 +4582,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4509,8 +4614,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: @@ -4738,6 +4854,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -4746,8 +4863,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -4755,21 +4877,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -4778,9 +4907,23 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object telAppInstalled: description: Telemetry App installation flag diff --git a/config/crd/bases/enterprise.splunk.com_clustermasters.yaml b/config/crd/bases/enterprise.splunk.com_clustermasters.yaml index 3daa773d4..77b835376 100644 --- a/config/crd/bases/enterprise.splunk.com_clustermasters.yaml +++ b/config/crd/bases/enterprise.splunk.com_clustermasters.yaml @@ -998,10 +998,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1026,6 +1028,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1037,8 +1041,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1076,6 +1086,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1106,21 +1118,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1129,8 +1148,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1240,19 +1270,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1378,12 +1414,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1505,6 +1542,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1581,6 +1623,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2259,6 +2306,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -2267,8 +2315,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -2276,21 +2329,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -2299,11 +2359,30 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2545,19 +2624,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4370,11 +4455,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4400,6 +4487,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4411,8 +4500,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4451,6 +4546,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4481,21 +4578,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4505,8 +4610,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: @@ -4731,6 +4847,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -4739,8 +4856,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -4748,21 +4870,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -4771,9 +4900,23 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object telAppInstalled: description: Telemetry App installation flag diff --git a/config/crd/bases/enterprise.splunk.com_indexerclusters.yaml b/config/crd/bases/enterprise.splunk.com_indexerclusters.yaml index dec160160..8ae972d7c 100644 --- a/config/crd/bases/enterprise.splunk.com_indexerclusters.yaml +++ b/config/crd/bases/enterprise.splunk.com_indexerclusters.yaml @@ -1092,19 +1092,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1230,12 +1236,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1357,6 +1364,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1433,6 +1445,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2044,6 +2061,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2285,19 +2307,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -5278,19 +5306,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -5416,12 +5450,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -5543,6 +5578,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -5705,6 +5745,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -5730,8 +5775,7 @@ spec: type: integer type: object replicas: - description: Number of search head pods; a search head cluster will - be created if > 1 + description: Number of indexer cluster peers format: int32 type: integer resources: @@ -6316,6 +6360,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -6557,19 +6606,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ diff --git a/config/crd/bases/enterprise.splunk.com_ingestorclusters.yaml b/config/crd/bases/enterprise.splunk.com_ingestorclusters.yaml index 380109fb8..44238ca7a 100644 --- a/config/crd/bases/enterprise.splunk.com_ingestorclusters.yaml +++ b/config/crd/bases/enterprise.splunk.com_ingestorclusters.yaml @@ -998,10 +998,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1026,6 +1028,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1037,8 +1041,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1076,6 +1086,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1106,21 +1118,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1129,8 +1148,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1240,19 +1270,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1378,12 +1414,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1505,6 +1542,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1667,6 +1709,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2279,6 +2326,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2520,19 +2572,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4354,11 +4412,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4384,6 +4444,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4395,8 +4457,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4435,6 +4503,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4465,21 +4535,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4489,8 +4567,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: diff --git a/config/crd/bases/enterprise.splunk.com_licensemanagers.yaml b/config/crd/bases/enterprise.splunk.com_licensemanagers.yaml index e4c5d9bb1..b65b6beaf 100644 --- a/config/crd/bases/enterprise.splunk.com_licensemanagers.yaml +++ b/config/crd/bases/enterprise.splunk.com_licensemanagers.yaml @@ -992,10 +992,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1020,6 +1022,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1031,8 +1035,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1070,6 +1080,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1100,21 +1112,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1123,8 +1142,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1234,19 +1264,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1372,12 +1408,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1499,6 +1536,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1575,6 +1617,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2181,6 +2228,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2422,19 +2474,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4248,11 +4306,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4278,6 +4338,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4289,8 +4351,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4329,6 +4397,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4359,21 +4429,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4383,8 +4461,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: diff --git a/config/crd/bases/enterprise.splunk.com_licensemasters.yaml b/config/crd/bases/enterprise.splunk.com_licensemasters.yaml index 75fbb64c1..c2a96b9e7 100644 --- a/config/crd/bases/enterprise.splunk.com_licensemasters.yaml +++ b/config/crd/bases/enterprise.splunk.com_licensemasters.yaml @@ -987,10 +987,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1015,6 +1017,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1026,8 +1030,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1065,6 +1075,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1095,21 +1107,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1118,8 +1137,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1229,19 +1259,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1367,12 +1403,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1494,6 +1531,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1570,6 +1612,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2176,6 +2223,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2417,19 +2469,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4243,11 +4301,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4273,6 +4333,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4284,8 +4346,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4324,6 +4392,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4354,21 +4424,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4378,8 +4456,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: diff --git a/config/crd/bases/enterprise.splunk.com_monitoringconsoles.yaml b/config/crd/bases/enterprise.splunk.com_monitoringconsoles.yaml index dc8feed93..f5142a14f 100644 --- a/config/crd/bases/enterprise.splunk.com_monitoringconsoles.yaml +++ b/config/crd/bases/enterprise.splunk.com_monitoringconsoles.yaml @@ -994,10 +994,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1022,6 +1024,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1033,8 +1037,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1072,6 +1082,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1102,21 +1114,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1125,8 +1144,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1236,19 +1266,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1374,12 +1410,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1501,6 +1538,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1577,6 +1619,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2183,6 +2230,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2424,19 +2476,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4249,11 +4307,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4279,6 +4339,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4290,8 +4352,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4330,6 +4398,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4360,21 +4430,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4384,8 +4462,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: @@ -5525,10 +5614,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -5553,6 +5644,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -5564,8 +5657,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -5603,6 +5702,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -5633,21 +5734,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -5656,8 +5764,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -5767,19 +5886,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -5905,12 +6030,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -6032,6 +6158,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -6108,6 +6239,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -6714,6 +6850,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -6955,19 +7096,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -8780,11 +8927,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -8810,6 +8959,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -8821,8 +8972,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -8861,6 +9018,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -8891,21 +9050,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -8915,8 +9082,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: diff --git a/config/crd/bases/enterprise.splunk.com_queues.yaml b/config/crd/bases/enterprise.splunk.com_queues.yaml index adcb65b3d..5bf76f967 100644 --- a/config/crd/bases/enterprise.splunk.com_queues.yaml +++ b/config/crd/bases/enterprise.splunk.com_queues.yaml @@ -58,6 +58,7 @@ spec: description: Provider of queue resources enum: - sqs + - sqs_cp type: string sqs: description: sqs specific inputs @@ -85,21 +86,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -108,8 +116,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array required: - dlq @@ -130,8 +149,8 @@ spec: rule: self.sqs.dlq == oldSelf.sqs.dlq - message: sqs.endpoint is immutable once created rule: self.sqs.endpoint == oldSelf.sqs.endpoint - - message: sqs must be provided when provider is sqs - rule: self.provider != 'sqs' || has(self.sqs) + - message: sqs must be provided when provider is sqs or sqs_cp + rule: (self.provider != 'sqs' && self.provider != 'sqs_cp') || has(self.sqs) status: description: QueueStatus defines the observed state of Queue properties: diff --git a/config/crd/bases/enterprise.splunk.com_searchheadclusters.yaml b/config/crd/bases/enterprise.splunk.com_searchheadclusters.yaml index a905f1f36..4f4674b32 100644 --- a/config/crd/bases/enterprise.splunk.com_searchheadclusters.yaml +++ b/config/crd/bases/enterprise.splunk.com_searchheadclusters.yaml @@ -1000,10 +1000,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1028,6 +1030,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1039,8 +1043,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1078,6 +1088,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1108,21 +1120,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1131,8 +1150,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1242,19 +1272,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1380,12 +1416,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1507,6 +1544,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1583,6 +1625,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2194,6 +2241,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2435,19 +2487,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4272,11 +4330,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4302,6 +4362,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4313,8 +4375,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4353,6 +4421,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4383,21 +4453,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4407,8 +4485,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: @@ -5618,10 +5707,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -5646,6 +5737,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -5657,8 +5750,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -5696,6 +5795,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -5726,21 +5827,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -5749,8 +5857,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -6117,19 +6236,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -6255,12 +6380,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -6382,6 +6508,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -6458,6 +6589,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -6483,6 +6619,7 @@ spec: type: integer type: object replicas: + default: 3 description: Number of search head pods; a search head cluster will be created if > 1 format: int32 @@ -7069,6 +7206,11 @@ spec: type: object type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -7310,19 +7452,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -9147,11 +9295,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -9177,6 +9327,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -9188,8 +9340,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -9228,6 +9386,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -9258,21 +9418,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -9282,8 +9450,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: diff --git a/config/crd/bases/enterprise.splunk.com_standalones.yaml b/config/crd/bases/enterprise.splunk.com_standalones.yaml index 39373448c..8c8c5035c 100644 --- a/config/crd/bases/enterprise.splunk.com_standalones.yaml +++ b/config/crd/bases/enterprise.splunk.com_standalones.yaml @@ -995,10 +995,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -1023,6 +1025,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1034,8 +1038,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -1073,6 +1083,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -1103,21 +1115,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -1126,8 +1145,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -1237,19 +1267,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -1375,12 +1411,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -1502,6 +1539,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -1578,6 +1620,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -2260,6 +2307,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -2268,8 +2316,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -2277,21 +2330,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -2300,11 +2360,30 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -2546,19 +2625,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -4372,11 +4457,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -4402,6 +4489,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4413,8 +4502,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -4453,6 +4548,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -4483,21 +4580,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -4507,8 +4612,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: @@ -4730,6 +4846,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -4738,8 +4855,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -4747,21 +4869,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -4770,9 +4899,23 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object telAppInstalled: description: Telemetry App installation flag @@ -5770,10 +5913,12 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when scope @@ -5798,6 +5943,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -5809,8 +5956,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -5848,6 +6001,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -5878,21 +6033,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -5901,8 +6063,19 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object clusterManagerRef: @@ -6012,19 +6185,25 @@ spec: description: Storage configuration for /opt/splunk/etc volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' extraEnv: description: |- ExtraEnv refers to extra environment variables to be passed to the Splunk instance containers @@ -6150,12 +6329,13 @@ spec: environment variables) type: string imagePullPolicy: + default: IfNotPresent description: 'Sets pull policy for all images ("Always", "Never", or the default: "IfNotPresent")' enum: - Always - - Never - IfNotPresent + - Never type: string imagePullSecrets: description: |- @@ -6277,6 +6457,11 @@ spec: minimum: 0 type: integer livenessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 description: LivenessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command properties: failureThreshold: @@ -6353,6 +6538,11 @@ spec: minimum: 0 type: integer readinessProbe: + default: + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 5 description: ReadinessProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes properties: failureThreshold: @@ -6378,6 +6568,7 @@ spec: type: integer type: object replicas: + default: 1 description: Number of standalone pods format: int32 type: integer @@ -7035,6 +7226,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -7043,8 +7235,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -7052,21 +7249,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -7075,11 +7279,30 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object startupProbe: + default: + failureThreshold: 12 + initialDelaySeconds: 40 + periodSeconds: 30 + timeoutSeconds: 30 description: StartupProbe as defined in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes properties: failureThreshold: @@ -7321,19 +7544,25 @@ spec: description: Storage configuration for /opt/splunk/var volume properties: ephemeralStorage: - description: |- - If true, ephemeral (emptyDir) storage will be used - default false + default: false + description: If true, ephemeral (emptyDir) storage will be used type: boolean storageCapacity: description: Storage capacity to request persistent volume claims - (default=”10Gi” for etc and "100Gi" for var) + (default="10Gi" for etc and "100Gi" for var) type: string storageClassName: description: Name of StorageClass to use for persistent volume claims type: string type: object + x-kubernetes-validations: + - message: storageClassName and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageClassName) > 0 && self.ephemeralStorage + == true)' + - message: storageCapacity and ephemeralStorage are mutually exclusive + rule: '!(size(self.storageCapacity) > 0 && self.ephemeralStorage + == true)' volumes: description: List of one or more Kubernetes volumes. These will be mounted in all pod containers as as /mnt/ @@ -9147,11 +9376,13 @@ spec: properties: location: description: Location relative to the volume path + minLength: 1 type: string name: description: Logical name for the set of apps placed in this location. Logical name must be unique to the appRepo + minLength: 1 type: string premiumAppsProps: description: Properties for premium apps, fill in when @@ -9177,6 +9408,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -9188,8 +9421,14 @@ spec: volumeName: description: Remote Storage Volume name type: string + required: + - location + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map appsRepoPollIntervalSeconds: description: |- Interval in seconds to check the Remote Storage for App changes. @@ -9228,6 +9467,8 @@ spec: type: description: 'Type: enterpriseSecurity for now, can accommodate itsi etc.. later' + enum: + - enterpriseSecurity type: string type: object scope: @@ -9258,21 +9499,29 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where - apps reside. Used for aws, if provided. Not used for - minio and azure. + apps reside. Required for aws, optional for azure + and gcp. type: string secretRef: description: Secret object name @@ -9282,8 +9531,19 @@ spec: s3, blob, gcs. s3 works with aws or minio providers, whereas blob works with azure provider, gcs works for gcp.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array type: object appSrcDeployStatus: @@ -9508,6 +9768,7 @@ spec: type: integer name: description: Splunk index name + minLength: 1 type: string remotePath: description: Index location relative to the remote volume @@ -9516,8 +9777,13 @@ spec: volumeName: description: Remote Volume name type: string + required: + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map volumes: description: List of remote storage volumes items: @@ -9525,21 +9791,28 @@ spec: properties: endpoint: description: Remote volume URI + minLength: 1 type: string name: description: Remote volume name + minLength: 1 type: string path: description: Remote volume path + minLength: 1 type: string provider: description: 'App Package Remote Store provider. Supported values: aws, minio, azure, gcp.' + enum: + - aws + - minio + - azure + - gcp type: string region: description: Region of the remote storage volume where apps - reside. Used for aws, if provided. Not used for minio - and azure. + reside. Required for aws, optional for azure and gcp. type: string secretRef: description: Secret object name @@ -9548,9 +9821,23 @@ spec: description: '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.' + enum: + - s3 + - blob + - gcs type: string + required: + - endpoint + - name + - path type: object + x-kubernetes-validations: + - message: region is required when provider is aws + rule: self.provider != 'aws' || size(self.region) > 0 type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map type: object telAppInstalled: description: Telemetry App installation flag diff --git a/docs/IndexIngestionSeparation.md b/docs/IndexIngestionSeparation.md index 3d5c43e7f..1a06606fe 100644 --- a/docs/IndexIngestionSeparation.md +++ b/docs/IndexIngestionSeparation.md @@ -36,8 +36,8 @@ Queue inputs can be found in the table below. As of now, only SQS provider of me | Key | Type | Description | | ---------- | ------- | ------------------------------------------------- | -| provider | string | [Required] Provider of message queue (Allowed values: sqs) | -| sqs | SQS | [Required if provider=sqs] SQS message queue inputs | +| provider | string | [Required] Provider of message queue (Allowed values: sqs, sqs_cp) | +| sqs | SQS | [Required if provider=sqs or provider=sqs_cp] SQS message queue inputs | SQS message queue inputs can be found in the table below. diff --git a/internal/controller/indexercluster_controller.go b/internal/controller/indexercluster_controller.go index 3beace6ad..ddc8b17c9 100644 --- a/internal/controller/indexercluster_controller.go +++ b/internal/controller/indexercluster_controller.go @@ -186,7 +186,7 @@ func (r *IndexerClusterReconciler) SetupWithManager(mgr ctrl.Manager) error { continue } - if queue.Spec.Provider != "sqs" { + if queue.Spec.Provider != "sqs" && queue.Spec.Provider != "sqs_cp" { continue } diff --git a/internal/controller/ingestorcluster_controller.go b/internal/controller/ingestorcluster_controller.go index eadc6fa7a..2725d32a6 100644 --- a/internal/controller/ingestorcluster_controller.go +++ b/internal/controller/ingestorcluster_controller.go @@ -169,7 +169,7 @@ func (r *IngestorClusterReconciler) SetupWithManager(mgr ctrl.Manager) error { continue } - if queue.Spec.Provider != "sqs" { + if queue.Spec.Provider != "sqs" && queue.Spec.Provider != "sqs_cp" { continue } diff --git a/pkg/splunk/enterprise/indexercluster.go b/pkg/splunk/enterprise/indexercluster.go index 6cb3aa332..c9e65e9f3 100644 --- a/pkg/splunk/enterprise/indexercluster.go +++ b/pkg/splunk/enterprise/indexercluster.go @@ -1402,6 +1402,10 @@ func getQueueAndObjectStorageInputsForIndexerConfFiles(queue *enterpriseApi.Queu dlq := "" if queue.Provider == "sqs" { queueProvider = "sqs_smartbus" + } else if queue.Provider == "sqs_cp" { + queueProvider = "sqs_smartbus_cp" + } + if queue.Provider == "sqs" || queue.Provider == "sqs_cp" { authRegion = queue.SQS.AuthRegion endpoint = queue.SQS.Endpoint dlq = queue.SQS.DLQ @@ -1411,7 +1415,11 @@ func getQueueAndObjectStorageInputsForIndexerConfFiles(queue *enterpriseApi.Queu osEndpoint := "" osProvider := "" if os.Provider == "s3" { - osProvider = "sqs_smartbus" + if queueProvider == "sqs_smartbus" { + osProvider = "sqs_smartbus" + } else if queueProvider == "sqs_smartbus_cp" { + osProvider = "sqs_smartbus_cp" + } osEndpoint = os.S3.Endpoint path = os.S3.Path if !strings.HasPrefix(path, "s3://") { diff --git a/pkg/splunk/enterprise/indexercluster_test.go b/pkg/splunk/enterprise/indexercluster_test.go index 6aa5dc5f6..ad97ab2e8 100644 --- a/pkg/splunk/enterprise/indexercluster_test.go +++ b/pkg/splunk/enterprise/indexercluster_test.go @@ -2186,6 +2186,92 @@ func TestGetQueueAndPipelineInputsForIndexerConfFiles(t *testing.T) { }, pipelineChangedFields) } +func TestGetQueueAndPipelineInputsForIndexerConfFilesSQSCP(t *testing.T) { + provider := "sqs_smartbus_cp" + + queue := &enterpriseApi.Queue{ + TypeMeta: metav1.TypeMeta{ + Kind: "Queue", + APIVersion: "enterprise.splunk.com/v4", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "queue", + }, + Spec: enterpriseApi.QueueSpec{ + Provider: "sqs_cp", + SQS: enterpriseApi.SQSSpec{ + Name: "test-queue", + AuthRegion: "us-west-2", + Endpoint: "https://sqs.us-west-2.amazonaws.com", + DLQ: "sqs-dlq-test", + VolList: []enterpriseApi.VolumeSpec{ + {SecretRef: "secret"}, + }, + }, + }, + } + + os := &enterpriseApi.ObjectStorage{ + TypeMeta: metav1.TypeMeta{ + Kind: "ObjectStorage", + APIVersion: "enterprise.splunk.com/v4", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "os", + }, + Spec: enterpriseApi.ObjectStorageSpec{ + Provider: "s3", + S3: enterpriseApi.S3Spec{ + Endpoint: "https://s3.us-west-2.amazonaws.com", + Path: "bucket/key", + }, + }, + } + + key := "key" + secret := "secret" + + queueChangedFieldsInputs, queueChangedFieldsOutputs, pipelineChangedFields := getQueueAndPipelineInputsForIndexerConfFiles(&queue.Spec, &os.Spec, key, secret) + assert.Equal(t, 10, len(queueChangedFieldsInputs)) + assert.Equal(t, [][]string{ + {"remote_queue.type", provider}, + {fmt.Sprintf("remote_queue.%s.auth_region", provider), queue.Spec.SQS.AuthRegion}, + {fmt.Sprintf("remote_queue.%s.endpoint", provider), queue.Spec.SQS.Endpoint}, + {fmt.Sprintf("remote_queue.%s.large_message_store.endpoint", provider), os.Spec.S3.Endpoint}, + {fmt.Sprintf("remote_queue.%s.large_message_store.path", provider), "s3://" + os.Spec.S3.Path}, + {fmt.Sprintf("remote_queue.%s.dead_letter_queue.name", provider), queue.Spec.SQS.DLQ}, + {fmt.Sprintf("remote_queue.%s.max_count.max_retries_per_part", provider), "4"}, + {fmt.Sprintf("remote_queue.%s.retry_policy", provider), "max_count"}, + {fmt.Sprintf("remote_queue.%s.access_key", provider), key}, + {fmt.Sprintf("remote_queue.%s.secret_key", provider), secret}, + }, queueChangedFieldsInputs) + + assert.Equal(t, 12, len(queueChangedFieldsOutputs)) + assert.Equal(t, [][]string{ + {"remote_queue.type", provider}, + {fmt.Sprintf("remote_queue.%s.auth_region", provider), queue.Spec.SQS.AuthRegion}, + {fmt.Sprintf("remote_queue.%s.endpoint", provider), queue.Spec.SQS.Endpoint}, + {fmt.Sprintf("remote_queue.%s.large_message_store.endpoint", provider), os.Spec.S3.Endpoint}, + {fmt.Sprintf("remote_queue.%s.large_message_store.path", provider), "s3://" + os.Spec.S3.Path}, + {fmt.Sprintf("remote_queue.%s.dead_letter_queue.name", provider), queue.Spec.SQS.DLQ}, + {fmt.Sprintf("remote_queue.%s.max_count.max_retries_per_part", provider), "4"}, + {fmt.Sprintf("remote_queue.%s.retry_policy", provider), "max_count"}, + {fmt.Sprintf("remote_queue.%s.access_key", provider), key}, + {fmt.Sprintf("remote_queue.%s.secret_key", provider), secret}, + {fmt.Sprintf("remote_queue.%s.send_interval", provider), "5s"}, + {fmt.Sprintf("remote_queue.%s.encoding_format", provider), "s2s"}, + }, queueChangedFieldsOutputs) + + assert.Equal(t, 5, len(pipelineChangedFields)) + assert.Equal(t, [][]string{ + {"pipeline:remotequeueruleset", "disabled", "false"}, + {"pipeline:ruleset", "disabled", "true"}, + {"pipeline:remotequeuetyping", "disabled", "false"}, + {"pipeline:remotequeueoutput", "disabled", "false"}, + {"pipeline:typing", "disabled", "true"}, + }, pipelineChangedFields) +} + func TestUpdateIndexerConfFiles(t *testing.T) { c := spltest.NewMockClient() ctx := context.TODO() diff --git a/pkg/splunk/enterprise/ingestorcluster.go b/pkg/splunk/enterprise/ingestorcluster.go index 86ea854f2..b0f866413 100644 --- a/pkg/splunk/enterprise/ingestorcluster.go +++ b/pkg/splunk/enterprise/ingestorcluster.go @@ -423,6 +423,10 @@ func getQueueAndObjectStorageInputsForIngestorConfFiles(queue *enterpriseApi.Que dlq := "" if queue.Provider == "sqs" { queueProvider = "sqs_smartbus" + } else if queue.Provider == "sqs_cp" { + queueProvider = "sqs_smartbus_cp" + } + if queue.Provider == "sqs" || queue.Provider == "sqs_cp" { authRegion = queue.SQS.AuthRegion endpoint = queue.SQS.Endpoint dlq = queue.SQS.DLQ @@ -432,7 +436,11 @@ func getQueueAndObjectStorageInputsForIngestorConfFiles(queue *enterpriseApi.Que osEndpoint := "" osProvider := "" if os.Provider == "s3" { - osProvider = "sqs_smartbus" + if queueProvider == "sqs_smartbus" { + osProvider = "sqs_smartbus" + } else if queueProvider == "sqs_smartbus_cp" { + osProvider = "sqs_smartbus_cp" + } osEndpoint = os.S3.Endpoint path = os.S3.Path if !strings.HasPrefix(path, "s3://") { diff --git a/pkg/splunk/enterprise/ingestorcluster_test.go b/pkg/splunk/enterprise/ingestorcluster_test.go index ce5ed431f..e96002372 100644 --- a/pkg/splunk/enterprise/ingestorcluster_test.go +++ b/pkg/splunk/enterprise/ingestorcluster_test.go @@ -478,6 +478,80 @@ func TestGetQueueAndPipelineInputsForIngestorConfFiles(t *testing.T) { }, pipelineInputs) } +func TestGetQueueAndPipelineInputsForIngestorConfFilesSQSCP(t *testing.T) { + provider := "sqs_smartbus_cp" + + queue := enterpriseApi.Queue{ + TypeMeta: metav1.TypeMeta{ + Kind: "Queue", + APIVersion: "enterprise.splunk.com/v4", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "queue", + }, + Spec: enterpriseApi.QueueSpec{ + Provider: "sqs_cp", + SQS: enterpriseApi.SQSSpec{ + Name: "test-queue", + AuthRegion: "us-west-2", + Endpoint: "https://sqs.us-west-2.amazonaws.com", + DLQ: "sqs-dlq-test", + VolList: []enterpriseApi.VolumeSpec{ + {SecretRef: "secret"}, + }, + }, + }, + } + + os := enterpriseApi.ObjectStorage{ + TypeMeta: metav1.TypeMeta{ + Kind: "ObjectStorage", + APIVersion: "enterprise.splunk.com/v4", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "os", + }, + Spec: enterpriseApi.ObjectStorageSpec{ + Provider: "s3", + S3: enterpriseApi.S3Spec{ + Endpoint: "https://s3.us-west-2.amazonaws.com", + Path: "bucket/key", + }, + }, + } + + key := "key" + secret := "secret" + + queueInputs, pipelineInputs := getQueueAndPipelineInputsForIngestorConfFiles(&queue.Spec, &os.Spec, key, secret) + + assert.Equal(t, 12, len(queueInputs)) + assert.Equal(t, [][]string{ + {"remote_queue.type", provider}, + {fmt.Sprintf("remote_queue.%s.auth_region", provider), queue.Spec.SQS.AuthRegion}, + {fmt.Sprintf("remote_queue.%s.endpoint", provider), queue.Spec.SQS.Endpoint}, + {fmt.Sprintf("remote_queue.%s.large_message_store.endpoint", provider), os.Spec.S3.Endpoint}, + {fmt.Sprintf("remote_queue.%s.large_message_store.path", provider), "s3://" + os.Spec.S3.Path}, + {fmt.Sprintf("remote_queue.%s.dead_letter_queue.name", provider), queue.Spec.SQS.DLQ}, + {fmt.Sprintf("remote_queue.%s.encoding_format", provider), "s2s"}, + {fmt.Sprintf("remote_queue.%s.max_count.max_retries_per_part", provider), "4"}, + {fmt.Sprintf("remote_queue.%s.retry_policy", provider), "max_count"}, + {fmt.Sprintf("remote_queue.%s.send_interval", provider), "5s"}, + {fmt.Sprintf("remote_queue.%s.access_key", provider), key}, + {fmt.Sprintf("remote_queue.%s.secret_key", provider), secret}, + }, queueInputs) + + assert.Equal(t, 6, len(pipelineInputs)) + assert.Equal(t, [][]string{ + {"pipeline:remotequeueruleset", "disabled", "false"}, + {"pipeline:ruleset", "disabled", "true"}, + {"pipeline:remotequeuetyping", "disabled", "false"}, + {"pipeline:remotequeueoutput", "disabled", "false"}, + {"pipeline:typing", "disabled", "true"}, + {"pipeline:indexerPipe", "disabled", "true"}, + }, pipelineInputs) +} + func TestUpdateIngestorConfFiles(t *testing.T) { c := spltest.NewMockClient() ctx := context.TODO() diff --git a/pkg/splunk/enterprise/names.go b/pkg/splunk/enterprise/names.go index 623f361f8..e49782f59 100644 --- a/pkg/splunk/enterprise/names.go +++ b/pkg/splunk/enterprise/names.go @@ -201,10 +201,10 @@ access = read : [ * ], write : [ admin ] ` // Command to create telemetry app on non SHC scenarios - createTelAppNonShcString = "mkdir -p /opt/splunk/etc/apps/app_tel_for_sok/default/; mkdir -p /opt/splunk/etc/apps/app_tel_for_sok/metadata/; echo -e \"%s\" > /opt/splunk/etc/apps/app_tel_for_sok/default/app.conf; echo -e \"%s\" > /opt/splunk/etc/apps/app_tel_for_sok/metadata/default.meta" + createTelAppNonShcString = "mkdir -p /opt/splunk/etc/apps/app_tel_for_sok/default/; mkdir -p /opt/splunk/etc/apps/app_tel_for_sok/metadata/; printf '%%s' \"%s\" > /opt/splunk/etc/apps/app_tel_for_sok/default/app.conf; printf '%%s' \"%s\" > /opt/splunk/etc/apps/app_tel_for_sok/metadata/default.meta" // Command to create telemetry app on SHC scenarios - createTelAppShcString = "mkdir -p %s/app_tel_for_sok/default/; mkdir -p %s/app_tel_for_sok/metadata/; echo -e \"%s\" > %s/app_tel_for_sok/default/app.conf; echo -e \"%s\" > %s/app_tel_for_sok/metadata/default.meta" + createTelAppShcString = "mkdir -p %s/app_tel_for_sok/default/; mkdir -p %s/app_tel_for_sok/metadata/; printf '%%s' \"%s\" > %s/app_tel_for_sok/default/app.conf; printf '%%s' \"%s\" > %s/app_tel_for_sok/metadata/default.meta" // Command to reload app configuration telAppReloadString = "curl -k -u admin:`cat /mnt/splunk-secrets/password` https://localhost:8089/services/apps/local/_reload" diff --git a/pkg/splunk/enterprise/util.go b/pkg/splunk/enterprise/util.go index a2e655e01..cc48f69a7 100644 --- a/pkg/splunk/enterprise/util.go +++ b/pkg/splunk/enterprise/util.go @@ -2639,7 +2639,7 @@ func ResolveQueueAndObjectStorage(ctx context.Context, c splcommon.ControllerCli } cfg.Queue = queue.Spec } - if cfg.Queue.Provider == "sqs" { + if cfg.Queue.Provider == "sqs" || cfg.Queue.Provider == "sqs_cp" { if cfg.Queue.SQS.Endpoint == "" && cfg.Queue.SQS.AuthRegion != "" { ep, err := resolveSQSEndpoint(ctx, cfg.Queue.SQS.AuthRegion) if err != nil { @@ -2670,7 +2670,7 @@ func ResolveQueueAndObjectStorage(ctx context.Context, c splcommon.ControllerCli } } - if cfg.Queue.Provider == "sqs" && serviceAccount == "" { + if (cfg.Queue.Provider == "sqs" || cfg.Queue.Provider == "sqs_cp") && serviceAccount == "" { for _, vol := range cfg.Queue.SQS.VolList { if vol.SecretRef != "" { accessKey, secretKey, version, err := GetQueueRemoteVolumeSecrets(ctx, vol, c, cr) diff --git a/test/trigger-tests.sh b/test/trigger-tests.sh index b04698e0c..dce729e03 100644 --- a/test/trigger-tests.sh +++ b/test/trigger-tests.sh @@ -147,6 +147,11 @@ kubectl patch configmap splunk-operator-manager-telemetry -n splunk-operator --t echo "Skipping following test :: ${TEST_TO_SKIP}" +TIMESTAMP=$(date +%Y%m%d-%H%M%S) +REPORT_FILENAME="report-junit-${TIMESTAMP}${GITHUB_RUN_ID:+-${GITHUB_RUN_ID}}-${TEST_TO_RUN:-all}.xml" + +TEST_TIMEOUT="${TEST_TIMEOUT:-225m}" + # Running only smoke test cases by default or value passed through TEST_FOCUS env variable. To run different test packages add/remove path from focus argument or TEST_FOCUS variable -echo "ginkgo --junit-report=inttest.xml -v --keep-going --trace -r --timeout=7h -nodes=${CLUSTER_NODES} --focus="${TEST_TO_RUN}" --skip="${TEST_TO_SKIP}" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE}" -ginkgo --junit-report=inttest-junit.xml --output-dir=`pwd` -v --keep-going --trace -r --timeout=7h -nodes=${CLUSTER_NODES} --focus="${TEST_TO_RUN}" --skip="${TEST_TO_SKIP}" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE} \ No newline at end of file +echo "ginkgo --junit-report=${REPORT_FILENAME} -v --keep-going --trace -r --timeout=${TEST_TIMEOUT} -nodes=${CLUSTER_NODES} --focus=\"${TEST_TO_RUN}\" --skip=\"${TEST_TO_SKIP}\" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE}" +ginkgo --junit-report=${REPORT_FILENAME} --output-dir=`pwd` -v --keep-going --trace -r --timeout=${TEST_TIMEOUT} -nodes=${CLUSTER_NODES} --focus="${TEST_TO_RUN}" --skip="${TEST_TO_SKIP}" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE} \ No newline at end of file