diff --git a/README.md b/README.md index 7ae950b..51206ff 100644 --- a/README.md +++ b/README.md @@ -32,28 +32,11 @@ Key features: - To build and release a docker image for controller : `make IMG=quay.io/project-codeflare/instascale: docker-build docker-push` - Note that the other contents of the Makefile (as well as the `config` and `bin` dirs) exist for future operator development, and are not currently utilized ## Deployment -- Deploy MCAD using steps [here](https://github.com/project-codeflare/multi-cluster-app-dispatcher/blob/main/doc/deploy/deployment.md). -- Deploy InstaScale using commands below: -``` -git clone https://github.com/project-codeflare/instascale.git -cd deployment/ -oc apply -f instascale-configmap.yaml -oc apply -f instascale-sa.yaml -oc apply -f instascale-clusterrole.yaml -oc apply -f instascale-clusterrolebinding.yaml -oc apply -f deployment.yaml -``` +- Deploy InstaScale using: `make deploy` + ## Running an InstaScale deployment locally with Visual Studio Code - Deploy MCAD using steps [here](https://github.com/project-codeflare/multi-cluster-app-dispatcher/blob/main/doc/deploy/deployment.md). -- Deploy InstaScale by following the steps below: -``` -git clone https://github.com/project-codeflare/instascale.git -cd deployment/ -oc apply -f instascale-configmap.yaml -oc apply -f instascale-sa.yaml -oc apply -f instascale-clusterrole.yaml -oc apply -f instascale-clusterrolebinding.yaml -``` + - In Visual Studio Code update `.vscode/launch.json` so that `"KUBECONFIG"` points to your Kubernetes config file.
- If you changed the namespace in `instascale-configmap.yaml` update the `args[]` in `launch.json` to include `--configs-namespace=""`.
- You can now run the local deployment with the debugger. diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index cf11cec..e9f145f 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -39,13 +39,12 @@ spec: httpGet: path: /healthz port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 + periodSeconds: 5 + timeoutSeconds: 5 readinessProbe: httpGet: path: /readyz port: 8081 - initialDelaySeconds: 5 periodSeconds: 10 # TODO(user): Configure the resources accordingly based on the project requirements. # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 6eac591..ebe6d0c 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -49,3 +49,18 @@ rules: - get - patch - update +- apiGroups: + - "" + resourceNames: + - instascale-ocm-secret + resources: + - secrets + verbs: + - get +- apiGroups: + - config.openshift.io + resources: + - clusterversions + verbs: + - get + - update \ No newline at end of file diff --git a/deployment/deployment.yaml b/deployment/deployment.yaml deleted file mode 100644 index 654fea4..0000000 --- a/deployment/deployment.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: instascale - name: instascale - namespace: kube-system -spec: - replicas: 1 - selector: - matchLabels: - app: instascale - template: - metadata: - labels: - app: instascale - spec: - containers: - - image: quay.io/project-codeflare/instascale-controller:latest - name: instascale - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "2G" - serviceAccountName: instascale-sa diff --git a/deployment/instascale-clusterrole.yaml b/deployment/instascale-clusterrole.yaml deleted file mode 100644 index bdc9212..0000000 --- a/deployment/instascale-clusterrole.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: instascale-cr -rules: -- apiGroups: - - "" - resources: - - nodes - - configmaps - verbs: - - list - - watch - - get - - create - - update - - delete - - patch - -- apiGroups: - - apps - resources: - - deployments - verbs: - - list - - watch - - get -- apiGroups: - - machine.openshift.io - resources: - - "*" - verbs: - - list - - watch - - get - - create - - update - - delete - - patch - -- apiGroups: - - mcad.ibm.com - resources: - - appwrappers - verbs: - - list - - watch - - get - - create - - update - - delete - - patch - -- apiGroups: - - "" - resourceNames: - - instascale-ocm-secret - resources: - - secrets - verbs: - - get - -- apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch diff --git a/deployment/instascale-clusterrolebinding.yaml b/deployment/instascale-clusterrolebinding.yaml deleted file mode 100644 index 8f36d96..0000000 --- a/deployment/instascale-clusterrolebinding.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - creationTimestamp: null - name: instascale-crb -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: instascale-cr -subjects: -- kind: ServiceAccount - name: instascale-sa - namespace: kube-system diff --git a/deployment/instascale-configmap.yaml b/deployment/instascale-configmap.yaml deleted file mode 100644 index a16657e..0000000 --- a/deployment/instascale-configmap.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: instascale-config - namespace: kube-system -data: - maxScaleoutAllowed: "15" diff --git a/deployment/instascale-sa.yaml b/deployment/instascale-sa.yaml deleted file mode 100644 index a18db55..0000000 --- a/deployment/instascale-sa.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - creationTimestamp: null - name: instascale-sa - namespace: kube-system