Merge pull request #1079 from eclipse-che/next_chan
commit
0ae0af669a
|
|
@ -38,6 +38,7 @@ jobs:
|
|||
- name: Build and push images to quay.io
|
||||
run: >
|
||||
${GITHUB_WORKSPACE}/olm/buildAndPushBundleImages.sh -c 'next' -p 'openshift' &&
|
||||
${GITHUB_WORKSPACE}/olm/buildAndPushBundleImages.sh -c 'next-all-namespaces' -p 'openshift' &&
|
||||
${GITHUB_WORKSPACE}/olm/buildAndPushBundleImages.sh -c 'next' -p 'kubernetes'
|
||||
env:
|
||||
IMAGE_REGISTRY_HOST: quay.io
|
||||
|
|
|
|||
86
Makefile
86
Makefile
|
|
@ -5,7 +5,6 @@
|
|||
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
|
||||
VERSION ?= 1.0.2
|
||||
|
||||
CHANNELS = "next"
|
||||
|
||||
ifndef VERBOSE
|
||||
MAKEFLAGS += --silent
|
||||
|
|
@ -14,27 +13,6 @@ endif
|
|||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
mkfile_dir := $(dir $(mkfile_path))
|
||||
|
||||
# CHANNELS define the bundle channels used in the bundle.
|
||||
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "preview,fast,stable")
|
||||
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
|
||||
# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=preview,fast,stable)
|
||||
# - use environment variables to overwrite this value (e.g export CHANNELS="preview,fast,stable")
|
||||
ifneq ($(origin CHANNELS), undefined)
|
||||
BUNDLE_CHANNELS := --channels=$(CHANNELS)
|
||||
endif
|
||||
|
||||
DEFAULT_CHANNEL = "next"
|
||||
|
||||
# DEFAULT_CHANNEL defines the default channel used in the bundle.
|
||||
# Add a new line here if you would like to change its default config. (E.g DEFAULT_CHANNEL = "stable")
|
||||
# To re-generate a bundle for any other default channel without changing the default setup, you can:
|
||||
# - use the DEFAULT_CHANNEL as arg of the bundle target (e.g make bundle DEFAULT_CHANNEL=stable)
|
||||
# - use environment variables to overwrite this value (e.g export DEFAULT_CHANNEL="stable")
|
||||
ifneq ($(origin DEFAULT_CHANNEL), undefined)
|
||||
BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL)
|
||||
endif
|
||||
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
|
||||
|
||||
OPERATOR_SDK_BINARY ?= operator-sdk
|
||||
|
||||
# IMAGE_TAG_BASE defines the quay.io namespace and part of the image name for remote images.
|
||||
|
|
@ -466,7 +444,12 @@ update-roles:
|
|||
.PHONY: bundle
|
||||
bundle: generate manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
|
||||
if [ -z "$(platform)" ]; then
|
||||
echo "[INFO] You must specify 'platform' macros. For example: `make bundle platform=kubernetes`"
|
||||
echo "[ERROR] You must specify 'platform' macros. For example: `make bundle platform=kubernetes`"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$(channel)" ]; then
|
||||
echo "[ERROR] You must specify 'channel' macros. For example: `make bundle platform=kubernetes channel=next`"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -476,15 +459,15 @@ bundle: generate manifests kustomize ## Generate bundle manifests and metadata,
|
|||
|
||||
echo "[INFO] Updating OperatorHub bundle for platform '$${platform}'"
|
||||
|
||||
NEXT_BUNDLE_PATH=$$($(MAKE) getBundlePath platform="$${platform}" channel="next" -s)
|
||||
NEW_CSV=$${NEXT_BUNDLE_PATH}/manifests/che-operator.clusterserviceversion.yaml
|
||||
BUNDLE_PATH=$$($(MAKE) getBundlePath platform="$${platform}" channel="$${channel}" -s)
|
||||
NEW_CSV=$${BUNDLE_PATH}/manifests/che-operator.clusterserviceversion.yaml
|
||||
newNextBundleVersion=$$(yq -r ".spec.version" "$${NEW_CSV}")
|
||||
echo "[INFO] Creation new next bundle version: $${newNextBundleVersion}"
|
||||
|
||||
createdAtOld=$$(yq -r ".metadata.annotations.createdAt" "$${NEW_CSV}")
|
||||
|
||||
BUNDLE_PACKAGE="eclipse-che-preview-$(platform)"
|
||||
BUNDLE_DIR="bundle/$(DEFAULT_CHANNEL)/$${BUNDLE_PACKAGE}"
|
||||
BUNDLE_DIR="bundle/"$${channel}"/$${BUNDLE_PACKAGE}"
|
||||
GENERATED_CSV_NAME=$${BUNDLE_PACKAGE}.clusterserviceversion.yaml
|
||||
DESIRED_CSV_NAME=che-operator.clusterserviceversion.yaml
|
||||
GENERATED_CRD_NAME=org.eclipse.che_checlusters.yaml
|
||||
|
|
@ -498,7 +481,8 @@ bundle: generate manifests kustomize ## Generate bundle manifests and metadata,
|
|||
--version $${newNextBundleVersion} \
|
||||
--package $${BUNDLE_PACKAGE} \
|
||||
--output-dir $${BUNDLE_DIR} \
|
||||
$(BUNDLE_METADATA_OPTS)
|
||||
--channels=$(channel) \
|
||||
--default-channel=$(channel)
|
||||
|
||||
rm -rf bundle.Dockerfile
|
||||
|
||||
|
|
@ -521,7 +505,7 @@ bundle: generate manifests kustomize ## Generate bundle manifests and metadata,
|
|||
mv "$${NEW_CSV}.new" "$${NEW_CSV}"
|
||||
fi
|
||||
|
||||
platformCRD="$${NEXT_BUNDLE_PATH}/manifests/org_v1_che_crd.yaml"
|
||||
platformCRD="$${BUNDLE_PATH}/manifests/org_v1_che_crd.yaml"
|
||||
if [ "$${platform}" = "openshift" ]; then
|
||||
yq -riY '.spec.preserveUnknownFields = false' $${platformCRD}
|
||||
fi
|
||||
|
|
@ -655,6 +639,24 @@ bundle: generate manifests kustomize ## Generate bundle manifests and metadata,
|
|||
yq -riSY '(.spec.install.spec.deployments[0].spec.template.spec.containers[0].securityContext."runAsNonRoot") = true' "$${NEW_CSV}"
|
||||
fi
|
||||
|
||||
# set InstallMode for next-all-namespaces
|
||||
if [ "$${channel}" = "next-all-namespaces" ]; then
|
||||
yq -Yi '.spec.installModes[] |= if .type=="OwnNamespace" then .supported |= false else . end' "$${NEW_CSV}"
|
||||
yq -Yi '.spec.installModes[] |= if .type=="SingleNamespace" then .supported |= false else . end' "$${NEW_CSV}"
|
||||
yq -Yi '.spec.installModes[] |= if .type=="MultiNamespace" then .supported |= false else . end' "$${NEW_CSV}"
|
||||
yq -Yi '.spec.installModes[] |= if .type=="AllNamespaces" then .supported |= true else . end' "$${NEW_CSV}"
|
||||
yq -rYi '.metadata.annotations["operatorframework.io/suggested-namespace"] |= "openshift-operators"' "$${NEW_CSV}"
|
||||
|
||||
# Enable by default devWorkspace engine in `next-all-namespaces` channel
|
||||
CSV_CR_SAMPLES=$$(yq -r ".metadata.annotations[\"alm-examples\"] | \
|
||||
fromjson | \
|
||||
( .[] | select(.kind == \"CheCluster\") | .spec.devWorkspace.enable) |= true" $${NEW_CSV} | sed -r 's/"/\\"/g')
|
||||
yq -riY ".metadata.annotations[\"alm-examples\"] = \"$${CSV_CR_SAMPLES}\"" $${NEW_CSV}
|
||||
|
||||
# Set specific OpenShift version
|
||||
echo "\n com.redhat.openshift.versions: \"v4.8\"" >> $${BUNDLE_PATH}/metadata/annotations.yaml
|
||||
fi
|
||||
|
||||
# Base cluster service version file has got correctly sorted CRDs.
|
||||
# They are sorted with help of annotation markers in the api type files ("api/v1" folder).
|
||||
# Example such annotation: +operator-sdk:csv:customresourcedefinitions:order=0
|
||||
|
|
@ -695,8 +697,14 @@ increment-next-version:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
NEXT_BUNDLE_PATH=$$($(MAKE) getBundlePath platform="$(platform)" channel="next" -s)
|
||||
OPM_BUNDLE_MANIFESTS_DIR="$${NEXT_BUNDLE_PATH}/manifests"
|
||||
if [ -z "$(channel)" ]; then
|
||||
echo "[INFO] You must specify 'channel' macros. For example: `make bundle platform=kubernetes channel=next`"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
BUNDLE_PATH=$$($(MAKE) getBundlePath platform="$(platform)" channel="$(channel)" -s)
|
||||
OPM_BUNDLE_MANIFESTS_DIR="$${BUNDLE_PATH}/manifests"
|
||||
CSV="$${OPM_BUNDLE_MANIFESTS_DIR}/che-operator.clusterserviceversion.yaml"
|
||||
|
||||
currentNextVersion=$$(yq -r ".spec.version" "$${CSV}")
|
||||
|
|
@ -753,9 +761,16 @@ get-next-version-increment:
|
|||
|
||||
update-resources: SHELL := /bin/bash
|
||||
update-resources: check-requirements update-resource-images update-roles
|
||||
for platform in 'kubernetes' 'openshift'
|
||||
for platform in 'openshift' 'kubernetes'
|
||||
do
|
||||
$(MAKE) bundle "platform=$${platform}"
|
||||
for channel in 'next-all-namespaces' 'next'
|
||||
do
|
||||
# Skip next-all-namespaces in kubernetes platform, is not supported
|
||||
if [ $${channel} == "next-all-namespaces" ] && [ $${platform} == "kubernetes" ]; then
|
||||
continue
|
||||
fi
|
||||
$(MAKE) bundle platform=$${platform} channel=$${channel}
|
||||
done
|
||||
done
|
||||
|
||||
check-requirements:
|
||||
|
|
@ -842,8 +857,13 @@ bundle-build: ## Build the bundle image.
|
|||
echo "[INFO] You must specify 'platform' macros. For example: `make bundle platform=kubernetes`"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$(channel)" ]; then
|
||||
echo "[INFO] You must specify 'channel' macros. For example: `make bundle platform=kubernetes channel=next`"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUNDLE_PACKAGE="eclipse-che-preview-$(platform)"
|
||||
BUNDLE_DIR="bundle/$(DEFAULT_CHANNEL)/$${BUNDLE_PACKAGE}"
|
||||
BUNDLE_DIR="bundle/$(channel)/$${BUNDLE_PACKAGE}"
|
||||
cd $${BUNDLE_DIR}
|
||||
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
|
||||
cd ../../..
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
FROM scratch
|
||||
|
||||
# Core bundle labels.
|
||||
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
|
||||
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
|
||||
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
|
||||
LABEL operators.operatorframework.io.bundle.package.v1=eclipse-che-preview-openshift
|
||||
LABEL operators.operatorframework.io.bundle.channels.v1=next-all-namespaces
|
||||
LABEL operators.operatorframework.io.bundle.channel.default.v1=next-all-namespaces
|
||||
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.7.1+git
|
||||
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
|
||||
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
|
||||
|
||||
# Labels for testing.
|
||||
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
|
||||
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
|
||||
|
||||
# Copy files to locations specified by labels.
|
||||
COPY manifests /manifests/
|
||||
COPY metadata /metadata/
|
||||
COPY tests/scorecard /tests/scorecard/
|
||||
|
||||
LABEL com.redhat.openshift.versions="v4.8"
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app.kubernetes.io/component: che-operator
|
||||
app.kubernetes.io/instance: che
|
||||
app.kubernetes.io/name: che
|
||||
name: che-operator
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app.kubernetes.io/component: che-operator
|
||||
app.kubernetes.io/instance: che
|
||||
app.kubernetes.io/name: che
|
||||
name: default
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
controller_manager_config.yaml: |
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||
kind: ControllerManagerConfig
|
||||
health:
|
||||
healthProbeBindAddress: :6789
|
||||
metrics:
|
||||
bindAddress: 127.0.0.1:60000
|
||||
webhook:
|
||||
port: 9443
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
resourceName: e79b08a4.org.eclipse.che
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: manager-config
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.4.1
|
||||
creationTimestamp: null
|
||||
name: chebackupserverconfigurations.org.eclipse.che
|
||||
spec:
|
||||
group: org.eclipse.che
|
||||
names:
|
||||
kind: CheBackupServerConfiguration
|
||||
listKind: CheBackupServerConfigurationList
|
||||
plural: chebackupserverconfigurations
|
||||
singular: chebackupserverconfiguration
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: The `CheBackupServerConfiguration` custom resource allows defining and managing Eclipse Che Backup Server Configurations
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: CheBackupServerConfigurationSpec defines the desired state of CheBackupServerConfiguration Only one type of backup server is allowed to be configured per CR.
|
||||
properties:
|
||||
awss3:
|
||||
description: Amazon S3 or compatible alternatives.
|
||||
properties:
|
||||
awsAccessKeySecretRef:
|
||||
description: Reference to secret that contains awsAccessKeyId and awsSecretAccessKey keys.
|
||||
type: string
|
||||
hostname:
|
||||
description: Server hostname, defaults to 's3.amazonaws.com'. Might be customized in case of alternative server.
|
||||
type: string
|
||||
port:
|
||||
description: Backup server port. Usually default value is used. Might be customized in case of alternative server.
|
||||
type: integer
|
||||
protocol:
|
||||
description: Protocol to use when connection to the server. Might be customized in case of alternative server.
|
||||
type: string
|
||||
repositoryPasswordSecretRef:
|
||||
description: Holds reference to a secret with restic repository password under 'repo-password' field to encrypt / decrypt its content.
|
||||
type: string
|
||||
repositoryPath:
|
||||
description: Bucket name and repository, e.g. bucket/repo
|
||||
type: string
|
||||
required:
|
||||
- awsAccessKeySecretRef
|
||||
- repositoryPasswordSecretRef
|
||||
- repositoryPath
|
||||
type: object
|
||||
rest:
|
||||
description: Rest backup server configuration.
|
||||
properties:
|
||||
credentialsSecretRef:
|
||||
description: Secret that contains username and password fields to login into restic server. Note, each repository is encrypted with own password. See ResticRepoPasswordSecretRef field.
|
||||
type: string
|
||||
hostname:
|
||||
description: Backup server host
|
||||
type: string
|
||||
port:
|
||||
description: Backup server port
|
||||
type: integer
|
||||
protocol:
|
||||
description: Protocol to use when connection to the server Defaults to https.
|
||||
type: string
|
||||
repositoryPasswordSecretRef:
|
||||
description: Holds reference to a secret with restic repository password under 'repo-password' field to encrypt / decrypt its content.
|
||||
type: string
|
||||
repositoryPath:
|
||||
description: Restic repository path
|
||||
type: string
|
||||
required:
|
||||
- hostname
|
||||
- repositoryPasswordSecretRef
|
||||
type: object
|
||||
sftp:
|
||||
description: Sftp backup server configuration.
|
||||
properties:
|
||||
hostname:
|
||||
description: Backup server host
|
||||
type: string
|
||||
port:
|
||||
description: Backup server port
|
||||
type: integer
|
||||
repositoryPasswordSecretRef:
|
||||
description: Holds reference to a secret with restic repository password under 'repo-password' field to encrypt / decrypt its content.
|
||||
type: string
|
||||
repositoryPath:
|
||||
description: Restic repository path, relative or absolute, e.g. /srv/repo
|
||||
type: string
|
||||
sshKeySecretRef:
|
||||
description: Private ssh key under 'ssh-privatekey' field for passwordless login
|
||||
type: string
|
||||
username:
|
||||
description: User login on the remote server
|
||||
type: string
|
||||
required:
|
||||
- hostname
|
||||
- repositoryPasswordSecretRef
|
||||
- repositoryPath
|
||||
- sshKeySecretRef
|
||||
- username
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: CheBackupServerConfigurationStatus defines the observed state of CheBackupServerConfiguration
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.4.1
|
||||
creationTimestamp: null
|
||||
name: checlusterbackups.org.eclipse.che
|
||||
spec:
|
||||
group: org.eclipse.che
|
||||
names:
|
||||
kind: CheClusterBackup
|
||||
listKind: CheClusterBackupList
|
||||
plural: checlusterbackups
|
||||
singular: checlusterbackup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: The `CheClusterBackup` custom resource allows defining and managing Eclipse Che backup
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: CheClusterBackupSpec defines the desired state of CheClusterBackup
|
||||
properties:
|
||||
backupServerConfigRef:
|
||||
description: Name of custom resource with a backup server configuration to use for this backup. Note, UseInternalBackupServer field can configure internal backup server automatically.
|
||||
type: string
|
||||
useInternalBackupServer:
|
||||
description: Automatically setup pod with REST backup server and use the server in this configuration. Note, this flag takes precedence and will overwrite existing backup server configuration.
|
||||
type: boolean
|
||||
type: object
|
||||
status:
|
||||
description: CheClusterBackupStatus defines the observed state of CheClusterBackup
|
||||
properties:
|
||||
cheVersion:
|
||||
description: Version that was backed up
|
||||
type: string
|
||||
message:
|
||||
description: Message explaining the state of the backup or an error message
|
||||
type: string
|
||||
snapshotId:
|
||||
description: Last backup snapshot ID
|
||||
type: string
|
||||
stage:
|
||||
description: Describes backup progress
|
||||
type: string
|
||||
state:
|
||||
description: 'Backup progress state: InProgress, Failed, Succeeded'
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.4.1
|
||||
creationTimestamp: null
|
||||
name: checlusterrestores.org.eclipse.che
|
||||
spec:
|
||||
group: org.eclipse.che
|
||||
names:
|
||||
kind: CheClusterRestore
|
||||
listKind: CheClusterRestoreList
|
||||
plural: checlusterrestores
|
||||
singular: checlusterrestore
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: The `CheClusterRestore` custom resource allows defining and managing Eclipse Che restore
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: CheClusterRestoreSpec defines the desired state of CheClusterRestore
|
||||
properties:
|
||||
backupServerConfigRef:
|
||||
description: Name of custom resource with a backup server configuration to use for this restore. Can be omitted if only one server configuration object exists within the namespace.
|
||||
type: string
|
||||
snapshotId:
|
||||
description: If omitted, latest snapshot will be used.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: CheClusterRestoreStatus defines the observed state of CheClusterRestore
|
||||
properties:
|
||||
message:
|
||||
description: Restore result or error message
|
||||
type: string
|
||||
stage:
|
||||
description: Describes phase of restore progress
|
||||
type: string
|
||||
state:
|
||||
description: 'Restore progress state: InProgress, Failed, Succeeded'
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,17 @@
|
|||
annotations:
|
||||
# Core bundle annotations.
|
||||
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
|
||||
operators.operatorframework.io.bundle.manifests.v1: manifests/
|
||||
operators.operatorframework.io.bundle.metadata.v1: metadata/
|
||||
operators.operatorframework.io.bundle.package.v1: eclipse-che-preview-openshift
|
||||
operators.operatorframework.io.bundle.channels.v1: next-all-namespaces
|
||||
operators.operatorframework.io.bundle.channel.default.v1: next-all-namespaces
|
||||
operators.operatorframework.io.metrics.builder: operator-sdk-v1.6.1+git
|
||||
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
|
||||
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
|
||||
|
||||
# Annotations for testing.
|
||||
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
|
||||
operators.operatorframework.io.test.config.v1: tests/scorecard/
|
||||
|
||||
com.redhat.openshift.versions: "v4.8"
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
dependencies:
|
||||
- type: olm.package
|
||||
value:
|
||||
packageName: devworkspace-operator
|
||||
version: ">=0.8.0"
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
apiVersion: scorecard.operatorframework.io/v1alpha3
|
||||
kind: Configuration
|
||||
metadata:
|
||||
name: config
|
||||
stages:
|
||||
- parallel: true
|
||||
tests:
|
||||
- entrypoint:
|
||||
- scorecard-test
|
||||
- basic-check-spec
|
||||
image: quay.io/operator-framework/scorecard-test:v1.7.1
|
||||
labels:
|
||||
suite: basic
|
||||
test: basic-check-spec-test
|
||||
- entrypoint:
|
||||
- scorecard-test
|
||||
- olm-bundle-validation
|
||||
image: quay.io/operator-framework/scorecard-test:v1.7.1
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-bundle-validation-test
|
||||
- entrypoint:
|
||||
- scorecard-test
|
||||
- olm-crds-have-validation
|
||||
image: quay.io/operator-framework/scorecard-test:v1.7.1
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-crds-have-validation-test
|
||||
- entrypoint:
|
||||
- scorecard-test
|
||||
- olm-crds-have-resources
|
||||
image: quay.io/operator-framework/scorecard-test:v1.7.1
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-crds-have-resources-test
|
||||
- entrypoint:
|
||||
- scorecard-test
|
||||
- olm-spec-descriptors
|
||||
image: quay.io/operator-framework/scorecard-test:v1.7.1
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-spec-descriptors-test
|
||||
- entrypoint:
|
||||
- scorecard-test
|
||||
- olm-status-descriptors
|
||||
image: quay.io/operator-framework/scorecard-test:v1.7.1
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-status-descriptors-test
|
||||
|
|
@ -135,7 +135,7 @@ buildBundleImage() {
|
|||
|
||||
pushd "${ROOT_DIR}" || exit
|
||||
|
||||
make bundle-build bundle-push DEFAULT_CHANNEL="${channel}" BUNDLE_IMG="${CATALOG_BUNDLE_IMAGE_NAME_LOCAL}" platform="${platform}" IMAGE_TOOL="${imageTool}"
|
||||
make bundle-build bundle-push channel="${channel}" BUNDLE_IMG="${CATALOG_BUNDLE_IMAGE_NAME_LOCAL}" platform="${platform}" IMAGE_TOOL="${imageTool}"
|
||||
popd || exit
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,12 @@ do
|
|||
continue
|
||||
fi
|
||||
|
||||
NEXT_BUNDLE_PATH=$(getBundlePath "${platform}" "next")
|
||||
if [[ ${CHANNEL} == "tech-preview-stable-all-namespaces" ]]; then
|
||||
NEXT_BUNDLE_PATH=$(getBundlePath "${platform}" "next-all-namespaces")
|
||||
else
|
||||
NEXT_BUNDLE_PATH=$(getBundlePath "${platform}" "next")
|
||||
fi
|
||||
|
||||
LAST_NEXT_CSV="${NEXT_BUNDLE_PATH}/manifests/che-operator.clusterserviceversion.yaml"
|
||||
lastPackageNextVersion=$(yq -r ".spec.version" "${LAST_NEXT_CSV}")
|
||||
echo "[INFO] Last package next version: ${lastPackageNextVersion}"
|
||||
|
|
@ -129,24 +134,10 @@ do
|
|||
-e "s/createdAt:.*$/createdAt: \"$(date -u +%FT%TZ)\"/" "${LAST_NEXT_CSV}" > "${RELEASE_CSV}"
|
||||
|
||||
if [[ ${CHANNEL} == "tech-preview-stable-all-namespaces" ]];then
|
||||
# Set by default devworkspace enabled
|
||||
CR_SAMPLE=$(yq -r ".metadata.annotations.\"alm-examples\"" "${RELEASE_CSV}" | yq -r ".[0] | .spec.devWorkspace.enable |= true | [.]" | sed -r 's/"/\\"/g')
|
||||
yq -rY " (.metadata.annotations.\"alm-examples\") = \"${CR_SAMPLE}\"" "${RELEASE_CSV}" > "${RELEASE_CSV}.old"
|
||||
mv "${RELEASE_CSV}.old" "${RELEASE_CSV}"
|
||||
|
||||
# Move the suggested namespace to openshift-operators.
|
||||
sed -ri 's|operatorframework.io/suggested-namespace: eclipse-che|operatorframework.io/suggested-namespace: openshift-operators|' "${RELEASE_CSV}"
|
||||
|
||||
# Set tech-preview-stable-all-namespaces versions
|
||||
yq -Yi '.spec.replaces |= "'${packageName}'.v'$LAST_RELEASE_VERSION'-all-namespaces"' ${RELEASE_CSV}
|
||||
yq -Yi '.spec.version |= "'${RELEASE}'-all-namespaces"' ${RELEASE_CSV}
|
||||
yq -Yi '.metadata.name |= "eclipse-che-preview-openshift.v'${RELEASE}'-all-namespaces"' ${RELEASE_CSV}
|
||||
|
||||
# Change the install Mode to AllNamespaces by default
|
||||
yq -Yi '.spec.installModes[] |= if .type=="OwnNamespace" then .supported |= false else . end' ${RELEASE_CSV}
|
||||
yq -Yi '.spec.installModes[] |= if .type=="SingleNamespace" then .supported |= false else . end' ${RELEASE_CSV}
|
||||
yq -Yi '.spec.installModes[] |= if .type=="MultiNamespace" then .supported |= false else . end' ${RELEASE_CSV}
|
||||
yq -Yi '.spec.installModes[] |= if .type=="AllNamespaces" then .supported |= true else . end' ${RELEASE_CSV}
|
||||
fi
|
||||
|
||||
# Remove from devWorkspace in stable channel and hide the value from UI
|
||||
|
|
@ -181,12 +172,6 @@ do
|
|||
-e 's/LABEL operators.operatorframework.io.bundle.channel.default.v1=next/LABEL operators.operatorframework.io.bundle.channel.default.v1='$CHANNEL'/' \
|
||||
-i "${BUNDLE_DOCKERFILE}"
|
||||
|
||||
if [[ ${CHANNEL} == "tech-preview-stable-all-namespaces" ]]; then
|
||||
# Set specific OpenShift version
|
||||
echo -e "\nLABEL com.redhat.openshift.versions=\"v4.8\"" >> "${BUNDLE_DOCKERFILE}"
|
||||
echo -e "\n com.redhat.openshift.versions: \"v4.8\"" >> "${ANNOTATION_METADATA_YAML}"
|
||||
fi
|
||||
|
||||
pushd "${CURRENT_DIR}" || true
|
||||
source ${BASE_DIR}/addDigests.sh -w ${BASE_DIR} \
|
||||
-t "${RELEASE}" \
|
||||
|
|
|
|||
Loading…
Reference in New Issue