Skip to content

Commit

Permalink
initial setup of xamples
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Nov 10, 2021
1 parent 49780f7 commit 5d9ea95
Show file tree
Hide file tree
Showing 328 changed files with 16,495 additions and 0 deletions.
77 changes: 77 additions & 0 deletions examples/established-cluster-examples/alb-controller/README.md
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 -->

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/
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"
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 }}
Loading

0 comments on commit 5d9ea95

Please sign in to comment.