Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add App Mesh controller and injector charts #1

Merged
merged 18 commits into from
Oct 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: 2.1
jobs:
build-test-push:
docker:
- image: circleci/golang:1.13
steps:
- checkout
- run:
name: Install kubectl
command: sudo curl -L https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && sudo chmod +x /usr/local/bin/kubectl
- run:
name: Install kubeval
command: curl -L https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz | tar xz && sudo mv kubeval /bin/kubeval
- run:
name: Install helm
command: curl -L https://storage.googleapis.com/kubernetes-helm/helm-v2.14.3-linux-amd64.tar.gz | tar xz && sudo mv linux-amd64/helm /bin/helm && sudo rm -rf linux-amd64
- run:
name: Initialize helm
command: helm init --client-only --kubeconfig=$HOME/.kube/kubeconfig
- run:
name: Lint stable charts
command: |
helm lint ./stable/*
- run:
name: Validate stable charts
command: |
STABLE="$(git rev-parse --show-toplevel)/stable"
cd ${STABLE}
for d in */; do
echo "Validating chart ${d}"
helm template ${STABLE}/${d} | kubeval --strict --ignore-missing-schemas
done
- run:
name: Package stable charts
command: |
mkdir $HOME/stable
helm package ./stable/* --destination $HOME/stable
- run:
name: Publish stable charts
# TODO: push charts to gh-pages branch using the eks-bot account
command: |
if echo "${CIRCLE_TAG}" | grep -Eq "[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
echo "Publish charts"
else
echo "Not a release! Skip charts publish"
fi

workflows:
version: 2
stable:
jobs:
- build-test-push:
filters:
branches:
ignore:
- gh-pages
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
.DS_Store

bin/
_tmp/

.idea
58 changes: 53 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,61 @@
[![CircleCI](https://circleci.com/gh/aws/eks-charts.svg?style=svg)](https://circleci.com/gh/aws/eks-charts)

## My Project
## EKS Charts

TODO: Fill this README out!
Add the EKS repository to Helm:

Be sure to:
```sh
helm repo add eks https://aws.github.io/eks-charts
```

* Change the title in this README
* Edit your repository description on GitHub
### App Mesh

Create the `appmesh-system` namespace:

```sh
kubectl create ns appmesh-system
```

Apply the App Mesh CRDs:

```sh
kubectl apply -f https://raw.githubusercontent.com/aws/eks-charts/master/stable/appmesh-controller/crds/crds.yaml
```

Install the App Mesh CRD controller:

```sh
helm upgrade -i appmesh-controller eks/appmesh-controller --namespace appmesh-system
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is namespace expected to always be passed? Can we add a default namespace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default namespace is default same as with kubectl. Helm v3 doesn't support namespace definitions and that's a good thing :) it uses the kubectl context for that.

```

Install the App Mesh admission controller:

```sh
helm upgrade -i appmesh-inject eks/appmesh-inject \
--namespace appmesh-system \
--set mesh.create=true \
--set mesh.name=global
```
Comment on lines +33 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below this block, maybe we can have a note about upgrading the existing installation before the helm chart existed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


If you've installed the App Mesh controllers with scripts, you can switch to Helm by
removing the controllers with:
```sh
# remove injector objects
kubectl delete ns appmesh-inject
kubectl delete ClusterRoleBinding aws-app-mesh-inject-binding
kubectl delete ClusterRole aws-app-mesh-inject-cr
kubectl delete MutatingWebhookConfiguration aws-app-mesh-inject

# remove controller objects
kubectl delete ns appmesh-system
kubectl delete ClusterRoleBinding app-mesh-controller-binding
kubectl delete ClusterRole app-mesh-controller
```

**Note** that you shouldn't delete the App Mesh CRDs or the App Mesh custom resources
(virtual nodes or services) in your cluster.
Once you've removed the App Mesh controller and injector objects,
you can proceed with the Helm installation as described above.

## License

21 changes: 21 additions & 0 deletions stable/appmesh-controller/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
6 changes: 6 additions & 0 deletions stable/appmesh-controller/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: appmesh-controller
description: The AWS App Mesh controller Helm chart for Kubernetes
type: application
version: 0.1.0
appVersion: 0.1.2
Loading