Skip to content

Commit a31a3b4

Browse files
authored
Merge branch 'main' into ltpa-network-policy
2 parents e4689d5 + 189d70a commit a31a3b4

36 files changed

+7706
-2255
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
3939
ARG USER_ID=65532
4040
ARG GROUP_ID=65532
4141

42-
ARG VERSION_LABEL=1.3.1
42+
ARG VERSION_LABEL=1.3.2
4343
ARG RELEASE_LABEL=XX
4444
ARG VCS_REF=0123456789012345678901234567890123456789
4545
ARG VCS_URL="https://github.com/WASdev/websphere-liberty-operator"

Makefile

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# To re-generate a bundle for another specific version without changing the standard setup, you can:
44
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
6-
VERSION ?= 1.3.1
6+
VERSION ?= 1.3.2
77
OPERATOR_SDK_RELEASE_VERSION ?= v1.27.0
88

99
# CHANNELS define the bundle channels used in the bundle.
@@ -154,7 +154,7 @@ kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
154154
$(KUSTOMIZE): $(LOCALBIN)
155155
test -s $(LOCALBIN)/kustomize || curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s $(KUSTOMIZE_VERSION) $(LOCALBIN)
156156

157-
CONTROLLER_TOOLS_VERSION ?= 0.10.0
157+
CONTROLLER_TOOLS_VERSION ?= 0.11.4
158158
.PHONY: controller-gen
159159
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
160160
$(CONTROLLER_GEN): $(LOCALBIN)
@@ -303,30 +303,6 @@ rm -rf $$TMP_DIR ;\
303303
}
304304
endef
305305

306-
.PHONY: opm
307-
OPM = ./bin/opm
308-
opm: ## Download opm locally if necessary.
309-
ifeq (,$(wildcard $(OPM)))
310-
ifeq (,$(shell which opm 2>/dev/null))
311-
@{ \
312-
set -e ;\
313-
mkdir -p $(dir $(OPM)) ;\
314-
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
315-
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.15.1/$${OS}-$${ARCH}-opm ;\
316-
chmod +x $(OPM) ;\
317-
}
318-
else
319-
OPM = $(shell which opm)
320-
endif
321-
endif
322-
323-
# Build a catalog image by adding bundle images to an empty catalog using the operator package manager tool, 'opm'.
324-
# This recipe invokes 'opm' in 'semver' bundle add mode. For more information on add modes, see:
325-
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
326-
.PHONY: catalog-build
327-
catalog-build: opm ## Build a catalog image.
328-
$(OPM) index add $(SKIP_TLS_VERIFY) --container-tool $(CONTAINER_COMMAND) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) --permissive
329-
330306
kind-e2e-test:
331307
./operators/scripts/test/e2e-kind.sh --test-tag "${BUILD_NUMBER}"
332308

@@ -342,8 +318,8 @@ build-manifest-pipeline:
342318
build-bundle-pipeline:
343319
./operators/scripts/build/build-bundle.sh --prod-image "${PIPELINE_PRODUCTION_IMAGE}" --registry "${REGISTRY}" --image "${PIPELINE_OPERATOR_IMAGE}" --tag "${RELEASE_TARGET}"
344320

345-
build-catalog-pipeline: opm ## Build a catalog image.
346-
./operators/scripts/build/build-catalog.sh -n "v${OPM_VERSION}" -b "${REDHAT_BASE_IMAGE}" -o "${OPM}" --container-tool "docker" -r "${REGISTRY}" -i "${PIPELINE_OPERATOR_IMAGE}-bundle:${RELEASE_TARGET}" -p "${PIPELINE_PRODUCTION_IMAGE}-bundle" -a "${PIPELINE_OPERATOR_IMAGE}-catalog:${RELEASE_TARGET}" -t "${PWD}/operator-build" -v "${VERSION}"
321+
build-catalog-pipeline:
322+
./operators/scripts/build/build-catalog.sh --prod-image "${OPERATOR_IMAGE}" --registry "${REGISTRY}" --image "${PIPELINE_OPERATOR_IMAGE}" --tag "${RELEASE_TARGET}" --version "${VERSION}"
347323

348324
test-e2e:
349325
./scripts/e2e-release.sh --registry-name default-route --registry-namespace openshift-image-registry \
@@ -360,9 +336,6 @@ bundle-build-podman:
360336
bundle-push-podman:
361337
podman push --format=docker "${BUNDLE_IMG}"
362338

363-
build-catalog:
364-
opm index add --bundles "${BUNDLE_IMG}" --tag "${CATALOG_IMG}"
365-
366339
push-catalog: docker-login
367340
podman push --format=docker "${CATALOG_IMG}"
368341

api/v1/webspherelibertyapplication_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,9 @@ type WebSphereLibertyApplicationStatus struct {
511511
References common.StatusReferences `json:"references,omitempty"`
512512

513513
SemeruCompiler *SemeruCompilerStatus `json:"semeruCompiler,omitempty"`
514+
515+
// The generation identifier of this WebSphereLibertyApplication instance completely reconciled by the Operator.
516+
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
514517
}
515518

516519
// Defines possible status conditions.

api/v1/webspherelibertydump_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ type WebSphereLibertyDumpStatus struct {
5757
// Location of the generated dump file
5858
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Dump File Path",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
5959
DumpFile string `json:"dumpFile,omitempty"`
60+
// The generation identifier of this WebSphereLibertyDump instance completely reconciled by the Operator.
61+
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
6062
}
6163

6264
type DumpStatusVersions struct {

api/v1/webspherelibertytrace_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ type WebSphereLibertyTraceStatus struct {
6060
Conditions []OperationStatusCondition `json:"conditions,omitempty"`
6161
OperatedResource OperatedResource `json:"operatedResource,omitempty"`
6262
Versions TraceStatusVersions `json:"versions,omitempty"`
63+
// The generation identifier of this WebSphereLibertyTrace instance completely reconciled by the Operator.
64+
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
6365
}
6466

6567
type TraceStatusVersions struct {

bundle/manifests/ibm-websphere-liberty.clusterserviceversion.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
"name": "websphereliberty-app-sample"
1212
},
1313
"spec": {
14-
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f",
14+
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac",
1515
"expose": true,
1616
"license": {
1717
"accept": false,
@@ -33,8 +33,7 @@ metadata:
3333
},
3434
"spec": {
3535
"include": [
36-
"thread",
37-
"heap"
36+
"thread"
3837
],
3938
"license": {
4039
"accept": false
@@ -64,7 +63,7 @@ metadata:
6463
containerImage: icr.io/cpopen/websphere-liberty-operator:daily
6564
createdAt: "2024-04-23T15:07:30Z"
6665
description: Deploy and manage containerized Liberty applications
67-
olm.skipRange: '>=1.0.0 <1.3.1'
66+
olm.skipRange: '>=1.0.0 <1.3.2'
6867
operators.openshift.io/infrastructure-features: '["disconnected"]'
6968
operators.operatorframework.io/builder: operator-sdk-v1.27.0
7069
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
@@ -75,7 +74,7 @@ metadata:
7574
operatorframework.io/arch.ppc64le: supported
7675
operatorframework.io/arch.s390x: supported
7776
operatorframework.io/os.linux: supported
78-
name: ibm-websphere-liberty.v1.3.1
77+
name: ibm-websphere-liberty.v1.3.2
7978
namespace: placeholder
8079
spec:
8180
apiservicedefinitions: {}
@@ -900,7 +899,7 @@ spec:
900899
fieldRef:
901900
fieldPath: metadata.annotations['olm.targetNamespaces']
902901
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
903-
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
902+
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
904903
- name: RELATED_IMAGE_WEBSPHERE_LIBERTY_OPERATOR
905904
value: icr.io/cpopen/websphere-liberty-operator:daily
906905
image: icr.io/cpopen/websphere-liberty-operator:daily
@@ -928,7 +927,7 @@ spec:
928927
resources:
929928
limits:
930929
cpu: 400m
931-
memory: 512Mi
930+
memory: 1Gi
932931
requests:
933932
cpu: 200m
934933
memory: 128Mi
@@ -1205,8 +1204,8 @@ spec:
12051204
provider:
12061205
name: IBM
12071206
relatedImages:
1208-
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
1207+
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
12091208
name: liberty-sample-app
12101209
- image: icr.io/cpopen/websphere-liberty-operator:daily
12111210
name: websphere-liberty-operator
1212-
version: 1.3.1
1211+
version: 1.3.2

bundle/manifests/liberty.websphere.ibm.com_webspherelibertyapplications.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.10.0
5+
controller-gen.kubebuilder.io/version: v0.11.4
66
creationTimestamp: null
77
labels:
88
app.kubernetes.io/instance: websphere-liberty-operator
@@ -7709,6 +7709,11 @@ spec:
77097709
type: array
77107710
imageReference:
77117711
type: string
7712+
observedGeneration:
7713+
description: The generation identifier of this WebSphereLibertyApplication
7714+
instance completely reconciled by the Operator.
7715+
format: int64
7716+
type: integer
77127717
references:
77137718
additionalProperties:
77147719
type: string

bundle/manifests/liberty.websphere.ibm.com_webspherelibertydumps.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.10.0
5+
controller-gen.kubebuilder.io/version: v0.11.4
66
creationTimestamp: null
77
labels:
88
app.kubernetes.io/instance: websphere-liberty-operator
@@ -136,6 +136,11 @@ spec:
136136
dumpFile:
137137
description: Location of the generated dump file
138138
type: string
139+
observedGeneration:
140+
description: The generation identifier of this WebSphereLibertyDump
141+
instance completely reconciled by the Operator.
142+
format: int64
143+
type: integer
139144
versions:
140145
properties:
141146
reconciled:

bundle/manifests/liberty.websphere.ibm.com_webspherelibertytraces.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.10.0
5+
controller-gen.kubebuilder.io/version: v0.11.4
66
creationTimestamp: null
77
labels:
88
app.kubernetes.io/instance: websphere-liberty-operator
@@ -125,6 +125,11 @@ spec:
125125
type: object
126126
type: array
127127
x-kubernetes-list-type: atomic
128+
observedGeneration:
129+
description: The generation identifier of this WebSphereLibertyTrace
130+
instance completely reconciled by the Operator.
131+
format: int64
132+
type: integer
128133
operatedResource:
129134
description: OperatedResource ...
130135
properties:

catalog.Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM registry.redhat.io/openshift4/ose-operator-registry:v4.14 AS builder
2+
FROM registry.redhat.io/ubi8/ubi-minimal
3+
4+
# Add label for location of Declarative Config root directory & required OpenShift labels
5+
ARG VERSION_LABEL=1.3.2
6+
ARG RELEASE_LABEL=XX
7+
ARG VCS_REF=0123456789012345678901234567890123456789
8+
ARG VCS_URL="https://github.com/WASdev/websphere-liberty-operator"
9+
ARG NAME="websphere-liberty-operator-catalog"
10+
ARG SUMMARY="WebSphere Liberty Operator Catalog"
11+
ARG DESCRIPTION="This image contains the catalog for WebSphere Liberty Operator."
12+
13+
# Set DC-specific label for the location of the DC root directory in the image
14+
LABEL operators.operatorframework.io.index.configs.v1=/configs \
15+
name=$NAME \
16+
vendor=IBM \
17+
version=$VERSION_LABEL \
18+
release=$RELEASE_LABEL \
19+
description=$DESCRIPTION \
20+
summary=$SUMMARY \
21+
io.k8s.display-name=$SUMMARY \
22+
io.k8s.description=$DESCRIPTION \
23+
vcs-type=git \
24+
vcs-ref=$VCS_REF \
25+
vcs-url=$VCS_URL \
26+
url=$VCS_URL
27+
28+
## Copy Apache license
29+
COPY LICENSE /licenses
30+
31+
USER root
32+
33+
# Pick up any latest fixes
34+
RUN microdnf update && microdnf clean all
35+
36+
# Copy required tooling, licenses, and declarative config into defined location
37+
COPY --from=builder --chown=1001:0 /bin/opm /bin/opm
38+
COPY --from=builder --chown=1001:0 /bin/grpc_health_probe /bin/grpc_health_probe
39+
40+
# Note: the COPY directive can also point to a directory structure and it will recurse thru the directory structure and use any yaml/json files it locates
41+
COPY --chown=1001:0 catalog /configs
42+
43+
# Validate catalog file
44+
RUN ["/bin/opm", "validate", "/configs"]
45+
46+
EXPOSE 50051
47+
48+
USER 1001
49+
50+
WORKDIR /tmp
51+
ENTRYPOINT ["/bin/opm"]
52+
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]
53+
RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]

0 commit comments

Comments
 (0)