Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ bundle-manifests:
-q --overwrite --version $(OPERATOR_VERSION) $(BUNDLE_METADATA_OPTS)
$(OPERATOR_SDK) bundle validate ./bundle
$(YQ) eval-all -i '.spec.relatedImages = load("config/manifests/bases/operand-deployment-lifecycle-manager.clusterserviceversion.yaml").spec.relatedImages' bundle/manifests/operand-deployment-lifecycle-manager.clusterserviceversion.yaml
# Need to replace fields this way to avoid changing PROJECT name and CSV file name, which may or may not impact CICD automation
@# Need to replace fields this way to avoid changing PROJECT name and CSV file name, which may or may not impact CICD automation
$(YQ) e -i '.annotations["operators.operatorframework.io.bundle.package.v1"] = "ibm-odlm"' bundle/metadata/annotations.yaml
sed -i'' s/operand-deployment-lifecycle-manager/ibm-odlm/ bundle.Dockerfile

Expand Down
28 changes: 24 additions & 4 deletions api/v1alpha1/operandbindinfo_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
BindInfoFailed BindInfoPhase = "Failed"
BindInfoInit BindInfoPhase = "Initialized"
BindInfoUpdating BindInfoPhase = "Updating"
BindInfoWaiting BindInfoPhase = "Waiting for Secret and/or Configmap from provider"
BindInfoWaiting BindInfoPhase = "Waiting for Bindable resource from provider. One of: Secret, ConfigMap, Route, or Service"
)

// OperandBindInfoSpec defines the desired state of OperandBindInfo.
Expand All @@ -56,17 +56,37 @@ type OperandBindInfoSpec struct {
Description string `json:"description,omitempty"`
// The bindings section is used to specify information about the access/configuration data that is to be shared.
// +optional
Bindings map[string]SecretConfigmap `json:"bindings,omitempty"`
Bindings map[string]Bindable `json:"bindings,omitempty"`
}

// SecretConfigmap is a pair of Secret and/or Configmap.
type SecretConfigmap struct {
// Bindable is a Kubernetes resources to be shared from one namespace to another.
// List of supported resources are Secrets, Configmaps, Services, and Routes.
// Secrets and Configmaps will be copied such that a new Secret/Configmap with
// exactly the same data will be created in the target namespace.
// Services and Routes data will be copied into a configmap in the target
// namespace.
type Bindable struct {
// The secret identifies an existing secret. if it exists, the ODLM will share to the namespace of the OperandRequest.
// +optional
Secret string `json:"secret,omitempty"`
// The configmap identifies an existing configmap object. if it exists, the ODLM will share to the namespace of the OperandRequest.
// +optional
Configmap string `json:"configmap,omitempty"`
// Route data will shared by copying it into a configmap which is then
// created in the target namespace
// +optional
Route *Route `json:"route,omitempty"`
}

// Route represents the name and data inside an OpenShift route.
type Route struct {
// Name is the name of the OpenShift Route resource
// +optional
Name string `json:"name"`
// Data is a key-value pair where the value is a YAML path to a value in the
// OpenShift Route, e.g. .spec.host or .spec.tls.termination
// +optional
Data map[string]string `json:"data"`
}

// OperandBindInfoStatus defines the observed state of OperandBindInfo.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/operandrequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type Operand struct {
Name string `json:"name"`
// The bindings section is used to specify names of secret and/or configmap.
// +optional
Bindings map[string]SecretConfigmap `json:"bindings,omitempty"`
Bindings map[string]Bindable `json:"bindings,omitempty"`
// Kind is used when users want to deploy multiple custom resources.
// Kind identifies the kind of the custom resource.
// +optional
Expand Down
43 changes: 35 additions & 8 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=ibm-odlm
LABEL operators.operatorframework.io.bundle.channels.v1=v4.2
LABEL operators.operatorframework.io.bundle.channel.default.v1=v4.2
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.32.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.29.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down

Large diffs are not rendered by default.

22 changes: 21 additions & 1 deletion bundle/manifests/operator.ibm.com_operandbindinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,33 @@ spec:
properties:
bindings:
additionalProperties:
description: SecretConfigmap is a pair of Secret and/or Configmap.
description: Bindable is a Kubernetes resources to be shared from
one namespace to another. List of supported resources are Secrets,
Configmaps, Services, and Routes. Secrets and Configmaps will
be copied such that a new Secret/Configmap with exactly the same
data will be created in the target namespace. Services and Routes
data will be copied into a configmap in the target namespace.
properties:
configmap:
description: The configmap identifies an existing configmap
object. if it exists, the ODLM will share to the namespace
of the OperandRequest.
type: string
route:
description: Route data will shared by copying it into a configmap
which is then created in the target namespace
properties:
data:
additionalProperties:
type: string
description: Data is a key-value pair where the value is
a YAML path to a value in the OpenShift Route, e.g. .spec.host
or .spec.tls.termination
type: object
name:
description: Name is the name of the OpenShift Route resource
type: string
type: object
secret:
description: The secret identifies an existing secret. if it
exists, the ODLM will share to the namespace of the OperandRequest.
Expand Down
27 changes: 25 additions & 2 deletions bundle/manifests/operator.ibm.com_operandrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,37 @@ spec:
type: string
bindings:
additionalProperties:
description: SecretConfigmap is a pair of Secret and/or
Configmap.
description: Bindable is a Kubernetes resources to be
shared from one namespace to another. List of supported
resources are Secrets, Configmaps, Services, and Routes.
Secrets and Configmaps will be copied such that a
new Secret/Configmap with exactly the same data will
be created in the target namespace. Services and Routes
data will be copied into a configmap in the target
namespace.
properties:
configmap:
description: The configmap identifies an existing
configmap object. if it exists, the ODLM will
share to the namespace of the OperandRequest.
type: string
route:
description: Route data will shared by copying it
into a configmap which is then created in the
target namespace
properties:
data:
additionalProperties:
type: string
description: Data is a key-value pair where
the value is a YAML path to a value in the
OpenShift Route, e.g. .spec.host or .spec.tls.termination
type: object
name:
description: Name is the name of the OpenShift
Route resource
type: string
type: object
secret:
description: The secret identifies an existing secret.
if it exists, the ODLM will share to the namespace
Expand Down
3 changes: 1 addition & 2 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ annotations:
operators.operatorframework.io.bundle.package.v1: ibm-odlm
operators.operatorframework.io.bundle.channels.v1: v4.2
operators.operatorframework.io.bundle.channel.default.v1: v4.2
operators.operatorframework.io.metrics.builder: operator-sdk-v1.32.0
operators.operatorframework.io.metrics.builder: operator-sdk-v1.29.0
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/
22 changes: 21 additions & 1 deletion config/crd/bases/operator.ibm.com_operandbindinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,33 @@ spec:
properties:
bindings:
additionalProperties:
description: SecretConfigmap is a pair of Secret and/or Configmap.
description: Bindable is a Kubernetes resources to be shared from
one namespace to another. List of supported resources are Secrets,
Configmaps, Services, and Routes. Secrets and Configmaps will
be copied such that a new Secret/Configmap with exactly the same
data will be created in the target namespace. Services and Routes
data will be copied into a configmap in the target namespace.
properties:
configmap:
description: The configmap identifies an existing configmap
object. if it exists, the ODLM will share to the namespace
of the OperandRequest.
type: string
route:
description: Route data will shared by copying it into a configmap
which is then created in the target namespace
properties:
data:
additionalProperties:
type: string
description: Data is a key-value pair where the value is
a YAML path to a value in the OpenShift Route, e.g. .spec.host
or .spec.tls.termination
type: object
name:
description: Name is the name of the OpenShift Route resource
type: string
type: object
secret:
description: The secret identifies an existing secret. if it
exists, the ODLM will share to the namespace of the OperandRequest.
Expand Down
27 changes: 25 additions & 2 deletions config/crd/bases/operator.ibm.com_operandrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,37 @@ spec:
type: string
bindings:
additionalProperties:
description: SecretConfigmap is a pair of Secret and/or
Configmap.
description: Bindable is a Kubernetes resources to be
shared from one namespace to another. List of supported
resources are Secrets, Configmaps, Services, and Routes.
Secrets and Configmaps will be copied such that a
new Secret/Configmap with exactly the same data will
be created in the target namespace. Services and Routes
data will be copied into a configmap in the target
namespace.
properties:
configmap:
description: The configmap identifies an existing
configmap object. if it exists, the ODLM will
share to the namespace of the OperandRequest.
type: string
route:
description: Route data will shared by copying it
into a configmap which is then created in the
target namespace
properties:
data:
additionalProperties:
type: string
description: Data is a key-value pair where
the value is a YAML path to a value in the
OpenShift Route, e.g. .spec.host or .spec.tls.termination
type: object
name:
description: Name is the name of the OpenShift
Route resource
type: string
type: object
secret:
description: The secret identifies an existing secret.
if it exists, the ODLM will share to the namespace
Expand Down
25 changes: 23 additions & 2 deletions config/e2e/crd/bases/operator.ibm.com_operandbindinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,37 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: OperandBindInfoSpec defines the desired state of OperandBindInfo.
properties:
bindings:
additionalProperties:
description: SecretConfigmap is a pair of Secret and/or Configmap.
description: Bindable is a Kubernetes resources to be shared from
one namespace to another. List of supported resources are Secrets,
Configmaps, Services, and Routes. Secrets and Configmaps will
be copied such that a new Secret/Configmap with exactly the same
data will be created in the target namespace. Services and Routes
data will be copied into a configmap in the target namespace.
properties:
configmap:
description: The configmap identifies an existing configmap
object. if it exists, the ODLM will share to the namespace
of the OperandRequest.
type: string
route:
description: Route data will shared by copying it into a configmap
which is then created in the target namespace
properties:
data:
additionalProperties:
type: string
description: Data is a key-value pair where the value is
a YAML path to a value in the OpenShift Route, e.g. .spec.host
or .spec.tls.termination
type: object
name:
description: Name is the name of the OpenShift Route resource
type: string
type: object
secret:
description: The secret identifies an existing secret. if it
exists, the ODLM will share to the namespace of the OperandRequest.
Expand Down Expand Up @@ -90,6 +109,7 @@ spec:
- operand
- registry
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandBindInfoStatus defines the observed state of OperandBindInfo.
properties:
Expand All @@ -102,6 +122,7 @@ spec:
type: string
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
Loading