Package: cdk8s-aws-lb-controller
cdk8s-aws-lb-controllerSynths an install manifest foraws-load-balancer-controller, based off ofthis repoController version :v2.2.0Overviewinstall.yamlexampleimport{Construct}from'constructs';import{App,Chart,ChartProps}from'cdk8s';import{AwsLoadBalancerController}from'@opencdk8s/cdk8s-aws-lb-controller'exportclassMyChartextendsChart{constructor(scope:Construct,id:string,props:ChartProps={}){super(scope,id,props);newAwsLoadBalancerController(this,'example',{clusterName:'example',})}}constapp=newApp();newMyChart(app,'example');app.synth();install.k8s.yamlapiVersion:apiextensions.k8s.io/v1beta1kind:CustomResourceDefinitionmetadata:annotations:controller-gen.kubebuilder.io/version:v0.4.0labels:app.kubernetes.io/name:aws-load-balancer-controllername:targetgroupbindings.elbv2.k8s.awsspec:additionalPrinterColumns:-JSONPath:.spec.serviceRef.namedescription:The Kubernetes Service's namename:SERVICE-NAMEtype:string-JSONPath:.spec.serviceRef.portdescription:The Kubernetes Service's portname:SERVICE-PORTtype:string-JSONPath:.spec.targetTypedescription:The AWS TargetGroup's TargetTypename:TARGET-TYPEtype:string-JSONPath:.spec.targetGroupARNdescription:The AWS TargetGroup's Amazon Resource Namename:ARNpriority:1type:string-JSONPath:.metadata.creationTimestampname:AGEtype:dategroup:elbv2.k8s.awsnames:categories:-allkind:TargetGroupBindinglistKind:TargetGroupBindingListplural:targetgroupbindingssingular:targetgroupbindingscope:Namespacedsubresources:status:{}validation:openAPIV3Schema:description:TargetGroupBinding is the Schema for the TargetGroupBinding APIproperties:apiVersion:description:"APIVersiondefinestheversionedschemaofthisrepresentationofanobject.Serversshouldconvertrecognizedschemastothelatestinternalvalue,andmayrejectunrecognizedvalues.Moreinfo:https://git.k8s.io/community/contributors/devel/sig-architecture/ap\i-conventions.md#resources"type:stringkind:description:"KindisastringvaluerepresentingtheRESTresourcethisobjectrepresents.Serversmayinferthisfromtheendpointtheclientsubmitsrequeststo.Cannotbeupdated.InCamelCase.Moreinfo:https://git.k8s.io/community/contributors/devel/sig-architecture/ap\i-conventions.md#types-kinds"type:stringmetadata:type:objectspec:description:TargetGroupBindingSpec defines the desired state ofTargetGroupBindingproperties:networking:description:networking provides the networking setup for ELBV2 LoadBalancer toaccess targets in TargetGroup.properties:ingress:description:List of ingress rules to allow ELBV2 LoadBalancer to access targetsin TargetGroup.items:properties:from:description:List of peers which should be able to access the targets inTargetGroup. At least one NetworkingPeer should bespecified.items:description:NetworkingPeer defines the source/destination peer for networkingrules.properties:ipBlock:description:IPBlock defines an IPBlock peer. If specified, none of the otherfields can be set.properties:cidr:description:CIDR i the network CIDR. Both IPV4 or IPV6 CIDR are accepted.type:stringrequired:-cidrtype:objectsecurityGroup:description:SecurityGroup defines a SecurityGroup peer. If specified, none ofthe other fields can be set.properties:groupID:description:GroupID is the EC2 SecurityGroupID.type:stringrequired:-groupIDtype:objecttype:objecttype:arrayports:description:List of ports which should be made accessible on the targets inTargetGroup. If ports is empty or unspecified, itdefaults to all ports with TCP.items:properties:port:anyOf:-type:integer-type:stringdescription:The port which traffic must match. When NodePort endpoints(instanceTargetType) is used, this must be a numericalport. When Port endpoints(ip TargetType) isused, this can be either numerical or named porton pods. if port is unspecified, it defaults toall ports.x-kubernetes-int-or-string:trueprotocol:description:The protocol which traffic must match. If protocol is unspecified,it defaults to TCP.enum:-TCP-UDPtype:stringtype:objecttype:arrayrequired:-from-portstype:objecttype:arraytype:objectserviceRef:description:serviceRef is a reference to a Kubernetes Service and ServicePort.properties:name:description:Name is the name of the Service.type:stringport:anyOf:-type:integer-type:stringdescription:Port is the port of the ServicePort.x-kubernetes-int-or-string:truerequired:-name-porttype:objecttargetGroupARN:description:targetGroupARN is the Amazon Resource Name (ARN) for theTargetGroup.type:stringtargetType:description:targetType is the TargetType of TargetGroup. If unspecified, itwill be automatically inferred.enum:-instance-iptype:stringrequired:-serviceRef-targetGroupARNtype:objectstatus:description:TargetGroupBindingStatus defines the observed state ofTargetGroupBindingproperties:observedGeneration:description:The generation observed by the TargetGroupBinding controller.format:int64type:integertype:objecttype:objectversion:v1alpha1versions:-name:v1alpha1served:truestorage:false-name:v1beta1served:truestorage:truestatus:acceptedNames:kind:""plural:""conditions:[]storedVersions:[]---apiVersion:admissionregistration.k8s.io/v1beta1kind:MutatingWebhookConfigurationmetadata:annotations:cert-manager.io/inject-ca-from:kube-system/aws-load-balancer-serving-certlabels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-webhookwebhooks:-clientConfig:caBundle:Cg==service:name:aws-load-balancer-webhook-servicenamespace:kube-systempath:/mutate-v1-podfailurePolicy:Failname:mpod.elbv2.k8s.awsnamespaceSelector:matchExpressions:-key:elbv2.k8s.aws/pod-readiness-gate-injectoperator:Invalues:-enabledrules:-apiGroups:-""apiVersions:-v1operations:-CREATEresources:-podssideEffects:None-clientConfig:caBundle:Cg==service:name:aws-load-balancer-webhook-servicenamespace:kube-systempath:/mutate-elbv2-k8s-aws-v1beta1-targetgroupbindingfailurePolicy:Failname:mtargetgroupbinding.elbv2.k8s.awsrules:-apiGroups:-elbv2.k8s.awsapiVersions:-v1beta1operations:-CREATE-UPDATEresources:-targetgroupbindingssideEffects:None---apiVersion:v1kind:ServiceAccountmetadata:labels:app.kubernetes.io/component:controllerapp.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-controllernamespace:kube-system---apiVersion:rbac.authorization.k8s.io/v1kind:Rolemetadata:labels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-controller-leader-election-rolenamespace:kube-systemrules:-apiGroups:-""resources:-configmapsverbs:-create-apiGroups:-""resourceNames:-aws-load-balancer-controller-leaderresources:-configmapsverbs:-get-update-patch---apiVersion:rbac.authorization.k8s.io/v1kind:ClusterRolemetadata:labels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-controller-rolerules:-apiGroups:-""resources:-endpointsverbs:-get-list-watch-apiGroups:-""resources:-eventsverbs:-create-patch-apiGroups:-""resources:-namespacesverbs:-get-list-watch-apiGroups:-""resources:-nodesverbs:-get-list-watch-apiGroups:-""resources:-podsverbs:-get-list-watch-apiGroups:-""resources:-pods/statusverbs:-patch-update-apiGroups:-""resources:-secretsverbs:-get-list-watch-apiGroups:-""resources:-servicesverbs:-get-list-patch-update-watch-apiGroups:-""resources:-services/statusverbs:-patch-update-apiGroups:-elbv2.k8s.awsresources:-targetgroupbindingsverbs:-create-delete-get-list-patch-update-watch-apiGroups:-elbv2.k8s.awsresources:-targetgroupbindings/statusverbs:-patch-update-apiGroups:-extensionsresources:-ingressesverbs:-get-list-patch-update-watch-apiGroups:-extensionsresources:-ingresses/statusverbs:-patch-update-apiGroups:-networking.k8s.ioresources:-ingressesverbs:-get-list-patch-update-watch-apiGroups:-networking.k8s.ioresources:-ingressclassesverbs:-get-list-watch-apiGroups:-networking.k8s.ioresources:-ingresses/statusverbs:-patch-update---apiVersion:rbac.authorization.k8s.io/v1kind:RoleBindingmetadata:labels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-controller-leader-election-rolebindingnamespace:kube-systemroleRef:apiGroup:rbac.authorization.k8s.iokind:Rolename:aws-load-balancer-controller-leader-election-rolesubjects:-kind:ServiceAccountname:aws-load-balancer-controllernamespace:kube-system---apiVersion:rbac.authorization.k8s.io/v1kind:ClusterRoleBindingmetadata:labels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-controller-rolebindingroleRef:apiGroup:rbac.authorization.k8s.iokind:ClusterRolename:aws-load-balancer-controller-rolesubjects:-kind:ServiceAccountname:aws-load-balancer-controllernamespace:kube-system---apiVersion:v1kind:Servicemetadata:labels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-webhook-servicenamespace:kube-systemspec:ports:-port:443targetPort:9443selector:app.kubernetes.io/component:controllerapp.kubernetes.io/name:aws-load-balancer-controller---apiVersion:apps/v1kind:Deploymentmetadata:labels:app.kubernetes.io/component:controllerapp.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-controllernamespace:kube-systemspec:replicas:1selector:matchLabels:app.kubernetes.io/component:controllerapp.kubernetes.io/name:aws-load-balancer-controllertemplate:metadata:labels:app.kubernetes.io/component:controllerapp.kubernetes.io/name:aws-load-balancer-controllerspec:containers:-args:---ingress-class=alb---cluster-name=exampleimage:amazon/aws-alb-ingress-controller:v2.1.3livenessProbe:failureThreshold:2httpGet:path:/healthzport:61779scheme:HTTPinitialDelaySeconds:30timeoutSeconds:10name:controllerports:-containerPort:9443name:webhook-serverprotocol:TCPresources:limits:cpu:200mmemory:500Mirequests:cpu:100mmemory:200MisecurityContext:allowPrivilegeEscalation:falsereadOnlyRootFilesystem:truerunAsNonRoot:truevolumeMounts:-mountPath:/tmp/k8s-webhook-server/serving-certsname:certreadOnly:truesecurityContext:fsGroup:1337serviceAccountName:aws-load-balancer-controllerterminationGracePeriodSeconds:10volumes:-name:certsecret:defaultMode:420secretName:aws-load-balancer-webhook-tls---apiVersion:cert-manager.io/v1alpha2kind:Certificatemetadata:labels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-serving-certnamespace:kube-systemspec:dnsNames:-aws-load-balancer-webhook-service.kube-system.svc-aws-load-balancer-webhook-service.kube-system.svc.cluster.localissuerRef:kind:Issuername:aws-load-balancer-selfsigned-issuersecretName:aws-load-balancer-webhook-tls---apiVersion:cert-manager.io/v1alpha2kind:Issuermetadata:labels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-selfsigned-issuernamespace:kube-systemspec:selfSigned:{}---apiVersion:admissionregistration.k8s.io/v1beta1kind:ValidatingWebhookConfigurationmetadata:annotations:cert-manager.io/inject-ca-from:kube-system/aws-load-balancer-serving-certlabels:app.kubernetes.io/name:aws-load-balancer-controllername:aws-load-balancer-webhookwebhooks:-clientConfig:caBundle:Cg==service:name:aws-load-balancer-webhook-servicenamespace:kube-systempath:/validate-elbv2-k8s-aws-v1beta1-targetgroupbindingfailurePolicy:Failname:vtargetgroupbinding.elbv2.k8s.awsrules:-apiGroups:-elbv2.k8s.awsapiVersions:-v1beta1operations:-CREATE-UPDATEresources:-targetgroupbindingssideEffects:NoneInstallationTypeScriptUseyarnornpmto install.$npminstall@opencdk8s/cdk8s-aws-lb-controller$yarnadd@opencdk8s/cdk8s-aws-lb-controllerPython$pipinstallcdk8s-aws-lb-controllerContributionFork (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