Skip to content

Commit 13cdef7

Browse files
Merge pull request #333 from fsferraz-rh/OSDCONMON-208-update-forwarder-image
OSDCONMON-208 updated splunk forwarder image reference
2 parents 1978d9d + 2cc7b1c commit 13cdef7

File tree

15 files changed

+109
-128
lines changed

15 files changed

+109
-128
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ boilerplate-update:
1010

1111
SHELL := /usr/bin/env bash
1212

13-
FORWARDER_IMAGE_TAG ?= 9.3.2-d8bb32809498-c43b7a7
13+
FORWARDER_IMAGE_TAG ?= 9.3.2-d8bb32809498-d0874e6
1414

1515
FORWARDER_NAME=splunk-forwarder
1616
FORWARDER_IMAGE_URI=$(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(FORWARDER_NAME):$(FORWARDER_IMAGE_TAG)

OWNERS_ALIASES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ aliases:
5252
- npecka
5353
- pshickeydev
5454
- casey-williams-rh
55+
- boranx
5556
srep-functional-team-thor:
5657
- bmeng
5758
- MitaliBhalla

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ metadata:
3535
name: example-splunkforwarder
3636
spec:
3737
image: dockerimageurl
38-
imageDigest: sha256:ee36e2f76856b262fb19096c0bba04fcf7e4399c7819d914d9b8554f119ab42a
38+
imageDigest: sha256:a9e19c1c213d093484bdac6220a3ec72fd121ff0ed250bddfcdc50ad2bd4fa07
3939
splunkLicenseAccepted: true
4040
clusterID: optional-cluster-name
4141
splunkInputs:
@@ -52,11 +52,11 @@ spec:
5252
The `image` and `imageDigest` are for the splunk-forwarder image.
5353
(The CRD supports `imageTag`, but this is deprecated in favor of `imageDigest`.)
5454

55-
To use the current version, `9.3.2-d8bb32809498-c43b7a7`, specify the following:
55+
To use the current version, `9.3.2-d8bb32809498-d0874e6`, specify the following:
5656
- For [splunk-forwarder](https://quay.io/repository/app-sre/splunk-forwarder?tag=8.2.5-77015bc7a462-f4d16f7):
5757
```yaml
5858
image: quay.io/app-sre/splunk-forwarder
59-
imageDigest: sha256:ee36e2f76856b262fb19096c0bba04fcf7e4399c7819d914d9b8554f119ab42a
59+
imageDigest: sha256:a9e19c1c213d093484bdac6220a3ec72fd121ff0ed250bddfcdc50ad2bd4fa07
6060
```
6161

6262
## Upgrading Splunk Universal Forwarder
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4311c1fe186c6a1b907566ae046cdfc9f354fb78
1+
5d599ff5771f30d4e09248ddcb116375b3a38102

boilerplate/openshift/golang-osd-operator-osde2e/e2e-harness-generate.sh

Lines changed: 0 additions & 85 deletions
This file was deleted.

boilerplate/openshift/golang-osd-operator-osde2e/standard.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ container-engine-login:
6363
# Targets used by e2e test harness
6464
######################
6565

66-
# create e2e scaffolding
67-
.PHONY: e2e-harness-generate
68-
e2e-harness-generate:
69-
${OSDE2E_CONVENTION_DIR}/e2e-harness-generate.sh $(OPERATOR_NAME) $(OSDE2E_CONVENTION_DIR)
70-
7166
# create binary
7267
.PHONY: e2e-harness-build
7368
e2e-harness-build: GOFLAGS_MOD=-mod=mod

boilerplate/openshift/golang-osd-operator-osde2e/update

Lines changed: 74 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,81 @@ source $CONVENTION_ROOT/_lib/common.sh
1010
# Expect POST
1111
[[ "$1" == "POST" ]] || err "Got a parameter I don't understand: '$1'. Did the infrastructure change?"
1212

13-
DOCKERFILE=test/e2e/Dockerfile
14-
if [[ -n ${KONFLUX_BUILDS} && -f "${DOCKERFILE}" ]]; then
15-
E2E_SUITE_BUILDER_IMAGE="brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.22"
16-
${SED?} -i "2s,.*,FROM $E2E_SUITE_BUILDER_IMAGE AS builder," "${DOCKERFILE}"
13+
OPERATOR_NAME=$(sed -n 's/.*OperatorName .*"\([^"]*\)".*/\1/p' "${REPO_ROOT}/config/config.go")
14+
REPO_ROOT=$(git rev-parse --show-toplevel)
15+
E2E_SUITE_DIRECTORY=$REPO_ROOT/test/e2e
16+
17+
# Update operator name in templates
18+
OPERATOR_UNDERSCORE_NAME=${OPERATOR_NAME//-/_}
19+
OPERATOR_PROPER_NAME=$(echo "$OPERATOR_NAME" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++){ $i=toupper(substr($i,1,1)) substr($i,2) }}1')
20+
OPERATOR_NAME_CAMEL_CASE=${OPERATOR_PROPER_NAME// /}
21+
22+
mkdir -p "${E2E_SUITE_DIRECTORY}"
23+
24+
E2E_SUITE_BUILDER_IMAGE=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.23-openshift-4.19
25+
if [[ -n ${KONFLUX_BUILDS} ]]; then
26+
E2E_SUITE_BUILDER_IMAGE="brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.23"
27+
fi
28+
29+
echo "syncing ${E2E_SUITE_DIRECTORY}/Dockerfile"
30+
tee "${E2E_SUITE_DIRECTORY}/Dockerfile" <<EOF
31+
# THIS FILE IS GENERATED BY BOILERPLATE. DO NOT EDIT.
32+
FROM ${E2E_SUITE_BUILDER_IMAGE} as builder
33+
WORKDIR /go/src/github.com/openshift/$OPERATOR_NAME/
34+
COPY . .
35+
RUN CGO_ENABLED=0 GOFLAGS="-mod=mod" go test ./test/e2e -v -c --tags=osde2e -o /e2e.test
36+
37+
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
38+
COPY --from=builder ./e2e.test e2e.test
39+
ENTRYPOINT [ "/e2e.test" ]
40+
EOF
41+
42+
if [ ! -f "${E2E_SUITE_DIRECTORY}/${OPERATOR_UNDERSCORE_NAME}_tests.go" ]; then
43+
echo "syncing ${E2E_SUITE_DIRECTORY}/${OPERATOR_UNDERSCORE_NAME}_tests.go"
44+
tee "${E2E_SUITE_DIRECTORY}/${OPERATOR_UNDERSCORE_NAME}_tests.go" <<EOF
45+
// DO NOT REMOVE TAGS BELOW. IF ANY NEW TEST FILES ARE CREATED UNDER /test/e2e, PLEASE ADD THESE TAGS TO THEM IN ORDER TO BE EXCLUDED FROM UNIT TESTS.
46+
//go:build osde2e
47+
48+
package osde2etests
49+
50+
import "github.com/onsi/ginkgo/v2"
51+
52+
var _ = ginkgo.Describe("$OPERATOR_NAME", func() {
53+
// Add your tests
54+
})
55+
EOF
1756
fi
1857

19-
# Updates for SDCICD-1414
20-
[[ ! -d osde2e ]] && exit 0
21-
[[ -d test/e2e ]] && exit 0
58+
echo "syncing ${E2E_SUITE_DIRECTORY}/${OPERATOR_UNDERSCORE_NAME}_runner_test.go"
59+
tee "${E2E_SUITE_DIRECTORY}/${OPERATOR_UNDERSCORE_NAME}_runner_test.go" <<EOF
60+
// THIS FILE IS GENERATED BY BOILERPLATE. DO NOT EDIT.
61+
//go:build osde2e
62+
63+
package osde2etests
64+
65+
import (
66+
"os"
67+
"path/filepath"
68+
"testing"
69+
70+
. "github.com/onsi/ginkgo/v2"
71+
. "github.com/onsi/gomega"
72+
)
73+
74+
const (
75+
testResultsDirectory = "/test-run-results"
76+
jUnitOutputFilename = "junit-${OPERATOR_NAME}.xml"
77+
)
2278
23-
mkdir -p test/e2e/
24-
mv osde2e/* test/e2e/
25-
rm -rf osde2e/
79+
// Test entrypoint. osde2e runs this as a test suite on test pod.
80+
func Test${OPERATOR_NAME_CAMEL_CASE}(t *testing.T) {
81+
RegisterFailHandler(Fail)
82+
suiteConfig, reporterConfig := GinkgoConfiguration()
83+
if _, ok := os.LookupEnv("DISABLE_JUNIT_REPORT"); !ok {
84+
reporterConfig.JUnitReport = filepath.Join(testResultsDirectory, jUnitOutputFilename)
85+
}
86+
RunSpecs(t, "${OPERATOR_PROPER_NAME}", suiteConfig, reporterConfig)
87+
}
88+
EOF
2689

27-
if [[ -f "${DOCKERFILE}" ]]; then
28-
${SED?} -i "s/\.\/osde2e/\.\/test\/e2e/" "${DOCKERFILE}"
29-
fi
90+
sed -e "s/\${OPERATOR_NAME}/${OPERATOR_NAME}/" $(dirname $0)/test-harness-template.yml >"${E2E_SUITE_DIRECTORY}/test-harness-template.yml"

boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ aliases:
5252
- npecka
5353
- pshickeydev
5454
- casey-williams-rh
55+
- boranx
5556
srep-functional-team-thor:
5657
- bmeng
5758
- MitaliBhalla

boilerplate/openshift/golang-osd-operator/prow-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ tests:
6969
make e2e-harness-build
7070
container:
7171
from: src
72-
run_if_changed: ^(osde2e/.*|go\.mod|go\.sum)$
72+
run_if_changed: ^(test/e2e/\.*|go\.mod|go\.sum)$
7373
- as: coverage
7474
commands: |
7575
export CODECOV_TOKEN=\$(cat /tmp/secret/CODECOV_TOKEN)

boilerplate/openshift/golang-osd-operator/update

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@ cp ${HERE}/.codecov.yml $REPO_ROOT
1616

1717
# Add OWNERS_ALIASES to $REPO_ROOT
1818
echo "Copying OWNERS_ALIASES to your repository root."
19-
cp ${HERE}/OWNERS_ALIASES $REPO_ROOT
19+
cp -L ${HERE}/OWNERS_ALIASES $REPO_ROOT
20+
21+
# Add CICD owners to .tekton if exists
22+
if [[ -d "${REPO_ROOT}/.tekton/" ]]; then
23+
echo "Adding Konflux subdirectory OWNERS file to .tekton/"
24+
cat >"${REPO_ROOT}/.tekton/OWNERS" <<EOF
25+
reviewers:
26+
- srep-infra-cicd
27+
approvers:
28+
- srep-infra-cicd
29+
EOF
30+
fi
2031

2132
# Add dependabot configuration
2233
mkdir -p $REPO_ROOT/.github

0 commit comments

Comments
 (0)