-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
124 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: ClusterIssuer | ||
apiVersion: cert-manager.io/v1 | ||
metadata: | ||
name: ca-bootstrap | ||
spec: | ||
selfSigned: {} |
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,15 @@ | ||
kind: Certificate | ||
apiVersion: cert-manager.io/v1 | ||
metadata: | ||
name: ca-root | ||
namespace: cert-manager | ||
spec: | ||
secretName: ca-root | ||
isCA: true | ||
commonName: ca-root | ||
privateKey: | ||
algorithm: RSA | ||
size: 2048 | ||
issuerRef: | ||
kind: ClusterIssuer | ||
name: ca-bootstrap |
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,7 @@ | ||
kind: ClusterIssuer | ||
apiVersion: cert-manager.io/v1 | ||
metadata: | ||
name: ca-root | ||
spec: | ||
ca: | ||
secretName: ca-root |
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,8 @@ | ||
# Cert Manager as Certificate Authority | ||
|
||
This allows Cert Manager to act as a certificate authority, providing and validating certificates for internal projects. | ||
|
||
see: | ||
- https://cert-manager.io/docs/concepts/ca-injector/ | ||
- https://trstringer.com/admission-control-cert-manager/ | ||
|
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 @@ | ||
kind: Certificate | ||
apiVersion: cert-manager.io/v1 | ||
metadata: | ||
name: server | ||
namespace: amp-system | ||
spec: | ||
issuerRef: | ||
name: ca-root # see ./000-cert-manager/README.md | ||
kind: ClusterIssuer | ||
secretName: server-cert | ||
duration: 2160h | ||
renewBefore: 240h | ||
dnsNames: | ||
- amp.amp-system.svc | ||
isCA: false | ||
privateKey: | ||
algorithm: RSA | ||
size: 2048 | ||
usages: | ||
- client auth | ||
- server auth |
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 @@ | ||
kind: Certificate | ||
apiVersion: cert-manager.io/v1 | ||
metadata: | ||
name: client | ||
namespace: amp-system | ||
spec: | ||
issuerRef: | ||
name: ca-root # see ./000-cert-manager/README.md | ||
kind: ClusterIssuer | ||
secretName: client-cert | ||
duration: 2160h | ||
renewBefore: 240h | ||
dnsNames: | ||
- amp.txn2.com # webhook. see 80-webhook.yml | ||
isCA: false | ||
privateKey: | ||
algorithm: RSA | ||
size: 2048 | ||
usages: | ||
- client auth | ||
- server auth |
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,39 @@ | ||
# AMP System | ||
|
||
Create the `amp-system` Kubernetes namespace. | ||
```shell | ||
kubectl apply -f ./00-namespace.yml | ||
``` | ||
|
||
Create the `amp-system` ServiceAccount, ClusterRole and ClusterRoleBinding | ||
```shell | ||
kubectl apply -f ./01-rbac.yml | ||
``` | ||
|
||
Create the `amp-system` Service | ||
```shell | ||
kubectl apply -f ./10-service.yml | ||
``` | ||
|
||
If using cert-manager (recommended), see ./000-cert-manager/README.md | ||
|
||
Create `server` certificate for AMP | ||
```shell | ||
kubectl apply -f ./21-certificate-webhook-server.yml | ||
``` | ||
|
||
Create `client` certificate for MutatingWebhookConfiguration | ||
```shell | ||
kubectl apply -f ./22-certificate-webhook-client.yml | ||
``` | ||
|
||
Create AMP deployment: | ||
```shell | ||
kubectl apply -f 80-webhook.yml | ||
``` | ||
|
||
Create MutatingWebhookConfiguration: | ||
|
||
```shell | ||
kubectl apply -f 80-webhook.yml | ||
``` |