-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
305 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
package lib | ||
|
||
import "sigs.k8s.io/controller-runtime/pkg/client" | ||
|
||
// install Operator | ||
func InstallOperator(ocClient client.Client) error { | ||
// View list of operators available to the cluster from operatorhub | ||
// ❯ oc get packagemanifests | grep volsync | ||
// volsync-product Red Hat Operators 102d | ||
// ❯ oc describe packagemanifests volsync-product Red Hat Operators 102d | ||
// Name: volsync-product | ||
// Namespace: openshift-storage | ||
// Labels: catalog=redhat-operators | ||
// catalog-namespace=openshift-marketplace | ||
// operatorframework.io/arch.amd64=supported | ||
// operatorframework.io/arch.arm64=supported | ||
// operatorframework.io/arch.ppc64le=supported | ||
// operatorframework.io/arch.s390x=supported | ||
// operatorframework.io/os.linux=supported | ||
// provider=Red Hat | ||
// provider-url= | ||
// Annotations: <none> | ||
// API Version: packages.operators.coreos.com/v1 | ||
// Kind: PackageManifest | ||
// Metadata: | ||
// Creation Timestamp: 2022-04-25T15:01:29Z | ||
// Spec: | ||
// Status: | ||
// Catalog Source: redhat-operators | ||
// Catalog Source Display Name: Red Hat Operators | ||
// Catalog Source Namespace: openshift-marketplace | ||
// Catalog Source Publisher: Red Hat | ||
// Channels: | ||
// Current CSV: volsync-product.v0.4.1 | ||
// Current CSV Desc: | ||
// Annotations: | ||
// Alm - Examples: [ | ||
// { | ||
// "apiVersion": "volsync.backube/v1alpha1", | ||
// "kind": "ReplicationDestination", | ||
// "metadata": { | ||
// "name": "replicationdestination-sample" | ||
// }, | ||
// "spec": { | ||
// "rsync": { | ||
// "accessModes": [ | ||
// "ReadWriteOnce" | ||
// ], | ||
// "capacity": "10Gi", | ||
// "copyMethod": "Snapshot", | ||
// "serviceType": "ClusterIP" | ||
// } | ||
// } | ||
// }, | ||
// { | ||
// "apiVersion": "volsync.backube/v1alpha1", | ||
// "kind": "ReplicationSource", | ||
// "metadata": { | ||
// "name": "replicationsource-sample" | ||
// }, | ||
// "spec": { | ||
// "rsync": { | ||
// "address": "my.host.com", | ||
// "copyMethod": "Clone", | ||
// "sshKeys": "secretRef" | ||
// }, | ||
// "sourcePVC": "pvcname", | ||
// "trigger": { | ||
// "schedule": "0 * * * *" | ||
// } | ||
// } | ||
// } | ||
// ] | ||
// Capabilities: Basic Install | ||
// Container Image: registry.redhat.io/rhacm2/volsync-rhel8@sha256:df630925f29753454f0d7de74ac1f2c751921bd73f4c4defaefe4b83154e494c | ||
// Created At: 01 Jul 2022, 18:29 | ||
// operators.openshift.io/infrastructure-features: ["disconnected", "fips"] | ||
// operators.openshift.io/valid-subscription: ["OpenShift Platform Plus", "Red Hat Advanced Cluster Management for Kubernetes"] | ||
// operators.operatorframework.io/builder: operator-sdk-v1.14.0+git | ||
// operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 | ||
// Repository: https://github.com/backube/volsync | ||
// Support: Red Hat | ||
// Apiservicedefinitions: | ||
// Customresourcedefinitions: | ||
// Owned: | ||
// Description: ReplicationDestination defines the destination for a replicated volume | ||
// Display Name: Replication Destination | ||
// Kind: ReplicationDestination | ||
// Name: replicationdestinations.volsync.backube | ||
// Version: v1alpha1 | ||
// Description: ReplicationSource defines the source for a replicated volume | ||
// Display Name: Replication Source | ||
// Kind: ReplicationSource | ||
// Name: replicationsources.volsync.backube | ||
// Version: v1alpha1 | ||
// Description: Asynchronous volume replication for Kubernetes CSI storage | ||
// Display Name: VolSync | ||
// Install Modes: | ||
// Supported: false | ||
// Type: OwnNamespace | ||
// Supported: false | ||
// Type: SingleNamespace | ||
// Supported: false | ||
// Type: MultiNamespace | ||
// Supported: true | ||
// Type: AllNamespaces | ||
// Keywords: | ||
// backup | ||
// csi | ||
// data | ||
// disaster recovery | ||
// replication | ||
// storage | ||
// Links: | ||
// Name: Documentation | ||
// URL: https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.5/html-single/add-ons/index#volsync | ||
// Name: Source | ||
// URL: https://github.com/backube/volsync | ||
// Maintainers: | ||
// Email: [email protected] | ||
// Name: Red Hat ACM Team | ||
// Maturity: alpha | ||
// Min Kube Version: 1.20.0 | ||
// Provider: | ||
// Name: Red Hat | ||
// Related Images: | ||
// registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:b6e06bf125c2c919f4a74098d9bf9bec05122b421213dd6d442de800f5ef3cf7 | ||
// registry.redhat.io/rhacm2/volsync-rhel8@sha256:df630925f29753454f0d7de74ac1f2c751921bd73f4c4defaefe4b83154e494c | ||
// registry.redhat.io/rhacm2/volsync-mover-rsync-rhel8@sha256:e575a16d023af99f0a4f86b1f220c0abaae1e8973e60cb770df82eb5da362ca2 | ||
// registry.redhat.io/rhacm2/volsync-mover-rclone-rhel8@sha256:e39f9f36b0ff65bff5f151d1200b5e855ac1972661c4e531c5138111baac608b | ||
// registry.redhat.io/rhacm2/volsync-mover-restic-rhel8@sha256:37cf9057f86d7b9f5d1dc44ac16f5cba274527391cffcc6d012af2c0bd0ee54b | ||
// Version: 0.4.1 | ||
// Name: acm-2.5 | ||
// Current CSV: volsync-product.v0.4.1 | ||
// Current CSV Desc: | ||
// Annotations: | ||
// Alm - Examples: [ | ||
// { | ||
// "apiVersion": "volsync.backube/v1alpha1", | ||
// "kind": "ReplicationDestination", | ||
// "metadata": { | ||
// "name": "replicationdestination-sample" | ||
// }, | ||
// "spec": { | ||
// "rsync": { | ||
// "accessModes": [ | ||
// "ReadWriteOnce" | ||
// ], | ||
// "capacity": "10Gi", | ||
// "copyMethod": "Snapshot", | ||
// "serviceType": "ClusterIP" | ||
// } | ||
// } | ||
// }, | ||
// { | ||
// "apiVersion": "volsync.backube/v1alpha1", | ||
// "kind": "ReplicationSource", | ||
// "metadata": { | ||
// "name": "replicationsource-sample" | ||
// }, | ||
// "spec": { | ||
// "rsync": { | ||
// "address": "my.host.com", | ||
// "copyMethod": "Clone", | ||
// "sshKeys": "secretRef" | ||
// }, | ||
// "sourcePVC": "pvcname", | ||
// "trigger": { | ||
// "schedule": "0 * * * *" | ||
// } | ||
// } | ||
// } | ||
// ] | ||
// Capabilities: Basic Install | ||
// Container Image: registry.redhat.io/rhacm2/volsync-rhel8@sha256:df630925f29753454f0d7de74ac1f2c751921bd73f4c4defaefe4b83154e494c | ||
// Created At: 01 Jul 2022, 18:29 | ||
// operators.openshift.io/infrastructure-features: ["disconnected", "fips"] | ||
// operators.openshift.io/valid-subscription: ["OpenShift Platform Plus", "Red Hat Advanced Cluster Management for Kubernetes"] | ||
// operators.operatorframework.io/builder: operator-sdk-v1.14.0+git | ||
// operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 | ||
// Repository: https://github.com/backube/volsync | ||
// Support: Red Hat | ||
// Apiservicedefinitions: | ||
// Customresourcedefinitions: | ||
// Owned: | ||
// Description: ReplicationDestination defines the destination for a replicated volume | ||
// Display Name: Replication Destination | ||
// Kind: ReplicationDestination | ||
// Name: replicationdestinations.volsync.backube | ||
// Version: v1alpha1 | ||
// Description: ReplicationSource defines the source for a replicated volume | ||
// Display Name: Replication Source | ||
// Kind: ReplicationSource | ||
// Name: replicationsources.volsync.backube | ||
// Version: v1alpha1 | ||
// Description: Asynchronous volume replication for Kubernetes CSI storage | ||
// Display Name: VolSync | ||
// Install Modes: | ||
// Supported: false | ||
// Type: OwnNamespace | ||
// Supported: false | ||
// Type: SingleNamespace | ||
// Supported: false | ||
// Type: MultiNamespace | ||
// Supported: true | ||
// Type: AllNamespaces | ||
// Keywords: | ||
// backup | ||
// csi | ||
// data | ||
// disaster recovery | ||
// replication | ||
// storage | ||
// Links: | ||
// Name: Documentation | ||
// URL: https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.5/html-single/add-ons/index#volsync | ||
// Name: Source | ||
// URL: https://github.com/backube/volsync | ||
// Maintainers: | ||
// Email: [email protected] | ||
// Name: Red Hat ACM Team | ||
// Maturity: alpha | ||
// Min Kube Version: 1.20.0 | ||
// Provider: | ||
// Name: Red Hat | ||
// Related Images: | ||
// registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:b6e06bf125c2c919f4a74098d9bf9bec05122b421213dd6d442de800f5ef3cf7 | ||
// registry.redhat.io/rhacm2/volsync-rhel8@sha256:df630925f29753454f0d7de74ac1f2c751921bd73f4c4defaefe4b83154e494c | ||
// registry.redhat.io/rhacm2/volsync-mover-rclone-rhel8@sha256:e39f9f36b0ff65bff5f151d1200b5e855ac1972661c4e531c5138111baac608b | ||
// registry.redhat.io/rhacm2/volsync-mover-restic-rhel8@sha256:37cf9057f86d7b9f5d1dc44ac16f5cba274527391cffcc6d012af2c0bd0ee54b | ||
// registry.redhat.io/rhacm2/volsync-mover-rsync-rhel8@sha256:e575a16d023af99f0a4f86b1f220c0abaae1e8973e60cb770df82eb5da362ca2 | ||
// Version: 0.4.1 | ||
// Name: stable | ||
// Default Channel: stable | ||
// Package Name: volsync-product | ||
// Provider: | ||
// Name: Red Hat | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
labels: | ||
operators.coreos.com/volsync-product.openshift-operators: "" | ||
name: volsync-product | ||
namespace: openshift-operators | ||
spec: | ||
channel: stable | ||
installPlanApproval: Automatic | ||
name: volsync-product | ||
source: redhat-operators | ||
sourceNamespace: openshift-marketplace | ||
# v0.4.1 was latest version of the operator. We comment this out so it always install the latest version. | ||
# If it breaks in the future we can re-specify startingCSV to install a specific version. | ||
# startingCSV: volsync-product.v0.4.1 |