Skip to content

Commit 8aa9824

Browse files
committed
Start oadp-cli on server startup
Signed-off-by: Joseph <jvaikath@redhat.com>
1 parent 8046d1a commit 8aa9824

File tree

10 files changed

+382
-286
lines changed

10 files changed

+382
-286
lines changed

bundle/manifests/oadp-operator.clusterserviceversion.yaml

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,8 @@ spec:
11471147
value: registry.redhat.io/oadp/oadp-mustgather-rhel8:v1.2
11481148
- name: RELATED_IMAGE_NON_ADMIN_CONTROLLER
11491149
value: quay.io/konveyor/oadp-non-admin:latest
1150+
- name: RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD
1151+
value: quay.io/konveyor/console-cli-download:latest
11501152
image: quay.io/konveyor/oadp-operator:latest
11511153
imagePullPolicy: Always
11521154
livenessProbe:
@@ -1202,40 +1204,6 @@ spec:
12021204
path: token
12031205
- emptyDir: {}
12041206
name: tmp-dir
1205-
- label:
1206-
app: oadp-cli
1207-
name: openshift-adp-oadp-cli-server
1208-
spec:
1209-
replicas: 1
1210-
selector:
1211-
matchLabels:
1212-
app: oadp-cli
1213-
strategy: {}
1214-
template:
1215-
metadata:
1216-
labels:
1217-
app: oadp-cli
1218-
spec:
1219-
containers:
1220-
- image: quay.io/konveyor/oadp-cli-binaries
1221-
name: oadp-cli-server
1222-
resources:
1223-
limits:
1224-
cpu: 100m
1225-
memory: 64Mi
1226-
requests:
1227-
cpu: 50m
1228-
memory: 32Mi
1229-
securityContext:
1230-
allowPrivilegeEscalation: false
1231-
capabilities:
1232-
drop:
1233-
- ALL
1234-
readOnlyRootFilesystem: true
1235-
securityContext:
1236-
runAsNonRoot: true
1237-
serviceAccountName: openshift-adp-controller-manager
1238-
terminationGracePeriodSeconds: 10
12391207
permissions:
12401208
- rules:
12411209
- apiGroups:
@@ -1343,4 +1311,6 @@ spec:
13431311
name: mustgather
13441312
- image: quay.io/konveyor/oadp-non-admin:latest
13451313
name: non-admin-controller
1314+
- image: quay.io/konveyor/console-cli-download:latest
1315+
name: console-cli-download
13461316
version: 99.0.0

bundle/manifests/openshift-adp-cli-server_v1_service.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

cmd/main.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,18 @@ func main() {
270270
setupLog.Error(err, "unable to create controller", "controller", "DataProtectionTest")
271271
os.Exit(1)
272272
}
273-
if err = (&controller.OADPCLIReconciler{
274-
Client: mgr.GetClient(),
275-
Scheme: mgr.GetScheme(),
276-
Namespace: watchNamespace,
277-
}).SetupWithManager(mgr); err != nil {
278-
setupLog.Error(err, "unable to create controller", "controller", "OADPCLI")
273+
//+kubebuilder:scaffold:builder
274+
275+
// Add CLI download setup runnable
276+
if err := mgr.Add(&controller.CLIDownloadSetup{
277+
Client: mgr.GetClient(),
278+
Namespace: watchNamespace,
279+
OperatorName: "openshift-adp-controller-manager",
280+
OperatorNamespace: watchNamespace,
281+
}); err != nil {
282+
setupLog.Error(err, "unable to add CLI download setup")
279283
os.Exit(1)
280284
}
281-
//+kubebuilder:scaffold:builder
282285

283286
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
284287
setupLog.Error(err, "unable to set up health check")

config/default/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ resources:
1818
- ../crd
1919
- ../rbac
2020
- ../manager
21-
- ../oadp-cli
2221
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
2322
# crd/kustomization.yaml
2423
#- ../webhook

config/manager/manager.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ spec:
8888
value: registry.redhat.io/oadp/oadp-mustgather-rhel8:v1.2
8989
- name: RELATED_IMAGE_NON_ADMIN_CONTROLLER
9090
value: quay.io/konveyor/oadp-non-admin:latest
91+
- name: RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD
92+
value: quay.io/konveyor/oadp-cli-binaries:latest
9193
args:
9294
- --leader-elect
9395
image: controller:latest

config/oadp-cli/binary-deployment.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

config/oadp-cli/kustomization.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

config/oadp-cli/service.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)