Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deployment YAML used in IT #70

Merged
merged 2 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ MACHINECLASS_V1 := dev/machineclassv1.yaml
MACHINECLASS_V2 :=
MCM_IMAGE :=
MC_IMAGE :=
# MCM_IMAGE := $(IMAGE_REPOSITORY):v0.40.0
# MC_IMAGE := $(IMAGE_REPOSITORY):v0.5.0
# MCM_IMAGE := eu.gcr.io/gardener-project/gardener/machine-controller-manager:v0.46.0
# MC_IMAGE := $(IMAGE_REPOSITORY):v0.8.0
LEADER_ELECT := "true"

# Below variable is needed when the integration test is run locally
# If Integration Test Suite is to be run locally against clusters then export the below variable
# with MCM deployment name in the cluster
MACHINE_CONTROLLER_MANAGER_DEPLOYMENT_NAME := machine-controller-manager

#########################################
Expand Down
34 changes: 25 additions & 9 deletions kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ metadata:
name: machine-controller-manager
spec:
replicas: 1
selector:
matchLabels:
role: machine-controller-manager
template:
metadata:
labels:
app: machine-controller-manager
role: machine-controller-manager
spec:
containers:
- name: machine-controller-manager
image: eu.gcr.io/gardener-project/gardener/machine-controller-manager:v0.39.0
image: eu.gcr.io/gardener-project/gardener/machine-controller-manager:v0.46.0
imagePullPolicy: Always
command:
- ./machine-controller-manager
- --target-kubeconfig=$(TARGET_KUBECONFIG) # Mandatory Parameter - Filepath to the target cluster's kubeconfig where node objects are expected to join.
- --control-kubeconfig=$(CONTROL_KUBECONFIG) # Optional Parameter - Default value is same as target-kubeconfig - Filepath to the control cluster's kubeconfig where machine objects would be created. Optionally you could also use "inClusterConfig" when pod is running inside control kubeconfig.
- --namespace=$(CONTROL_NAMESPACE) # Optional Parameter - Default value for namespace is 'default' - The control namespace where the controller watches for it's machine objects.
- --target-kubeconfig=/var/lib/machine-controller-manager/kubeconfig #$(TARGET_KUBECONFIG) Mandatory Parameter - Filepath to the target cluster's kubeconfig where node objects are expected to join.
- --control-kubeconfig=inClusterConfig #$(CONTROL_KUBECONFIG) Optional Parameter - Default value is same as target-kubeconfig - Filepath to the control cluster's kubeconfig where machine objects would be created. Optionally you could also use "inClusterConfig" when pod is running inside control kubeconfig.
#- --namespace=$(CONTROL_NAMESPACE) # Optional Parameter - Default value for namespace is 'default' - The control namespace where the controller watches for it's machine objects.
- --safety-up=2 # Optional Parameter - Default value 2 - The number of excess machine objects permitted for any machineSet/machineDeployment beyond its expected number of replicas based on desired and max-surge, we call this the upper-limit. When this upper-limit is reached, the objects are frozen until the number of objects reduce. upper-limit = desired + maxSurge (if applicable) + safetyUp.
- --safety-down=1 # Optional Parameter - Default value 1 - Upper-limit minus safety-down value gives the lower-limit. This is the limits below which any temporarily frozen machineSet/machineDeployment object is unfrozen. lower-limit = desired + maxSurge (if applicable) + safetyUp - safetyDown.
- --machine-safety-overshooting-period=1 # Optional Parameter - Default value 1min - Time period (in time) used to poll for overshooting of machine objects backing a machineSet by safety controller.
Expand All @@ -38,18 +41,22 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
volumeMounts:
- mountPath: /var/lib/machine-controller-manager
name: machine-controller-manager
readOnly: true
- command:
- ./machine-controller
- --control-kubeconfig=$(TARGET_KUBECONFIG) # Mandatory Parameter - Filepath to the target cluster's kubeconfig where node objects are expected to join.
- --target-kubeconfig=$(CONTROL_KUBECONFIG) # Optional Parameter - Default value is same as target-kubeconfig - Filepath to the control cluster's kubeconfig where machine objects would be created. Optionally you could also use "inClusterConfig" when pod is running inside control kubeconfig.
- --namespace=$(CONTROL_NAMESPACE) # Optional Parameter - Default value for namespace is 'default' - The control namespace where the controller watches for it's machine objects.
- --target-kubeconfig=/var/lib/machine-controller-manager/kubeconfig #$(TARGET_KUBECONFIG) Mandatory Parameter - Filepath to the target cluster's kubeconfig where node objects are expected to join.
- --control-kubeconfig=inClusterConfig #$(CONTROL_KUBECONFIG) Optional Parameter - Default value is same as target-kubeconfig - Filepath to the control cluster's kubeconfig where machine objects would be created. Optionally you could also use "inClusterConfig" when pod is running inside control kubeconfig.
#- --namespace=$(CONTROL_NAMESPACE) # Optional Parameter - Default value for namespace is 'default' - The control namespace where the controller watches for it's machine objects.
- --machine-creation-timeout=20m # Optional Parameter - Timeout (in time) used while creation of machine before retrying by recreation.
- --machine-drain-timeout=5m # Optional Parameter - Timeout (in time) used while draining of machine before deletion, beyond which MCM forcefully deletes machine.
- --machine-health-timeout=10m # Optional Parameter - Default value 10mins - Timeout (in time) used while joining (during creation) or re-joining (in case of temporary health issues) of machine before it is declared as failed.
- --machine-safety-orphan-vms-period=30m # Optional Parameter - Default value 30mins - Time period (in time) used to poll for orphan VMs by safety controller.
- --node-conditions=ReadonlyFilesystem,KernelDeadlock,DiskPressure # List of comma-separated/case-sensitive node-conditions which when set to True will change machine to a failed state after MachineHealthTimeout duration. It may further be replaced with a new machine if the machine is backed by a machine-set object.
- --v=3
image: gcr.io/gardener-project/gardener/machine-controller-manager-provider-azure:v0.5.0
image: gcr.io/gardener-project/gardener/machine-controller-manager-provider-azure:v0.8.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
Expand All @@ -73,10 +80,19 @@ spec:
requests:
cpu: 50m
memory: 64Mi
volumeMounts:
- mountPath: /var/lib/machine-controller-manager
name: machine-controller-manager
readOnly: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
securityContext: {}
serviceAccount: machine-controller-manager
serviceAccountName: machine-controller-manager
dnsPolicy: ClusterFirst
restartPolicy: Always
volumes:
- name: machine-controller-manager
secret:
defaultMode: 420
secretName: machine-controller-manager