Skip to content

Conversation

@starpit
Copy link
Contributor

@starpit starpit commented Aug 10, 2022

This should also be helm2 compatible, since the changes are tiny. helm3 is more strict w.r.t. nil values.

This PR also fixes a typo in the values.yaml (quote -> quota), which was probably masked by helm2's more lax nil enforcement.

Signed-off-by: Nick Mitchell nickm@us.ibm.com

This should also be helm2 compatible, since the changes are tiny. Signed-off-by: Nick Mitchell <nickm@us.ibm.com>
@asm582
Copy link
Member

asm582 commented Aug 12, 2022

Thank you @starpit changes look good to me!, can you please add the steps needed to install MCAD with helm3, I can take a stab at updating the documentation of the quota-management branch once you share the instructions here

@asm582 asm582 marked this pull request as ready for review August 12, 2022 16:55
@starpit
Copy link
Contributor Author

starpit commented Aug 12, 2022

what does "install MCAD" mean? do you mean also update deployment/mcad-operator?

@dmatch01 dmatch01 requested a review from asm582 August 12, 2022 20:08
@dmatch01
Copy link
Collaborator

@asm582 Can you review PR?

@asm582
Copy link
Member

asm582 commented Aug 12, 2022

what does "install MCAD" mean? do you mean also update deployment/mcad-operator?

Sure, I was looking for the helm3 command you used to deploy MCAD, can you please share that?

@asm582
Copy link
Member

asm582 commented Aug 14, 2022

oh i see! https://github.com/guidebooks/store/blob/main/guidebooks/kubernetes/mcad/install/mcad.sh#L22-L32

Thanks @starpit, can you please share commands that were used to install helm3?

@asm582
Copy link
Member

asm582 commented Aug 15, 2022

https://raw.githubusercontent.com/guidebooks/store/main/guidebooks/kubernetes/helm3.md

I have pinned on helm version 3.9.3, installing MCAD on minikube shows the below error:

$ helm upgrade --install --wait mcad . ${KUBE_CONTEXT_ARG_HELM} --namespace kube-system --set loglevel=4 --set image.repository=$IMAGE --set image.tag=quota-management-v1.29.40 --set image.pullPolicy=IfNotPresent --set configMap.name=mcad-controller-configmap --set configMap.quotaEnabled='"false"' --set coscheduler.rbac.apiGroup="scheduling.sigs.k8s.io" --set coscheduler.rbac.resource="podgroups" Release "mcad" does not exist. Installing it now. Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: unknown object type "nil" in ConfigMap.data.DISPATCHER_AGENT_CONFIGS (helm3) asmalvan@mcad-dev:~/helm3-upgrade/multi-cluster-app-dispatcher/deployment/mcad-controller$ pwd /home/asmalvan/helm3-upgrade/multi-cluster-app-dispatcher/deployment/mcad-controller 
@starpit
Copy link
Contributor Author

starpit commented Aug 15, 2022

are you sure you have my changes? that's the very problem that this PR addresses, by guarding it in the configmap template:

{{ if .Values.configMap.agentConfigs }}DISPATCHER_AGENT_CONFIGS: {{ .Values.configMap.agentConfigs }}{{ end }} 
@starpit
Copy link
Contributor Author

starpit commented Aug 15, 2022

fwiw, here is the script the guidebooks use: https://github.com/guidebooks/store/blob/main/guidebooks/kubernetes/mcad/install/mcad.sh

i just tried it, and it seemed to work. though i have helm 3.7.2... hopefully that doesn't matter.

@asm582
Copy link
Member

asm582 commented Aug 15, 2022

fwiw, here is the script the guidebooks use: https://github.com/guidebooks/store/blob/main/guidebooks/kubernetes/mcad/install/mcad.sh

i just tried it, and it seemed to work. though i have helm 3.7.2... hopefully that doesn't matter.

Thanks @starpit , good catch was on incorrect branch. it works on minikube:

lm3) asmalvan@mcad-dev:~/helm3-upgrade/multi-cluster-app-dispatcher/deployment/mcad-controller$ helm upgrade --install --wait mcad . --namespace kube-system --set loglevel=4 --set image.repository=darroyo/mcad-controller --set image.tag=quota-management-v1.29.40 --set image.pullPolicy=IfNotPresent --set configMap.name=mcad-controller-configmap --set configMap.quotaEnabled='"false"' --set coscheduler.rbac.apiGroup="scheduling.sigs.k8s.io" --set coscheduler.rbac.resource="podgroups" Release "mcad" does not exist. Installing it now. NAME: mcad LAST DEPLOYED: Mon Aug 15 00:20:49 2022 NAMESPACE: kube-system STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: The batch system of Kubernetes. (helm3) asmalvan@mcad-dev:~/helm3-upgrade/multi-cluster-app-dispatcher/deployment/mcad-controller$ kubectl apply -f /home/asmalvan/multi-cluster-app-dispatcher/deployment/aw-test-field.yaml appwrapper.mcad.ibm.com/0001-aw-generic-deployment-8 created (helm3) asmalvan@mcad-dev:~/helm3-upgrade/multi-cluster-app-dispatcher/deployment/mcad-controller$ kubectl describe appwrapper Name: 0001-aw-generic-deployment-8 Namespace: default Labels: <none> Annotations: <none> API Version: mcad.ibm.com/v1beta1 Kind: AppWrapper Metadata: Creation Timestamp: 2022-08-15T00:21:45Z Generation: 7 Managed Fields: API Version: mcad.ibm.com/v1beta1 Fields Type: FieldsV1 fieldsV1: f:metadata: f:annotations: .: f:kubectl.kubernetes.io/last-applied-configuration: f:spec: .: f:resources: Manager: kubectl-client-side-apply Operation: Update Time: 2022-08-15T00:21:45Z API Version: mcad.ibm.com/v1beta1 Fields Type: FieldsV1 fieldsV1: f:spec: f:resources: f:GenericItems: f:metadata: f:schedulingSpec: f:service: .: f:spec: f:status: .: f:canrun: f:conditions: f:controllerfirsttimestamp: f:filterignore: f:queuejobstate: f:running: f:sender: f:state: Manager: Go-http-client Operation: Update Time: 2022-08-15T00:21:55Z Resource Version: 1421 UID: 7e0f5142-56d7-49d5-86d0-014b22b5180b Spec: Resources: Generic Items: Allocated: 0 Generictemplate: API Version: apps/v1 Kind: Deployment Metadata: Labels: App: 0001-aw-generic-deployment-8 Name: 0001-aw-generic-deployment-8 Spec: Replicas: 1 Selector: Match Labels: App: 0001-aw-generic-deployment-8 Template: Metadata: Labels: App: 0001-aw-generic-deployment-8 Spec: Containers: Image: k8s.gcr.io/echoserver:1.4 Name: 0001-aw-generic-deployment-8 Ports: Container Port: 80 Resources: Limits: Cpu: 300m Memory: 2G Requests: Cpu: 300m Memory: 2G Metadata: Priority: 0 Priorityslope: 0 Replicas: 1 Metadata: Scheduling Spec: Service: Spec: Status: Canrun: true Conditions: Last Transition Micro Time: 2022-08-15T00:21:45.960898Z Last Update Micro Time: 2022-08-15T00:21:45.960896Z Status: True Type: Init Last Transition Micro Time: 2022-08-15T00:21:45.960952Z Last Update Micro Time: 2022-08-15T00:21:45.960952Z Reason: AwaitingHeadOfLine Status: True Type: Queueing Last Transition Micro Time: 2022-08-15T00:21:45.968426Z Last Update Micro Time: 2022-08-15T00:21:45.968421Z Reason: FrontOfQueue. Status: True Type: HeadOfLine Last Transition Micro Time: 2022-08-15T00:21:46.055444Z Last Update Micro Time: 2022-08-15T00:21:46.055444Z Reason: AppWrapperRunnable Status: True Type: Dispatched Last Transition Micro Time: 2022-08-15T00:21:55.097821Z Last Update Micro Time: 2022-08-15T00:21:55.097821Z Reason: PodsRunning Status: True Type: Running Controllerfirsttimestamp: 2022-08-15T00:21:45.960896Z Filterignore: true Queuejobstate: Running Running: 1 Sender: before [syncQueueJob] setRunning State: Running Events: <none> (helm3) asmalvan@mcad-dev:~/helm3-upgrade/multi-cluster-app-dispatcher/deployment/mcad-controller$ kubectl get pods NAME READY STATUS RESTARTS AGE 0001-aw-generic-deployment-8-7f8c568cd8-b2v6p 1/1 Running 0 20s (helm3) asmalvan@mcad-dev:~/helm3-upgrade/multi-cluster-app-dispatcher/deployment/mcad-controller$ kubectl get deployments NAME READY UP-TO-DATE AVAILABLE AGE 0001-aw-generic-deployment-8 1/1 1 1 26s 
@asm582
Copy link
Member

asm582 commented Aug 15, 2022

Approving. LGTM. documentation update PR to follow.

@asm582 asm582 merged commit d5fb53b into project-codeflare:quota-management Aug 15, 2022
@starpit starpit deleted the helm3-qm branch August 15, 2022 12:52
@starpit starpit restored the helm3-qm branch August 17, 2022 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants