Skip to content

Commit dd87779

Browse files
authored
Merge pull request #1354 from splunk/promote-develop-to-main-2.6.0
Promote Develop to main for Splunk Operator Release 2.6.0
2 parents dafc9d3 + 17c4f57 commit dd87779

File tree

78 files changed

+1005
-346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1005
-346
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ KUBECTL_VERSION=v1.29.1
66
AZ_CLI_VERSION=2.30.0
77
EKSCTL_VERSION=v0.143.0
88
EKS_CLUSTER_K8_VERSION=1.27
9-
SPLUNK_ENTERPRISE_RELEASE_IMAGE=splunk/splunk:9.1.3
9+
SPLUNK_ENTERPRISE_RELEASE_IMAGE=splunk/splunk:9.2.2

.github/workflows/automated-release-workflow.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
pull-requests: write
2121
if: github.ref == 'refs/heads/main'
2222
steps:
23+
- name: Set up cosign
24+
uses: sigstore/cosign-installer@main
25+
2326
- name: Checkout code
2427
uses: actions/checkout@v2
2528

@@ -87,4 +90,18 @@ jobs:
8790
8891
- name: Push Release Image
8992
run: |
90-
docker push splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
93+
docker push splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
94+
95+
- name: Sign Splunk Operator image with a key
96+
run: |
97+
cosign sign --yes --key env://COSIGN_PRIVATE_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
98+
env:
99+
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
100+
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
101+
102+
- name: Verify Splunk Operator image with a key
103+
run: |
104+
cosign verify --key env://COSIGN_PUBLIC_KEY splunk/splunk-operator:${{ github.event.inputs.operator_image_tag }}
105+
env:
106+
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
107+

.github/workflows/build-test-push-workflow.yml

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
5555
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
5656
steps:
57+
- name: Set up cosign
58+
uses: sigstore/cosign-installer@main
59+
5760
- uses: actions/checkout@v2
5861
- name: Dotenv Action
5962
id: dotenv
@@ -84,22 +87,41 @@ jobs:
8487
- name: Login to Amazon ECR
8588
id: login-ecr
8689
uses: aws-actions/amazon-ecr-login@v1
90+
- name: Login to Redhat registry
91+
uses: docker/login-action@v3
92+
with:
93+
registry: registry.redhat.io
94+
username: ${{ secrets.REDHAT_REGISTRY_ID }}
95+
password: ${{ secrets.REDHAT_REGISTRY_PASSWORD }}
8796
- name: Make Splunk Operator Image
8897
run: |
8998
make docker-build IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
9099
- name: Push Splunk Operator Image to ECR
91100
run: |
92101
echo "Uploading Image to ECR:: ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA"
93-
make docker-push IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
102+
make docker-push IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
103+
- name: Sign Splunk Operator image with a key
104+
run: |
105+
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
106+
env:
107+
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
108+
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
94109
vulnerability-scan:
110+
permissions:
111+
actions: read
112+
contents: read
113+
security-events: write
95114
runs-on: ubuntu-latest
96115
needs: build-operator-image
97116
env:
98117
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }}
99118
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
100119
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
101120
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
121+
IMAGE_NAME: ${{ secrets.ECR_REPOSITORY }}/splunk/splunk-operator:${{ github.sha }}
102122
steps:
123+
- name: Set up cosign
124+
uses: sigstore/cosign-installer@main
103125
- uses: actions/checkout@v2
104126
- name: Dotenv Action
105127
id: dotenv
@@ -112,22 +134,30 @@ jobs:
112134
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
113135
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
114136
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
137+
115138
- name: Login to Amazon ECR
116139
uses: aws-actions/amazon-ecr-login@v1
117140
- name: Pull Splunk Operator Image Locally
118141
run: |
119-
docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
120-
- name: Setup clair scanner
121-
run: make setup_clair_scanner
122-
- name: Scan container image
123-
run: make run_clair_scan IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
124-
- name: Stop clair scanner
125-
run: make stop_clair_scanner
126-
- name: Save scan results as artifacts
127-
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2
142+
docker pull ${{ env.IMAGE_NAME }}
143+
- name: Verify Signed Splunk Operator image
144+
run: |
145+
cosign verify --key env://COSIGN_PUBLIC_KEY ${{ env.IMAGE_NAME }}
146+
env:
147+
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
148+
- name: Run Trivy vulnerability scanner
149+
uses: aquasecurity/trivy-action@master
150+
with:
151+
image-ref: '${{ env.IMAGE_NAME }}'
152+
format: sarif
153+
#exit-code: 1
154+
severity: 'CRITICAL'
155+
ignore-unfixed: true
156+
output: 'trivy-results.sarif'
157+
- name: Upload Trivy scan results to GitHub Security tab
158+
uses: github/codeql-action/upload-sarif@v3
128159
with:
129-
name: clair-scanner-logs
130-
path: clair-scanner-logs
160+
sarif_file: 'trivy-results.sarif'
131161
smoke-tests:
132162
needs: vulnerability-scan
133163
strategy:

.github/workflows/nightly-int-test-workflow.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ jobs:
207207
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
208208
TAG: edge
209209
steps:
210+
- name: Set up cosign
211+
uses: sigstore/cosign-installer@main
210212
- uses: actions/checkout@v2
211213
with:
212214
ref: develop
@@ -235,4 +237,16 @@ jobs:
235237
username: ${{ secrets.DOCKERHUB_USERNAME }}
236238
password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}}
237239
- name: Push Splunk Operator Image to Docker Hub
238-
run: docker push ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}
240+
run: docker push ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}
241+
- name: Sign Splunk Operator image with a key
242+
run: |
243+
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
244+
env:
245+
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
246+
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
247+
- name: Verify Signed Splunk Operator image
248+
run: |
249+
cosign verify --key env://COSIGN_PUBLIC_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}
250+
env:
251+
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
252+

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
2222

2323
# Use distroless as minimal base image to package the manager binary
2424
# Refer to https://github.com/GoogleContainerTools/distroless for more details
25-
FROM registry.access.redhat.com/ubi8/ubi:latest
26-
25+
FROM registry.access.redhat.com/ubi8/ubi:8.10
2726
ENV OPERATOR=/manager \
2827
USER_UID=1001 \
2928
USER_NAME=nonroot

api/v4/clustermanager_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ type ClusterManagerStatus struct {
6767

6868
// Telemetry App installation flag
6969
TelAppInstalled bool `json:"telAppInstalled"`
70+
71+
// Auxillary message describing CR status
72+
Message string `json:"message"`
7073
}
7174

7275
// BundlePushInfo Indicates if bundle push required
@@ -87,6 +90,7 @@ type BundlePushInfo struct {
8790
// +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".status.replicas",description="Desired number of indexer peers"
8891
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Current number of ready indexer peers"
8992
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of cluster manager"
93+
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message",description="Auxillary message describing CR status"
9094
// +kubebuilder:storageversion
9195
type ClusterManager struct {
9296
metav1.TypeMeta `json:",inline"`

api/v4/indexercluster_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ type IndexerClusterStatus struct {
108108

109109
// status of each indexer cluster peer
110110
Peers []IndexerClusterMemberStatus `json:"peers"`
111+
112+
// Auxillary message describing CR status
113+
Message string `json:"message"`
111114
}
112115

113116
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -123,6 +126,7 @@ type IndexerClusterStatus struct {
123126
// +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".status.replicas",description="Desired number of indexer peers"
124127
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Current number of ready indexer peers"
125128
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of indexer cluster"
129+
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message",description="Auxillary message describing CR status"
126130
// +kubebuilder:storageversion
127131
type IndexerCluster struct {
128132
metav1.TypeMeta `json:",inline"`

api/v4/licensemanager_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ type LicenseManagerStatus struct {
5252

5353
// Telemetry App installation flag
5454
TelAppInstalled bool `json:"telAppInstalled"`
55+
56+
// Auxillary message describing CR status
57+
Message string `json:"message"`
5558
}
5659

5760
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -62,6 +65,7 @@ type LicenseManagerStatus struct {
6265
// +kubebuilder:resource:path=licensemanagers,scope=Namespaced,shortName=lmanager
6366
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Status of license manager"
6467
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of license manager"
68+
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message",description="Auxillary message describing CR status"
6569
// +kubebuilder:storageversion
6670
type LicenseManager struct {
6771
metav1.TypeMeta `json:",inline"`

api/v4/monitoringconsole_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ type MonitoringConsoleStatus struct {
5858

5959
// App Framework status
6060
AppContext AppDeploymentContext `json:"appContext,omitempty"`
61+
62+
// Auxillary message describing CR status
63+
Message string `json:"message"`
6164
}
6265

6366
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -70,6 +73,7 @@ type MonitoringConsoleStatus struct {
7073
// +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".status.replicas",description="Desired number of monitoring console members"
7174
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Current number of ready monitoring console members"
7275
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of monitoring console"
76+
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message",description="Auxillary message describing CR status"
7377
// +kubebuilder:storageversion
7478
type MonitoringConsole struct {
7579
metav1.TypeMeta `json:",inline"`

api/v4/searchheadcluster_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ type SearchHeadClusterStatus struct {
119119

120120
// Telemetry App installation flag
121121
TelAppInstalled bool `json:"telAppInstalled"`
122+
123+
// Auxillary message describing CR status
124+
Message string `json:"message"`
122125
}
123126

124127
// SearchHeadCluster is the Schema for a Splunk Enterprise search head cluster
@@ -132,6 +135,7 @@ type SearchHeadClusterStatus struct {
132135
// +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".status.replicas",description="Desired number of search head cluster members"
133136
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Current number of ready search head cluster members"
134137
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of search head cluster"
138+
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message",description="Auxillary message describing CR status"
135139
// +kubebuilder:storageversion
136140
type SearchHeadCluster struct {
137141
metav1.TypeMeta `json:",inline"`

0 commit comments

Comments
 (0)