Categorygithub.com/opencdk8s/cdk8s-aws-lb-controller-api-object-go/opencdk8scdk8sawslbcontrollerapiobject
# README
cdk8s-aws-lb-controller-api-object
API Object for AWS Load Balancer Controller, powered by the cdk8s project and aws-load-balancer-controller 🚀
Overview
import { Construct } from 'constructs';
import { App, Chart, ChartProps } from 'cdk8s';
import { AWSLoadBalancerControllerObject } from '@opencdk8s/cdk8s-aws-lb-controller-api-object'
export class MyChart extends Chart {
constructor(scope: Construct, id: string, props: ChartProps = { }) {
super(scope, id, props);
new AWSLoadBalancerControllerObject(this, 'example', {
metadata: {
annotations: {
'kubernetes.io/ingress.class': 'alb',
}
},
spec: {
rules: [{
host: "example.com",
http: {
paths: [{
path: '/*',
backend: {
serviceName: 'helloworld-svc',
servicePort: 80
}
}]
}
}]
}
})
}
}
const app = new App();
new MyChart(app, 'example1');
app.synth();
Example cdk8s synth
manifest as follows.
manifest.k8s.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: alb
name: example-c89c1904
spec:
rules:
- host: example.com
http:
paths:
- backend:
serviceName: helloworld-svc
servicePort: 80
path: /*
Installation
TypeScript
Use yarn
or npm
to install.
$ npm install @opencdk8s/cdk8s-aws-lb-controller-api-objects
$ yarn add @opencdk8s/cdk8s-aws-lb-controller-api-objects
Python
$ pip install cdk8s-aws-lb-controller-api-objects
Contribution
-
Fork (link)
-
Bootstrap the repo:
yarn install # installs dependencies yarn projen
-
Development scripts:
Command Description yarn compile
Compiles typescript => javascript yarn watch
Watch & compile yarn test
Run unit test & linter through jest yarn test -u
Update jest snapshots yarn run package
Creates a dist
with packages for all languages.yarn build
Compile + test + package yarn bump
Bump version (with changelog) based on [conventional commits] yarn release
Bump + push to master
-
Create a feature branch
-
Commit your changes
-
Rebase your local changes against the master branch
-
Create a new Pull Request (use conventional commits for the title please)
Licence
Author
# Packages
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
# Functions
No description provided by the author
Checks if `x` is a construct.
Renders a Kubernetes manifest for an ingress object.
Returns the `ApiObject` named `Resource` which is a child of the given construct.
Experimental.
Experimental.
Defines an "extentions" API object for AWS Load Balancer Controller - https://github.com/kubernetes-sigs/aws-load-balancer-controller.
Defines an "extentions" API object for AWS Load Balancer Controller - https://github.com/kubernetes-sigs/aws-load-balancer-controller.
# Structs
Experimental.
HTTPIngressPath associates a path regex with a backend.
HTTPIngressRuleValue is a list of http selectors pointing to backends.
IngressBackend describes all endpoints for a given service and port.
IngressRule represents the rules mapping the paths under a specified host to the related backend services.
IngressSpec describes the Ingress the user wishes to exist.
IngressTLS describes the transport layer security associated with an Ingress.
Initializer is information about an initializer that has not yet completed.
Initializers tracks the progress of initialization.
Status is a return value for calls that don't return other objects.
ListMeta describes metadata that synthetic resources must have, including lists and various status objects.
ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
OwnerReference contains enough information to let you identify an owning object.
StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response.