generated from terraform-modules/template_aws_submodules
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from terraform-modules/add-example
add examples
- Loading branch information
Showing
339 changed files
with
16,705 additions
and
0 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
examples/established-cluster-examples/alb-controller/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| <!-- Replace all the {fields} with appropriate values --> | ||
| # About alb-controller | ||
|
|
||
| This directory constructs the appropriate resources for an EKS cluster setup for the alb-controller | ||
|
|
||
| <!-- Add additional text here --> | ||
|
|
||
| # Application Information | ||
|
|
||
| * Application: {name of application} | ||
| * Organization: {division} | ||
| * Project: {project} | ||
| * Point of Contact(s): {username list} | ||
| * Creation Date: {yyyy-mm-dd} | ||
| * References: | ||
| * Requirements: {url} | ||
| * Remedy Ticket: {number} | ||
| * Other: {url} | ||
| * Related Configurations: | ||
| * {directory-path} | ||
|
|
||
| # Application Requirements | ||
|
|
||
| <!-- List functional and non-functional requirements here, without implementation details. --> | ||
|
|
||
| # Terraform Directions | ||
|
|
||
| ## Policies | ||
|
|
||
| First, we have to create the two polices. The roles will not get created until they do. | ||
|
|
||
| ```shell | ||
| tf-plan -target=aws_iam_policy.alb-policy | ||
| tf-apply -target=aws_iam_policy.alb-policy | ||
| ``` | ||
|
|
||
| Then apply the rest. We did need to change the ECR to use something in east. | ||
|
|
||
| ```shell | ||
| tf-plan | ||
| tf-apply | ||
| ``` | ||
|
|
||
| ```console | ||
| % kubectl -n kube-system get events | ||
| ``` | ||
|
|
||
| ```console | ||
| % kubectl -n kube-system get pods -o wide | ||
| NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES | ||
| aws-load-balancer-controller-54fdf64896-jzwsr 1/1 Running 0 109m 10.194.26.74 ip-10-194-26-252.ec2.internal <none> <none> | ||
| aws-load-balancer-controller-54fdf64896-qqt6d 1/1 Running 0 109m 10.194.24.242 ip-10-194-24-49.ec2.internal <none> <none> | ||
| aws-node-29kmc 1/1 Running 0 6d4h 10.194.24.90 ip-10-194-24-90.ec2.internal <none> <none> | ||
| aws-node-6d8ls 1/1 Running 1 6d4h 10.194.25.120 ip-10-194-25-120.ec2.internal <none> <none> | ||
| aws-node-6vrbg 1/1 Running 1 6d4h 10.194.26.252 ip-10-194-26-252.ec2.internal <none> <none> | ||
| aws-node-ldgxc 1/1 Running 1 6d4h 10.194.24.49 ip-10-194-24-49.ec2.internal <none> <none> | ||
| coredns-65bfc5645f-g86rx 1/1 Running 0 6d4h 10.194.24.207 ip-10-194-24-90.ec2.internal <none> <none> | ||
| coredns-65bfc5645f-xj9rl 1/1 Running 0 6d4h 10.194.24.69 ip-10-194-24-90.ec2.internal <none> <none> | ||
| efs-csi-controller-65fb886fd4-7slw6 3/3 Running 0 2d 10.194.24.90 ip-10-194-24-90.ec2.internal <none> <none> | ||
| efs-csi-controller-65fb886fd4-vcf9l 3/3 Running 0 2d 10.194.25.120 ip-10-194-25-120.ec2.internal <none> <none> | ||
| efs-csi-node-6t6v6 3/3 Running 0 2d 10.194.25.120 ip-10-194-25-120.ec2.internal <none> <none> | ||
| efs-csi-node-kxqfb 3/3 Running 0 2d 10.194.24.49 ip-10-194-24-49.ec2.internal <none> <none> | ||
| efs-csi-node-p8hzn 3/3 Running 0 2d 10.194.26.252 ip-10-194-26-252.ec2.internal <none> <none> | ||
| efs-csi-node-xxq9h 3/3 Running 0 2d 10.194.24.90 ip-10-194-24-90.ec2.internal <none> <none> | ||
| kube-proxy-78n7f 1/1 Running 0 6d4h 10.194.24.90 ip-10-194-24-90.ec2.internal <none> <none> | ||
| kube-proxy-cms7c 1/1 Running 0 6d4h 10.194.24.49 ip-10-194-24-49.ec2.internal <none> <none> | ||
| kube-proxy-h2t6n 1/1 Running 0 6d4h 10.194.26.252 ip-10-194-26-252.ec2.internal <none> <none> | ||
| kube-proxy-jkxnz 1/1 Running 0 6d4h 10.194.25.120 ip-10-194-25-120.ec2.internal <none> <none> | ||
| ``` | ||
|
|
||
| <!-- No editing needed beyond this point --> | ||
| # Details | ||
|
|
||
| <!-- BEGIN_TF_DOCS --> | ||
| {{ .Content }} | ||
| <!-- END_TF_DOCS --> | ||
|
|
23 changes: 23 additions & 0 deletions
23
examples/established-cluster-examples/alb-controller/charts/alb-controller-crds/.helmignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Patterns to ignore when building packages. | ||
| # This supports shell glob matching, relative path matching, and | ||
| # negation (prefixed with !). Only one pattern per line. | ||
| .DS_Store | ||
| # Common VCS dirs | ||
| .git/ | ||
| .gitignore | ||
| .bzr/ | ||
| .bzrignore | ||
| .hg/ | ||
| .hgignore | ||
| .svn/ | ||
| # Common backup files | ||
| *.swp | ||
| *.bak | ||
| *.tmp | ||
| *.orig | ||
| *~ | ||
| # Various IDEs | ||
| .project | ||
| .idea/ | ||
| *.tmproj | ||
| .vscode/ |
6 changes: 6 additions & 0 deletions
6
examples/established-cluster-examples/alb-controller/charts/alb-controller-crds/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: v2 | ||
| name: alb-controller-crds | ||
| description: Installs the CRDs for the ALB-controller | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "1.0.0" |
62 changes: 62 additions & 0 deletions
62
...blished-cluster-examples/alb-controller/charts/alb-controller-crds/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "alb-controller-crds.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name. | ||
| We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
| If release name contains chart name it will be used as a full name. | ||
| */}} | ||
| {{- define "alb-controller-crds.fullname" -}} | ||
| {{- if .Values.fullnameOverride }} | ||
| {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- $name := default .Chart.Name .Values.nameOverride }} | ||
| {{- if contains $name .Release.Name }} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create chart name and version as used by the chart label. | ||
| */}} | ||
| {{- define "alb-controller-crds.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "alb-controller-crds.labels" -}} | ||
| helm.sh/chart: {{ include "alb-controller-crds.chart" . }} | ||
| {{ include "alb-controller-crds.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "alb-controller-crds.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "alb-controller-crds.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "alb-controller-crds.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "alb-controller-crds.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} |
Oops, something went wrong.