Package: cdk8s-cluster-autoscaler-aws
cdk8s-cluster-autoscaler-awsSynths an install manifest forcluster-autoscaler AWSController version :v1.17.3Overviewcluster-autoscaler-autodiscover.yamlexampleimport{Construct}from'constructs';import{App,Chart,ChartProps}from'cdk8s';import{ClusterAutoScaler}from'@opencdk8s/cdk8s-cluster-autoscaler-aws';exportclassMyChartextendsChart{constructor(scope:Construct,id:string,props:ChartProps={}){super(scope,id,props);constclusterName='example';newClusterAutoScaler(this,'example',{createServiceAccount:true,command:[`--node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/${clusterName}`,],})}}constapp=newApp();newMyChart(app,'example');app.synth();cluster-autoscaler-autodiscover.yamlapiVersion:v1kind:ServiceAccountmetadata:labels:k8s-addon:cluster-autoscaler.addons.k8s.iok8s-app:cluster-autoscalername:cluster-autoscalernamespace:kube-system---apiVersion:rbac.authorization.k8s.io/v1kind:ClusterRolemetadata:labels:k8s-addon:cluster-autoscaler.addons.k8s.iok8s-app:cluster-autoscalername:cluster-autoscalerrules:-apiGroups:-""resources:-events-endpointsverbs:-create-patch-apiGroups:-""resources:-pods/evictionverbs:-create-apiGroups:-""resources:-pods/statusverbs:-update-apiGroups:-""resourceNames:-cluster-autoscalerresources:-endpointsverbs:-get-update-apiGroups:-""resources:-nodesverbs:-watch-list-get-update-apiGroups:-""resources:-pods-services-replicationcontrollers-persistentvolumeclaims-persistentvolumesverbs:-watch-list-get-apiGroups:-extensionsresources:-replicasets-daemonsetsverbs:-watch-list-get-apiGroups:-policyresources:-poddisruptionbudgetsverbs:-watch-list-apiGroups:-appsresources:-statefulsets-replicasets-daemonsetsverbs:-watch-list-get-apiGroups:-storage.k8s.ioresources:-storageclasses-csinodesverbs:-watch-list-get-apiGroups:-batch-extensionsresources:-jobsverbs:-get-list-watch-patch-apiGroups:-coordination.k8s.ioresources:-leasesverbs:-create-apiGroups:-coordination.k8s.ioresourceNames:-cluster-autoscalerresources:-leasesverbs:-get-update---apiVersion:rbac.authorization.k8s.io/v1kind:ClusterRoleBindingmetadata:labels:k8s-addon:cluster-autoscaler.addons.k8s.iok8s-app:cluster-autoscalername:cluster-autoscalerroleRef:apiGroup:rbac.authorization.k8s.iokind:ClusterRolename:cluster-autoscalersubjects:-kind:ServiceAccountname:cluster-autoscalernamespace:kube-system---apiVersion:rbac.authorization.k8s.io/v1kind:Rolemetadata:labels:k8s-addon:cluster-autoscaler.addons.k8s.iok8s-app:cluster-autoscalername:cluster-autoscalernamespace:kube-systemrules:-apiGroups:-""resources:-configmapsverbs:-create-list-watch-apiGroups:-""resourceNames:-cluster-autoscaler-status-cluster-autoscaler-priority-expanderresources:-configmapsverbs:-delete-get-update-watch---apiVersion:rbac.authorization.k8s.io/v1kind:RoleBindingmetadata:labels:k8s-addon:cluster-autoscaler.addons.k8s.iok8s-app:cluster-autoscalername:cluster-autoscalernamespace:kube-systemroleRef:apiGroup:rbac.authorization.k8s.iokind:Rolename:cluster-autoscalersubjects:-kind:ServiceAccountname:cluster-autoscalernamespace:kube-system---apiVersion:apps/v1kind:Deploymentmetadata:labels:app:cluster-autoscalername:cluster-autoscalernamespace:kube-systemspec:replicas:1selector:matchLabels:app:cluster-autoscalertemplate:metadata:annotations:prometheus.io/port:"8085"prometheus.io/scrape:"true"labels:app:cluster-autoscalerspec:containers:-command:-./cluster-autoscaler---v=4-----stderrthreshold=info---cloud-provider=aws---skip-nodes-with-local-storage=false---expander=least-waste---node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/exampleimage:k8s.gcr.io/autoscaling/cluster-autoscaler:v1.17.3imagePullPolicy:Alwaysname:cluster-autoscalerresources:limits:cpu:100mmemory:300Mirequests:cpu:100mmemory:300MivolumeMounts:-mountPath:/etc/ssl/certs/ca-certificates.crtname:ssl-certsreadOnly:trueserviceAccountName:cluster-autoscalervolumes:-hostPath:path:/etc/ssl/certs/ca-bundle.crtname:ssl-certsInstallationTypeScriptUseyarnornpmto install.$npminstall@opencdk8s/cdk8s-cluster-autoscaler-aws$yarnadd@opencdk8s/cdk8s-cluster-autoscaler-awsPython$pipinstallcdk8s-cluster-autoscaler-awsContributionFork (link)Bootstrap the repo:npxprojen# generates package.jsonyarninstall# installs dependenciesDevelopment scripts:CommandDescriptionyarn compileCompiles typescript => javascriptyarn watchwatch & compileyarn testRun unit test & linter through jestyarn test -uUpdate jest snapshotsyarn run packageCreates adistwith packages for all languages.yarn buildCompile + test + packageyarn bumpBump version (with changelog) based on [conventional commits]yarn releaseBump + push tomasterCreate a feature branchCommit your changesRebase your local changes against the master branchCreate a new Pull Request (useconventional commitsfor the title please)LicenceApache License, Version 2.0AuthorHunter-Thompson