Skip to content

Commit

Permalink
Merge branch 'main' into ltpa-network-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
kabicin authored May 3, 2024
2 parents e4689d5 + 189d70a commit a31a3b4
Show file tree
Hide file tree
Showing 36 changed files with 7,706 additions and 2,255 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ARG USER_ID=65532
ARG GROUP_ID=65532

ARG VERSION_LABEL=1.3.1
ARG VERSION_LABEL=1.3.2
ARG RELEASE_LABEL=XX
ARG VCS_REF=0123456789012345678901234567890123456789
ARG VCS_URL="https://github.com/WASdev/websphere-liberty-operator"
Expand Down
35 changes: 4 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 1.3.1
VERSION ?= 1.3.2
OPERATOR_SDK_RELEASE_VERSION ?= v1.27.0

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

CONTROLLER_TOOLS_VERSION ?= 0.10.0
CONTROLLER_TOOLS_VERSION ?= 0.11.4
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
Expand Down Expand Up @@ -303,30 +303,6 @@ rm -rf $$TMP_DIR ;\
}
endef

.PHONY: opm
OPM = ./bin/opm
opm: ## Download opm locally if necessary.
ifeq (,$(wildcard $(OPM)))
ifeq (,$(shell which opm 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(OPM)) ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.15.1/$${OS}-$${ARCH}-opm ;\
chmod +x $(OPM) ;\
}
else
OPM = $(shell which opm)
endif
endif

# Build a catalog image by adding bundle images to an empty catalog using the operator package manager tool, 'opm'.
# This recipe invokes 'opm' in 'semver' bundle add mode. For more information on add modes, see:
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
.PHONY: catalog-build
catalog-build: opm ## Build a catalog image.
$(OPM) index add $(SKIP_TLS_VERIFY) --container-tool $(CONTAINER_COMMAND) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) --permissive

kind-e2e-test:
./operators/scripts/test/e2e-kind.sh --test-tag "${BUILD_NUMBER}"

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

build-catalog-pipeline: opm ## Build a catalog image.
./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}"
build-catalog-pipeline:
./operators/scripts/build/build-catalog.sh --prod-image "${OPERATOR_IMAGE}" --registry "${REGISTRY}" --image "${PIPELINE_OPERATOR_IMAGE}" --tag "${RELEASE_TARGET}" --version "${VERSION}"

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

build-catalog:
opm index add --bundles "${BUNDLE_IMG}" --tag "${CATALOG_IMG}"

push-catalog: docker-login
podman push --format=docker "${CATALOG_IMG}"

Expand Down
3 changes: 3 additions & 0 deletions api/v1/webspherelibertyapplication_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ type WebSphereLibertyApplicationStatus struct {
References common.StatusReferences `json:"references,omitempty"`

SemeruCompiler *SemeruCompilerStatus `json:"semeruCompiler,omitempty"`

// The generation identifier of this WebSphereLibertyApplication instance completely reconciled by the Operator.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

// Defines possible status conditions.
Expand Down
2 changes: 2 additions & 0 deletions api/v1/webspherelibertydump_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ type WebSphereLibertyDumpStatus struct {
// Location of the generated dump file
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Dump File Path",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
DumpFile string `json:"dumpFile,omitempty"`
// The generation identifier of this WebSphereLibertyDump instance completely reconciled by the Operator.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

type DumpStatusVersions struct {
Expand Down
2 changes: 2 additions & 0 deletions api/v1/webspherelibertytrace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ type WebSphereLibertyTraceStatus struct {
Conditions []OperationStatusCondition `json:"conditions,omitempty"`
OperatedResource OperatedResource `json:"operatedResource,omitempty"`
Versions TraceStatusVersions `json:"versions,omitempty"`
// The generation identifier of this WebSphereLibertyTrace instance completely reconciled by the Operator.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

type TraceStatusVersions struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
"name": "websphereliberty-app-sample"
},
"spec": {
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f",
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac",
"expose": true,
"license": {
"accept": false,
Expand All @@ -33,8 +33,7 @@ metadata:
},
"spec": {
"include": [
"thread",
"heap"
"thread"
],
"license": {
"accept": false
Expand Down Expand Up @@ -64,7 +63,7 @@ metadata:
containerImage: icr.io/cpopen/websphere-liberty-operator:daily
createdAt: "2024-04-23T15:07:30Z"
description: Deploy and manage containerized Liberty applications
olm.skipRange: '>=1.0.0 <1.3.1'
olm.skipRange: '>=1.0.0 <1.3.2'
operators.openshift.io/infrastructure-features: '["disconnected"]'
operators.operatorframework.io/builder: operator-sdk-v1.27.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand All @@ -75,7 +74,7 @@ metadata:
operatorframework.io/arch.ppc64le: supported
operatorframework.io/arch.s390x: supported
operatorframework.io/os.linux: supported
name: ibm-websphere-liberty.v1.3.1
name: ibm-websphere-liberty.v1.3.2
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -900,7 +899,7 @@ spec:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
- name: RELATED_IMAGE_WEBSPHERE_LIBERTY_OPERATOR
value: icr.io/cpopen/websphere-liberty-operator:daily
image: icr.io/cpopen/websphere-liberty-operator:daily
Expand Down Expand Up @@ -928,7 +927,7 @@ spec:
resources:
limits:
cpu: 400m
memory: 512Mi
memory: 1Gi
requests:
cpu: 200m
memory: 128Mi
Expand Down Expand Up @@ -1205,8 +1204,8 @@ spec:
provider:
name: IBM
relatedImages:
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
name: liberty-sample-app
- image: icr.io/cpopen/websphere-liberty-operator:daily
name: websphere-liberty-operator
version: 1.3.1
version: 1.3.2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.4
creationTimestamp: null
labels:
app.kubernetes.io/instance: websphere-liberty-operator
Expand Down Expand Up @@ -7709,6 +7709,11 @@ spec:
type: array
imageReference:
type: string
observedGeneration:
description: The generation identifier of this WebSphereLibertyApplication
instance completely reconciled by the Operator.
format: int64
type: integer
references:
additionalProperties:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.4
creationTimestamp: null
labels:
app.kubernetes.io/instance: websphere-liberty-operator
Expand Down Expand Up @@ -136,6 +136,11 @@ spec:
dumpFile:
description: Location of the generated dump file
type: string
observedGeneration:
description: The generation identifier of this WebSphereLibertyDump
instance completely reconciled by the Operator.
format: int64
type: integer
versions:
properties:
reconciled:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.4
creationTimestamp: null
labels:
app.kubernetes.io/instance: websphere-liberty-operator
Expand Down Expand Up @@ -125,6 +125,11 @@ spec:
type: object
type: array
x-kubernetes-list-type: atomic
observedGeneration:
description: The generation identifier of this WebSphereLibertyTrace
instance completely reconciled by the Operator.
format: int64
type: integer
operatedResource:
description: OperatedResource ...
properties:
Expand Down
53 changes: 53 additions & 0 deletions catalog.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM registry.redhat.io/openshift4/ose-operator-registry:v4.14 AS builder
FROM registry.redhat.io/ubi8/ubi-minimal

# Add label for location of Declarative Config root directory & required OpenShift labels
ARG VERSION_LABEL=1.3.2
ARG RELEASE_LABEL=XX
ARG VCS_REF=0123456789012345678901234567890123456789
ARG VCS_URL="https://github.com/WASdev/websphere-liberty-operator"
ARG NAME="websphere-liberty-operator-catalog"
ARG SUMMARY="WebSphere Liberty Operator Catalog"
ARG DESCRIPTION="This image contains the catalog for WebSphere Liberty Operator."

# Set DC-specific label for the location of the DC root directory in the image
LABEL operators.operatorframework.io.index.configs.v1=/configs \
name=$NAME \
vendor=IBM \
version=$VERSION_LABEL \
release=$RELEASE_LABEL \
description=$DESCRIPTION \
summary=$SUMMARY \
io.k8s.display-name=$SUMMARY \
io.k8s.description=$DESCRIPTION \
vcs-type=git \
vcs-ref=$VCS_REF \
vcs-url=$VCS_URL \
url=$VCS_URL

## Copy Apache license
COPY LICENSE /licenses

USER root

# Pick up any latest fixes
RUN microdnf update && microdnf clean all

# Copy required tooling, licenses, and declarative config into defined location
COPY --from=builder --chown=1001:0 /bin/opm /bin/opm
COPY --from=builder --chown=1001:0 /bin/grpc_health_probe /bin/grpc_health_probe

# 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
COPY --chown=1001:0 catalog /configs

# Validate catalog file
RUN ["/bin/opm", "validate", "/configs"]

EXPOSE 50051

USER 1001

WORKDIR /tmp
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]
RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.11.4
name: webspherelibertyapplications.liberty.websphere.ibm.com
spec:
group: liberty.websphere.ibm.com
Expand Down Expand Up @@ -7706,6 +7705,11 @@ spec:
type: array
imageReference:
type: string
observedGeneration:
description: The generation identifier of this WebSphereLibertyApplication
instance completely reconciled by the Operator.
format: int64
type: integer
references:
additionalProperties:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.11.4
name: webspherelibertydumps.liberty.websphere.ibm.com
spec:
group: liberty.websphere.ibm.com
Expand Down Expand Up @@ -133,6 +132,11 @@ spec:
dumpFile:
description: Location of the generated dump file
type: string
observedGeneration:
description: The generation identifier of this WebSphereLibertyDump
instance completely reconciled by the Operator.
format: int64
type: integer
versions:
properties:
reconciled:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.11.4
name: webspherelibertytraces.liberty.websphere.ibm.com
spec:
group: liberty.websphere.ibm.com
Expand Down Expand Up @@ -122,6 +121,11 @@ spec:
type: object
type: array
x-kubernetes-list-type: atomic
observedGeneration:
description: The generation identifier of this WebSphereLibertyTrace
instance completely reconciled by the Operator.
format: int64
type: integer
operatedResource:
description: OperatedResource ...
properties:
Expand Down
4 changes: 2 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
- name: RELATED_IMAGE_WEBSPHERE_LIBERTY_OPERATOR
value: OPERATOR_IMAGE
securityContext:
Expand All @@ -87,7 +87,7 @@ spec:
resources:
limits:
cpu: 400m
memory: 512Mi
memory: 1Gi
requests:
cpu: 200m
memory: 128Mi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
categories: Application Runtime
createdAt: "2021-11-25T14:00:00Z"
description: Deploy and manage containerized Liberty applications
olm.skipRange: '>=1.0.0 <1.3.1'
olm.skipRange: '>=1.0.0 <1.3.2'
operators.openshift.io/infrastructure-features: '["disconnected"]'
repository: https://github.com/WASdev/websphere-liberty-operator
support: IBM
Expand Down
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: manager-role
namespace: websphere-liberty-operator
rules:
Expand Down
Loading

0 comments on commit a31a3b4

Please sign in to comment.