Skip to content

Commit

Permalink
Add OperandBindinfo example into alm-example (#973)
Browse files Browse the repository at this point in the history
Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca>
  • Loading branch information
YCShen1010 authored Oct 2, 2023
1 parent 6457ed0 commit b692008
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 16 deletions.
4 changes: 3 additions & 1 deletion api/v1alpha1/operandbindinfo_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ type OperandBindInfo struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec OperandBindInfoSpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Spec OperandBindInfoSpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Status OperandBindInfoStatus `json:"status,omitempty"`
}

Expand Down
4 changes: 3 additions & 1 deletion api/v1alpha1/operandconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ type OperandConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec OperandConfigSpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Spec OperandConfigSpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Status OperandConfigStatus `json:"status,omitempty"`
}

Expand Down
4 changes: 3 additions & 1 deletion api/v1alpha1/operandregistry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ type OperandRegistry struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec OperandRegistrySpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Spec OperandRegistrySpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Status OperandRegistryStatus `json:"status,omitempty"`
}

Expand Down
4 changes: 3 additions & 1 deletion api/v1alpha1/operandrequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ type OperandRequest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec OperandRequestSpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Spec OperandRequestSpec `json:"spec,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Status OperandRequestStatus `json:"status,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "operator.ibm.com/v1alpha1",
"kind": "OperandBindInfo",
"metadata": {
"labels": {
"app.kubernetes.io/instance": "operand-deployment-lifecycle-manager",
"app.kubernetes.io/managed-by": "operand-deployment-lifecycle-manager",
"app.kubernetes.io/name": "operand-deployment-lifecycle-manager"
},
"name": "example-service"
},
"spec": {
"bindings": {
"public": {
"configmap": "mongodb-configmap",
"secret": "mongodb-secret"
}
},
"description": "Binding information that should be accessible to MongoDB adopters",
"operand": "mongodb-atlas-kubernetes",
"registry": "example-service"
}
},
{
"apiVersion": "operator.ibm.com/v1alpha1",
"kind": "OperandConfig",
Expand Down Expand Up @@ -59,7 +82,7 @@ metadata:
"installMode": "cluster",
"name": "jaeger",
"namespace": "default",
"packageName": "jaeger"
"packageName": "jaeger",
"sourceName": "community-operators",
"sourceNamespace": "openshift-marketplace"
},
Expand Down Expand Up @@ -110,9 +133,9 @@ metadata:
description: The Operand Deployment Lifecycle Manager provides a Kubernetes CRD-based
API to manage the lifecycle of operands.
olm.skipRange: '>=1.2.0 <1.21.8'
operators.operatorframework.io/builder: operator-sdk-v1.11.0+git
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
operators.openshift.io/infrastructure-features: '["disconnected"]'
operators.operatorframework.io/builder: operator-sdk-v1.24.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/IBM/operand-deployment-lifecycle-manager
support: IBM
labels:
Expand Down
3 changes: 2 additions & 1 deletion bundle/manifests/operator.ibm.com_operandbindinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: OperandBindInfoSpec defines the desired state of OperandBindInfo.
properties:
bindings:
Expand Down Expand Up @@ -88,6 +87,7 @@ spec:
- operand
- registry
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandBindInfoStatus defines the observed state of OperandBindInfo.
properties:
Expand All @@ -100,6 +100,7 @@ spec:
type: string
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
3 changes: 2 additions & 1 deletion bundle/manifests/operator.ibm.com_operandconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: OperandConfigSpec defines the desired state of OperandConfig.
properties:
services:
Expand Down Expand Up @@ -123,6 +122,7 @@ spec:
type: object
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandConfigStatus defines the observed state of OperandConfig.
properties:
Expand All @@ -143,6 +143,7 @@ spec:
description: ServiceStatus defines all the status of a operator.
type: object
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
3 changes: 2 additions & 1 deletion bundle/manifests/operator.ibm.com_operandregistries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: OperandRegistrySpec defines the desired state of OperandRegistry.
properties:
operators:
Expand Down Expand Up @@ -2038,6 +2037,7 @@ spec:
type: object
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandRegistryStatus defines the observed state of OperandRegistry.
properties:
Expand Down Expand Up @@ -2108,6 +2108,7 @@ spec:
OperandRegistry.
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
2 changes: 1 addition & 1 deletion bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ annotations:
operators.operatorframework.io.bundle.package.v1: ibm-odlm
operators.operatorframework.io.bundle.channels.v1: v3.20
operators.operatorframework.io.bundle.channel.default.v1: v3.20
operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0+git
operators.operatorframework.io.metrics.builder: operator-sdk-v1.24.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3

Expand Down
3 changes: 2 additions & 1 deletion config/crd/bases/operator.ibm.com_operandbindinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: OperandBindInfoSpec defines the desired state of OperandBindInfo.
properties:
bindings:
Expand Down Expand Up @@ -86,6 +85,7 @@ spec:
- operand
- registry
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandBindInfoStatus defines the observed state of OperandBindInfo.
properties:
Expand All @@ -98,6 +98,7 @@ spec:
type: string
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
3 changes: 2 additions & 1 deletion config/crd/bases/operator.ibm.com_operandconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: OperandConfigSpec defines the desired state of OperandConfig.
properties:
services:
Expand Down Expand Up @@ -121,6 +120,7 @@ spec:
type: object
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandConfigStatus defines the observed state of OperandConfig.
properties:
Expand All @@ -141,6 +141,7 @@ spec:
description: ServiceStatus defines all the status of a operator.
type: object
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
3 changes: 2 additions & 1 deletion config/crd/bases/operator.ibm.com_operandregistries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ spec:
metadata:
type: object
spec:
x-kubernetes-preserve-unknown-fields: true
description: OperandRegistrySpec defines the desired state of OperandRegistry.
properties:
operators:
Expand Down Expand Up @@ -2036,6 +2035,7 @@ spec:
type: object
type: array
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandRegistryStatus defines the observed state of OperandRegistry.
properties:
Expand Down Expand Up @@ -2106,6 +2106,7 @@ spec:
OperandRegistry.
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/operator.ibm.com_operandrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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 Down Expand Up @@ -131,6 +130,7 @@ spec:
required:
- requests
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: OperandRequestStatus defines the observed state of OperandRequest.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ metadata:
description: The Operand Deployment Lifecycle Manager provides a Kubernetes CRD-based
API to manage the lifecycle of operands.
olm.skipRange: '>=1.2.0 <1.21.8'
operators.openshift.io/infrastructure-features: '["disconnected"]'
operators.operatorframework.io/builder: operator-sdk-v1.2.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
operators.openshift.io/infrastructure-features: '["disconnected"]'
repository: https://github.com/IBM/operand-deployment-lifecycle-manager
support: IBM
labels:
Expand Down
1 change: 1 addition & 0 deletions config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ resources:
- operator_v1alpha1_operandrequest.yaml
- operator_v1alpha1_operandregistry.yaml
- operator_v1alpha1_operandconfig.yaml
- operator_v1alpha1_operandbindinfo.yaml
16 changes: 16 additions & 0 deletions config/samples/operator_v1alpha1_operandbindinfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: operator.ibm.com/v1alpha1
kind: OperandBindInfo
metadata:
labels:
app.kubernetes.io/instance: "operand-deployment-lifecycle-manager"
app.kubernetes.io/managed-by: "operand-deployment-lifecycle-manager"
app.kubernetes.io/name: "operand-deployment-lifecycle-manager"
name: example-service
spec:
bindings:
public:
secret: mongodb-secret
configmap: mongodb-configmap
description: Binding information that should be accessible to MongoDB adopters
operand: mongodb-atlas-kubernetes
registry: example-service

0 comments on commit b692008

Please sign in to comment.