Skip to content
16 changes: 16 additions & 0 deletions bundle/manifests/oadp-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,18 @@ spec:
- get
- list
- watch
- apiGroups:
- console.openshift.io
resources:
- consoleclidownloads
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
- corev1
Expand Down Expand Up @@ -1292,6 +1304,8 @@ spec:
value: quay.io/konveyor/oadp-vmfr-access-sshd:latest
- name: RELATED_IMAGE_VM_FILE_RESTORE_BROWSER
value: quay.io/konveyor/oadp-vmfr-access-filebrowser:latest
- name: RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD
value: quay.io/konveyor/oadp-cli-binaries:latest
image: quay.io/konveyor/oadp-operator:latest
imagePullPolicy: Always
livenessProbe:
Expand Down Expand Up @@ -1462,4 +1476,6 @@ spec:
name: vm-file-restore-ssh
- image: quay.io/konveyor/oadp-vmfr-access-filebrowser:latest
name: vm-file-restore-browser
- image: quay.io/konveyor/oadp-cli-binaries:latest
name: console-cli-download
version: 99.0.0
22 changes: 22 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

snapshotv1api "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
configv1 "github.com/openshift/api/config/v1"
consolev1 "github.com/openshift/api/console/v1"
routev1 "github.com/openshift/api/route/v1"
security "github.com/openshift/api/security/v1"
monitor "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
Expand Down Expand Up @@ -200,6 +201,11 @@ func main() {
os.Exit(1)
}

if err := consolev1.AddToScheme(mgr.GetScheme()); err != nil {
setupLog.Error(err, "unable to add OpenShift console API to scheme")
os.Exit(1)
}

if err := velerov1.AddToScheme(mgr.GetScheme()); err != nil {
setupLog.Error(err, "unable to add Velero APIs to scheme")
os.Exit(1)
Expand Down Expand Up @@ -266,6 +272,22 @@ func main() {
}
//+kubebuilder:scaffold:builder

// Add CLI download setup runnable
// Only add if watchNamespace is set (skip for cluster-scoped mode)
if watchNamespace != "" {
if err := mgr.Add(&controller.CLIDownloadSetup{
Client: mgr.GetClient(),
Namespace: watchNamespace,
OperatorName: "openshift-adp-controller-manager",
OperatorNamespace: watchNamespace,
}); err != nil {
setupLog.Error(err, "unable to add CLI download setup")
os.Exit(1)
}
} else {
setupLog.Info("Skipping CLI download setup - watchNamespace not set")
}

if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up health check")
os.Exit(1)
Expand Down
2 changes: 2 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ spec:
value: quay.io/konveyor/oadp-vmfr-access-sshd:latest
- name: RELATED_IMAGE_VM_FILE_RESTORE_BROWSER
value: quay.io/konveyor/oadp-vmfr-access-filebrowser:latest
- name: RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD
value: quay.io/konveyor/oadp-cli-binaries:latest
args:
- --leader-elect
image: controller:latest
Expand Down
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ rules:
- get
- list
- watch
- apiGroups:
- console.openshift.io
resources:
- consoleclidownloads
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
- corev1
Expand Down
Loading