-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add installation manifests, and helm chart (#14)
* Add OWNERS * Add OWNERS * Create charts * Regenerate static manifests * Implement suggestions * Fix crd-init name * Expand RBAC * Expand readme
- Loading branch information
Jakub Błaszczyk
authored
Aug 26, 2019
1 parent
771e2e9
commit 8015edf
Showing
28 changed files
with
1,474 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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,9 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: api-gateway-sa |
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
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
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,12 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: manager-role | ||
rules: | ||
- apiGroups: ["gateway.kyma-project.io"] | ||
resources: ["gates", "gates/status"] | ||
verbs: ["*"] | ||
- apiGroups: ["networking.istio.io"] | ||
resources: ["virtualservices"] | ||
verbs: ["create", "delete", "get", "patch", "list", "watch"] |
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
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,5 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: api-gateway-sa |
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,38 @@ | ||
# Installation guide | ||
|
||
This directory contains two methods of installation for the controller. | ||
|
||
## Static manifests | ||
The `k8s` directory contains static kubernetes manifests generated by kubebuilder. They can be used to quickly deploy a simple installation of the controller (deployment, RBAC). | ||
To install simply run: | ||
|
||
```bash | ||
kubectl apply -f k8s | ||
``` | ||
|
||
## Helm chart | ||
The `helm` directory contains a helm chart for the Gateway controller. It consists of the following elements: | ||
- CustomResourceDefinition(CRD) managed by a job (for installation and upgrade) | ||
- Controller deployment | ||
- RBAC settings | ||
|
||
To install simply run: | ||
|
||
```bash | ||
helm install --name gatekeeper --namespace default helm/api-gateway | ||
``` | ||
|
||
>**NOTE:** This CRD requires and uses the following applications/CRD, which should be installed beforehand: | ||
> - Istio [VirtualService](https://istio.io/docs/reference/config/networking/v1alpha3/virtual-service/) | ||
> - Istio [Policy](https://istio.io/docs/reference/config/istio.authentication.v1alpha1/) | ||
> - Oathkeeper [AccessRule](https://www.ory.sh/docs/oathkeeper/) | ||
> + Oathkeeper CRD resources are available as charts in [this repo](https://github.com/ory/k8s) | ||
## HowTo | ||
Installation example (required tools: `minikube`, `kubectl`, `helm`): | ||
- Create a k8s cluster using minikube (`minikube start --memory=8192 --cpus=4`) | ||
- Installer tiller on the cluster (`helm init`) | ||
- Apply required CRDs (`kubectl apply -f hack/`) | ||
- Install the Gatekeeper chart (`helm install --name gatekeeper --namespace some-namespace install/helm/api-gateway`) | ||
- Create sample resource (`kubectl apply -f config/samples/valid.yaml`) | ||
- Check controller logs (`kubectl logs -n default -lapp.kubernetes.io/name=api-gateway -c api-gateway`) |
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,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 |
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,5 @@ | ||
apiVersion: v2alpha1 | ||
appVersion: "1.0" | ||
description: A Helm chart for Kubernetes | ||
name: api-gateway | ||
version: 0.1.0 |
Oops, something went wrong.