generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
19 changed files
with
948 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ | |
/docs/book | ||
|
||
/vendor | ||
/teleport |
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 |
---|---|---|
|
@@ -17,3 +17,4 @@ packages: | |
- name: golangci/[email protected] | ||
- name: tilt-dev/[email protected] | ||
- name: tilt-dev/[email protected] | ||
- name: helm/[email protected] |
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,11 @@ | ||
resources: | ||
- ../default | ||
patchesStrategicMerge: | ||
- ./manager.yaml | ||
secretGenerator: | ||
- name: teleport-api-token | ||
namespace: login-protector-system | ||
files: | ||
- api-access.pem | ||
generatorOptions: | ||
disableNameSuffixHash: true |
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,25 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- command: | ||
- /login-protector | ||
args: | ||
- --leader-elect | ||
- --session-watcher=teleport | ||
- --teleport-api-token=/etc/login-protector/api-access.pem | ||
- --teleport-namespace=teleport | ||
- --teleport-addrs=teleport-auth.teleport.svc.cluster.local:3025 | ||
name: manager | ||
volumeMounts: | ||
- mountPath: /etc/login-protector | ||
name: api-token | ||
volumes: | ||
- name: api-token | ||
secret: | ||
secretName: teleport-api-token |
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,40 @@ | ||
# Teleport Support | ||
|
||
## Development | ||
|
||
```bash | ||
# Install necessary tools. | ||
$ make setup | ||
|
||
# Setup Teleport CLI | ||
$ make setup-teleport | ||
|
||
# Start a test Kubernetes cluster. | ||
$ make start-dev | ||
``` | ||
|
||
```bash | ||
# Deploy Teleport | ||
$ make deploy-teleport | ||
``` | ||
|
||
You can see the following output: | ||
|
||
```console | ||
User "api-access" has been created but requires a password. Share this URL with the user to complete user setup, link is valid for 1h: | ||
https://localhost:3080/web/invite/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
|
||
NOTE: Make sure localhost:3080 points at a Teleport proxy which users can access. | ||
``` | ||
|
||
Open the URL in your browser and set the password for the api-access user. | ||
You should set up MFA(Multi-Factor Authentication). | ||
|
||
```bash | ||
$ ./teleport/tsh login --proxy=localhost:3080 --user=api-access --insecure --ttl=5256000 | ||
$ ./teleport/tctl --auth-server=localhost:3025 auth sign --ttl=87500h --user=api-access --out=./config/teleport/api-access.pem | ||
``` | ||
|
||
```bash | ||
$ kustomize build ./config/teleport | kubectl apply -f - | ||
``` |
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: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- teleport-cluster.yaml | ||
patches: | ||
- path: service-patch.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,52 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: teleport | ||
namespace: teleport | ||
spec: | ||
type: NodePort | ||
ports: | ||
- name: tls | ||
port: 443 | ||
targetPort: 3080 | ||
nodePort: 30080 | ||
protocol: TCP | ||
- name: sshproxy | ||
port: 3023 | ||
targetPort: 3023 | ||
nodePort: 30023 | ||
protocol: TCP | ||
- name: k8s | ||
port: 3026 | ||
targetPort: 3026 | ||
nodePort: 30026 | ||
protocol: TCP | ||
- name: sshtun | ||
port: 3024 | ||
targetPort: 3024 | ||
nodePort: 30024 | ||
protocol: TCP | ||
- name: mysql | ||
port: 3036 | ||
targetPort: 3036 | ||
nodePort: 30036 | ||
protocol: TCP | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: teleport-auth | ||
namespace: teleport | ||
spec: | ||
type: NodePort | ||
ports: | ||
- name: auth | ||
port: 3025 | ||
targetPort: 3025 | ||
nodePort: 31025 | ||
protocol: TCP | ||
- name: kube | ||
port: 3026 | ||
targetPort: 3026 | ||
nodePort: 31026 | ||
protocol: TCP |
Oops, something went wrong.