Skip to content

Commit a1c4a0c

Browse files
authored
Fix trivy job (#745)
1 parent 40f8212 commit a1c4a0c

File tree

5 files changed

+97
-7
lines changed

5 files changed

+97
-7
lines changed

Makefile

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ create-ssl-secrets: $(BUILD_OUTPUT)/certs
21552155
##@ KinD
21562156

21572157
KIND_CLUSTER ?= operator
2158-
KIND_IMAGE ?= "kindest/node:v1.32.2@sha256:f226345927d7e348497136874b6d207e0b32cc52154ad8323129352923a3142f"
2158+
KIND_IMAGE ?= "kindest/node:v1.33.0@sha256:91e9ed777db80279c22d1d1068c091b899b2078506e4a0f797fbf6e397c0b0b2"
21592159
CALICO_TIMEOUT ?= 300s
21602160
KIND_SCRIPTS := $(SCRIPTS_DIR)/kind
21612161

@@ -2373,12 +2373,11 @@ $(TOOLS_BIN)/cmctl:
23732373

23742374
.PHONY: install-cert-manager
23752375
install-cert-manager: $(TOOLS_BIN)/cmctl ## Install Cert manager into the Kubernetes cluster
2376-
$(KUBECTL_CMD) apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION)/cert-manager.yaml
2377-
$(CMCTL) check api --wait=10m
2376+
$(SCRIPTS_DIR)/cert-manager/install-cert-manager.sh
23782377

23792378
.PHONY: uninstall-cert-manager
23802379
uninstall-cert-manager: ## Uninstall Cert manager from the Kubernetes cluster
2381-
$(KUBECTL_CMD) delete -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION)/cert-manager.yaml
2380+
$(SCRIPTS_DIR)/cert-manager/uninstall-cert-manager.sh
23822381

23832382

23842383
# ======================================================================================================================
@@ -3048,3 +3047,24 @@ endif
30483047
rm -f licensed.tar.gz
30493048
mv ./licensed $(TOOLS_BIN)/licensed
30503049
chmod +x $(TOOLS_BIN)/licensed
3050+
3051+
3052+
3053+
SHELL_SCRIPT ?=
3054+
.PHONY: run-script
3055+
run-script:
3056+
chmod +x $(SHELL_SCRIPT)
3057+
$(SHELL_SCRIPT)
3058+
3059+
# ----------------------------------------------------------------------------------------------------------------------
3060+
# Export various properties
3061+
# ----------------------------------------------------------------------------------------------------------------------
3062+
export VERSION OPERATOR_IMAGE COHERENCE_IMAGE KUBECTL_CMD \
3063+
BUILD_OUTPUT BUILD_BIN BUILD_DEPLOY BUILD_HELM BUILD_MANIFESTS SCRIPTS_DIR TEST_LOGS_DIR \
3064+
TOOLS_BIN MVN_VERSION CERT_MANAGER_VERSION \
3065+
OPERATOR_NAMESPACE CLUSTER_NAMESPACE OPERATOR_NAMESPACE_CLIENT BUILD_OUTPUT TEST_APPLICATION_IMAGE \
3066+
TEST_APPLICATION_IMAGE_CLIENT TEST_APPLICATION_IMAGE_HELIDON TEST_APPLICATION_IMAGE_HELIDON_3 \
3067+
TEST_APPLICATION_IMAGE_HELIDON_2 SKIP_SPRING_CNBP TEST_APPLICATION_IMAGE_SPRING TEST_APPLICATION_IMAGE_SPRING_FAT \
3068+
TEST_APPLICATION_IMAGE_SPRING_CNBP TEST_APPLICATION_IMAGE_SPRING_2 TEST_APPLICATION_IMAGE_SPRING_FAT_2 \
3069+
TEST_APPLICATION_IMAGE_SPRING_CNBP_2 TEST_COHERENCE_IMAGE IMAGE_PULL_SECRETS COHERENCE_OPERATOR_SKIP_SITE \
3070+
TEST_IMAGE_PULL_POLICY TEST_STORAGE_CLASS GO_TEST_FLAGS_E2E TEST_ASSET_KUBECTL LOCAL_STORAGE_RESTART

docs/about/04_coherence_spec.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ m| topologySpreadConstraints | TopologySpreadConstraints describes how a group o
352352
m| rackLabel | RackLabel is an optional Node label to use for the value of the Coherence member's rack name. The default labels to use are determined by the Operator. m| *string | false
353353
m| siteLabel | SiteLabel is an optional Node label to use for the value of the Coherence member's site name The default labels to use are determined by the Operator. m| *string | false
354354
m| lifecycle | Lifecycle applies actions that the management system should take in response to container lifecycle events. Cannot be updated. m| *https://{k8s-doc-link}/#lifecycle-v1-core[corev1.Lifecycle] | false
355+
m| minReadySeconds | Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) m| *int32 | false
355356
|===
356357
357358
<<Table of Contents,Back to TOC>>
@@ -868,6 +869,7 @@ m| timeoutSeconds | Number of seconds after which the probe times out. More info
868869
m| periodSeconds | How often (in seconds) to perform the probe. m| &#42;int32 | false
869870
m| successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. m| &#42;int32 | false
870871
m| failureThreshold | Minimum consecutive failures for the probe to be considered failed after having succeeded. m| &#42;int32 | false
872+
m| terminationGracePeriodSeconds | TerminationGracePeriodSeconds is the optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. The minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. m| &#42;int64 | false
871873
|===
872874
873875
<<Table of Contents,Back to TOC>>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
#
3+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates.
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# http://oss.oracle.com/licenses/upl.
6+
#
7+
8+
set -o errexit
9+
10+
OS=$(go env GOOS)
11+
ARCH=$(go env GOARCH)
12+
13+
if [ "CERT_MANAGER_VERSION" = "" ];
14+
then
15+
echo "CERT_MANAGER_VERSION is not set"
16+
exit 1
17+
fi
18+
19+
curl -fsSL -o cmctl https://github.com/cert-manager/cmctl/releases/latest/download/cmctl_${OS}_${ARCH}
20+
chmod +x cmctl
21+
mv cmctl ${TOOLS_BIN}
22+
23+
${KUBECTL_CMD} apply -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml
24+
${TOOLS_BIN}/cmctl check api --wait=10m
25+
26+
helm repo add jetstack https://charts.jetstack.io --force-update
27+
28+
helm upgrade trust-manager jetstack/trust-manager \
29+
--install \
30+
--namespace cert-manager \
31+
--wait
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
#
3+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates.
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# http://oss.oracle.com/licenses/upl.
6+
#
7+
8+
set -o errexit
9+
10+
OS=$(go env GOOS)
11+
ARCH=$(go env GOARCH)
12+
13+
if [ "CERT_MANAGER_VERSION" = "" ];
14+
then
15+
echo "CERT_MANAGER_VERSION is not set"
16+
exit 1
17+
fi
18+
19+
helm uninstall trust-manager -n cert-manager
20+
kubectl delete crd bundles.trust.cert-manager.io
21+
22+
${KUBECTL_CMD} delete -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml

hack/golang/govulncheck.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,23 @@
44
# Licensed under the Universal Permissive License v 1.0 as shown at
55
# http://oss.oracle.com/licenses/upl.
66
#
7+
set -o errexit
78

9+
ROOT_DIR=$(pwd)
10+
TOOLS_BIN=${ROOT_DIR}/build/tools/bin
11+
12+
test -s ${TOOLS_BIN}/govulncheck || GOBIN=${TOOLS_BIN} go install golang.org/x/vuln/cmd/govulncheck@latest
13+
chmod +x ${TOOLS_BIN}/govulncheck
14+
15+
make build-operator-images
16+
17+
echo "INFO: govulncheck - Checking x84_64 runner"
18+
${TOOLS_BIN}/govulncheck -mode binary -show traces,version,verbose ./bin/linux/amd64/runner
19+
echo "INFO: govulncheck - Checking x84_64 cohctl"
20+
${TOOLS_BIN}/govulncheck -mode binary -show traces,version,verbose ./bin/linux/amd64/cohctl
21+
22+
echo "INFO: govulncheck - Checking Arm64 runner"
23+
${TOOLS_BIN}/govulncheck -mode binary -show traces,version,verbose ./bin/linux/arm64/runner
24+
echo "INFO: govulncheck - Checking Arm64 cohctl"
25+
${TOOLS_BIN}/govulncheck -mode binary -show traces,version,verbose ./bin/linux/arm64/cohctl
826

9-
go install golang.org/x/vuln/cmd/govulncheck@latest
10-
make runner
11-
govulncheck -mode binary -show traces,version,verbose ./bin/runner

0 commit comments

Comments
 (0)