Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
added support to OperandBindInfo for route data
- conditionally does it if Route API exists

Signed-off-by: Henry H Li <[email protected]>
  • Loading branch information
bitscuit committed Nov 2, 2023
commit f585c325d5207cd93395de1b0d80cdcc2450d2ee
15 changes: 15 additions & 0 deletions api/v1alpha1/operandbindinfo_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ type Bindable struct {
// 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
27 changes: 25 additions & 2 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.

15 changes: 15 additions & 0 deletions bundle/manifests/operator.ibm.com_operandbindinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ spec:
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
17 changes: 17 additions & 0 deletions bundle/manifests/operator.ibm.com_operandrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ spec:
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/
15 changes: 15 additions & 0 deletions config/crd/bases/operator.ibm.com_operandbindinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ spec:
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
17 changes: 17 additions & 0 deletions config/crd/bases/operator.ibm.com_operandrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,23 @@ spec:
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: Bindable 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
77 changes: 74 additions & 3 deletions config/e2e/crd/bases/operator.ibm.com_operandrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: The OperandRequestSpec identifies one or more specific operands
(from a specific Registry) that should actually be installed.
properties:
Expand All @@ -77,14 +76,37 @@ spec:
type: string
bindings:
additionalProperties:
description: Bindable 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 Expand Up @@ -135,6 +157,7 @@ spec:
required:
- requests
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandRequestStatus defines the observed state of OperandRequest.
properties:
Expand Down Expand Up @@ -219,7 +242,55 @@ spec:
phase:
description: Phase is the cluster running phase.
type: string
services:
description: Services reflect the status of operands beyond whether
they have been created
items:
properties:
namespace:
type: string
operatorName:
type: string
resources:
description: LastUpdateTime string `json:"lastTransitionTime,omitempty"`
items:
properties:
apiVersion:
type: string
kind:
type: string
managedResources:
description: Message string `json:"message,omitempty"`
items:
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
objectName:
type: string
status:
description: Type string `json:"type,omitempty"`
type: string
type: object
type: array
namespace:
type: string
objectName:
type: string
status:
type: string
type: object
type: array
status:
description: Type string `json:"type,omitempty"`
type: string
type: object
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
Loading