Skip to content

Commit

Permalink
Make smaller CRD and update Coherence certification versions (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegridman committed Apr 19, 2023
1 parent aee9745 commit e38775b
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 33 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/coherence-matrix.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021, 2022, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2021, 2023, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -33,78 +33,78 @@ jobs:
fail-fast: false
matrix:
matrixName:
- "15.1.1-0-0-SNAPSHOT"
- "15.1.1-0-0-SNAPSHOT-Graal"
- "22.09"
- "22.09-Graal"
- "15.1.1-0-SNAPSHOT"
- "15.1.1-0-SNAPSHOT-Graal"
- "23.03"
- "23.03-Graal"
- "22.06"
- "14.1.1-2206-SNAPSHOT"
- "14.1.1-0-12-SNAPSHOT"
- "14.1.1-0-10"
- "14.1.1-0-SNAPSHOT"
- "14.1.1-0"
- "14.1.1.0.0"
- "12.2.1.4.0"
- "12.2.1-4-15-SNAPSHOT"
- "12.2.1-3-20-SNAPSHOT"
- "12.2.1-4-SNAPSHOT"
- "12.2.1-3-SNAPSHOT"
include:
- matrixName: "15.1.1-0-0-SNAPSHOT"
- matrixName: "15.1.1-0-SNAPSHOT"
coherenceVersion: "15.1.1-0-0-SNAPSHOT"
javaVersion: 17
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:15.1.1-0-0-SNAPSHOT"
javaVersion: 17
baseImage: "gcr.io/distroless/java17-debian11"
- matrixName: "15.1.1-0-0-SNAPSHOT-Graal"
- matrixName: "15.1.1-0-SNAPSHOT-Graal"
coherenceVersion: "15.1.1-0-0-SNAPSHOT"
javaVersion: 17
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:15.1.1-0-0-SNAPSHOT-graal"
javaVersion: 17
baseImage: "gcr.io/distroless/java17-debian11"
- matrixName: "22.09"
coherenceVersion: "22.09"
- matrixName: "23.03"
coherenceVersion: "23.03"
coherenceImage: "ghcr.io/oracle/coherence-ce:23.03"
javaVersion: 17
coherenceImage: "ghcr.io/oracle/coherence-ce:22.09"
baseImage: "gcr.io/distroless/java17-debian11"
- matrixName: "22.09-Graal"
coherenceVersion: "22.09"
- matrixName: "23.03-Graal"
coherenceVersion: "23.03"
coherenceImage: "ghcr.io/oracle/coherence-ce:23.03-graal"
javaVersion: 17
coherenceImage: "ghcr.io/oracle/coherence-ce:22.09-graal"
baseImage: "gcr.io/distroless/java17-debian11"
- matrixName: "22.06"
coherenceVersion: "22.06"
coherenceVersion: "22.06.4"
coherenceImage: "ghcr.io/oracle/coherence-ce:22.06.4"
javaVersion: 11
coherenceImage: "ghcr.io/oracle/coherence-ce:22.06.3"
baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "14.1.1-2206-SNAPSHOT"
coherenceVersion: "14.1.1-2206-SNAPSHOT"
javaVersion: 11
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.1-2206-2-SNAPSHOT"
javaVersion: 11
baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "14.1.1-0-12-SNAPSHOT"
coherenceVersion: "14.1.1-0-12-SNAPSHOT"
- matrixName: "14.1.1-0SNAPSHOT"
coherenceVersion: "14.1.1-0-14-SNAPSHOT"
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.1-0-14-SNAPSHOT"
javaVersion: 8
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.1-0-12-SNAPSHOT"
baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "14.1.1-0-10"
coherenceVersion: "14.1.1-0-10"
- matrixName: "14.1.1-0"
coherenceVersion: "14.1.1-0-11"
javaVersion: 8
coherenceImage: "ghcr.io/oracle/coherence-ce:14.1.1-0-10"
coherenceImage: "ghcr.io/oracle/coherence-ce:14.1.1-0-11"
baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "14.1.1.0.0"
coherenceVersion: "14.1.1.0.0"
javaVersion: 8
coherenceImage: "container-registry.oracle.com/middleware/coherence:14.1.1.0.0"
javaVersion: 8
baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "12.2.1.4.0"
coherenceVersion: "12.2.1.4.0"
javaVersion: 8
coherenceImage: "container-registry.oracle.com/middleware/coherence:12.2.1.4.0"
javaVersion: 8
baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "12.2.1-4-15-SNAPSHOT"
coherenceVersion: "12.2.1-4-15-SNAPSHOT"
javaVersion: 8
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:12.2.1-4-15-SNAPSHOT"
javaVersion: 8
baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "12.2.1-3-20-SNAPSHOT"
coherenceVersion: "12.2.1-3-20-SNAPSHOT"
javaVersion: 8
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:12.2.1-3-20-SNAPSHOT"
javaVersion: 8
baseImage: "gcr.io/distroless/java11-debian11"

steps:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ jobs:
asset_name: coherence.oracle.com_coherence.yaml
asset_content_type: text/plain

- name: Upload Release Small CRD
id: upload-release-small-crd
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /tmp/coherence-operator/_output/manifests/crd-small/coherence.oracle.com_coherence.yaml
asset_name: coherence.oracle.com_coherence_small.yaml
asset_content_type: text/plain

- name: Upload Release Dashboards
id: upload-release-dashboards
uses: actions/upload-release-asset@v1
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ COHERENCE_VERSION ?= 21.12.5
# The default Coherence image the Operator will run if no image is specified
COHERENCE_IMAGE_REGISTRY ?= ghcr.io/oracle
COHERENCE_IMAGE_NAME ?= coherence-ce
COHERENCE_IMAGE_TAG ?= 22.06.3
COHERENCE_IMAGE_TAG ?= 22.06.4
COHERENCE_IMAGE ?= $(COHERENCE_IMAGE_REGISTRY)/$(COHERENCE_IMAGE_NAME):$(COHERENCE_IMAGE_TAG)
# The Java version that tests will be compiled to.
# This should match the version required by the COHERENCE_IMAGE version
Expand Down Expand Up @@ -587,6 +587,10 @@ config/crd/bases/coherence.oracle.com_coherence.yaml: kustomize $(API_GO_FILES)
$(CONTROLLER_GEN) "crd:crdVersions={v1}" \
rbac:roleName=manager-role paths="{./api/...,./controllers/...}" \
output:crd:artifacts:config=config/crd/bases
cp -R config/crd/ config/crd-small
$(CONTROLLER_GEN) "crd:crdVersions={v1},maxDescLen=0" \
rbac:roleName=manager-role paths="{./api/...,./controllers/...}" \
output:crd:artifacts:config=config/crd-small/bases
cd config/crd && $(KUSTOMIZE) edit add label "app.kubernetes.io/version:$(VERSION)" -f
$(KUSTOMIZE) build config/crd > $(BUILD_ASSETS)/crd_v1.yaml

Expand Down Expand Up @@ -1399,6 +1403,8 @@ $(BUILD_MANIFESTS_PKG): kustomize
rm -rf $(BUILD_MANIFESTS) || true
mkdir -p $(BUILD_MANIFESTS)/crd
$(KUSTOMIZE) build config/crd > $(BUILD_MANIFESTS)/crd/coherence.oracle.com_coherence.yaml
mkdir -p $(BUILD_MANIFESTS)/crd-small
$(KUSTOMIZE) build config/crd-small > $(BUILD_MANIFESTS)/crd-small/coherence.oracle.com_coherence.yaml
cp -R config/default/ $(BUILD_MANIFESTS)/default
cp -R config/manager/ $(BUILD_MANIFESTS)/manager
cp -R config/rbac/ $(BUILD_MANIFESTS)/rbac
Expand Down
23 changes: 23 additions & 0 deletions docs/installation/09_RBAC.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@ The CRD can be installed with kubectl
----
kubectl create -f crd/coherence.oracle.com_coherence.yaml
----
To update an existing CRD install use the replace command:
[source,bash]
----
kubectl replace -f crd/coherence.oracle.com_coherence.yaml
----
*Installing the CRD Using `kubectl apply`*
The default Coherence CRD cannot be installed using `kubectl apply` as it is larger than the 1MB limit imposed by Etcd.
For customers who cannot use the `kubectl create/replace` combination, a smaller version of the CRD is available.
This small CRD has no `description` fields which makes is smaller to install, but less useful for validating the yaml
in an IDE.
The small CRD can be found in the coherence-operator-manifests.tar.gz file in the `crd-small/` directory.
[source,bash]
----
kubectl apply -f crd-small/coherence.oracle.com_coherence.yaml
----
====
=== Install Using Helm
Expand Down

0 comments on commit e38775b

Please sign in to comment.