-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sandbox): k8s-yaml-to-hcl (#280)
- Loading branch information
1 parent
4f89f3b
commit b69fce4
Showing
54 changed files
with
1,556 additions
and
43 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
File renamed without changes.
File renamed without changes.
46 changes: 46 additions & 0 deletions
46
sandbox/k8s/manifests/audit-ms-example/audit-ms-migration-pod.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,46 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
# network/sourceloop-sanbox: "true" | ||
io.sourceloop.service: audit-ms-migration | ||
name: audit-ms-migration | ||
namespace: sourceloop-sandbox | ||
spec: | ||
containers: | ||
- args: | ||
- sh | ||
- -c | ||
- sleep 60 && npm run db:migrate | ||
env: | ||
- name: DB_DATABASE | ||
value: audit_db | ||
- name: DB_HOST | ||
value: postgres.sourceloop-sandbox.svc.cluster.local | ||
- name: DB_PASSWORD | ||
value: changeme | ||
- name: DB_PORT | ||
value: "5432" | ||
- name: DB_USER | ||
value: postgres | ||
- name: JWT_ISSUER | ||
value: https://loopback4-microservice-catalog | ||
- name: JWT_SECRET | ||
value: i_am_a_strong_secret | ||
- name: LOG_LEVEL | ||
value: debug | ||
- name: NODE_ENV | ||
value: dev | ||
- name: REDIS_DB | ||
value: "0" | ||
- name: REDIS_HOST | ||
value: redis | ||
- name: REDIS_PASSWORD | ||
value: test | ||
- name: REDIS_PORT | ||
value: "6379" | ||
image: localhost:32000/audit-ms-example:latest | ||
name: audit-ms-migration | ||
resources: {} | ||
restartPolicy: OnFailure | ||
status: {} |
File renamed without changes.
File renamed without changes.
66 changes: 66 additions & 0 deletions
66
sandbox/k8s/manifests/auth-multitenant-example/auth-multitenant-migration-pod.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,66 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
# network/sourceloop-sanbox: "true" | ||
io.sourceloop.service: auth-multitenant-migration | ||
name: auth-multitenant-migration | ||
namespace: sourceloop-sandbox | ||
spec: | ||
containers: | ||
- args: | ||
- sh | ||
- -c | ||
- sleep 60 && npm run db:migrate | ||
env: | ||
- name: DB_DATABASE | ||
value: authentication_db | ||
- name: DB_HOST | ||
value: postgres.sourceloop-sandbox.svc.cluster.local | ||
- name: DB_PASSWORD | ||
value: changeme | ||
- name: DB_PORT | ||
value: "5432" | ||
- name: DB_SCHEMA | ||
value: main | ||
- name: DB_USER | ||
value: postgres | ||
- name: JWT_ISSUER | ||
value: https://loopback4-microservice-catalog | ||
- name: JWT_SECRET | ||
value: i_am_a_strong_secret | ||
- name: KEYCLOAK_CALLBACK_URL | ||
value: test | ||
- name: KEYCLOAK_CLIENT_ID | ||
value: test | ||
- name: KEYCLOAK_CLIENT_SECRET | ||
value: test | ||
- name: KEYCLOAK_HOST | ||
value: test | ||
- name: KEYCLOAK_REALM | ||
value: test | ||
- name: LOCALE | ||
value: en | ||
- name: LOG_LEVEL | ||
value: debug | ||
- name: NODE_ENV | ||
value: dev | ||
- name: RATE_LIMITER_MAX_REQS | ||
value: "100" | ||
- name: RATE_LIMITER_WINDOW_MS | ||
value: "100" | ||
- name: REDIS_DB | ||
value: "0" | ||
- name: REDIS_HOST | ||
value: redis | ||
- name: REDIS_PORT | ||
value: "6379" | ||
- name: USER_TEMP_PASSWORD | ||
value: tempP@ssw0rd | ||
- name: X_FRAME_OPTIONS | ||
value: SAMEORIGIN | ||
image: localhost:32000/auth-multitenant-example:latest | ||
name: auth-multitenant-migration | ||
resources: {} | ||
restartPolicy: OnFailure | ||
status: {} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
105 changes: 105 additions & 0 deletions
105
sandbox/k8s/manifests/ingress/sourceloop-sandbox-ingress.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,105 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: sourceloop-sandbox-ingress | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: / | ||
namespace: sourceloop-sandbox | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: health-check-svc | ||
port: | ||
number: 80 | ||
- path: /test-fan-out | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: health-check-svc | ||
port: | ||
number: 80 | ||
- host: pgadmin.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: pgadmin | ||
port: | ||
number: 80 | ||
- host: workflow.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: workflow-ms-example | ||
port: | ||
number: 3000 | ||
- host: video.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: video-conferencing-ms-example | ||
port: | ||
number: 3000 | ||
- host: scheduler.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: scheduler-example | ||
port: | ||
number: 3000 | ||
- host: notification.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: notification-socket-example | ||
port: | ||
number: 3000 | ||
- host: in-mail.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: in-mail-example | ||
port: | ||
number: 3000 | ||
- host: auth.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: auth-multitenant-example | ||
port: | ||
number: 3000 | ||
- host: audit.sourceloop.local | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: audit-ms-example | ||
port: | ||
number: 3000 |
1 change: 0 additions & 1 deletion
1
...espaces/sourceloop-sandbox-namespace.yaml → ...espaces/sourceloop-sandbox-namespace.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
|
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,14 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: sourceloop-sandbox | ||
namespace: sourceloop-sandbox | ||
spec: | ||
ingress: | ||
- from: | ||
- podSelector: | ||
matchLabels: | ||
network/sourceloop-sanbox: "true" | ||
podSelector: | ||
matchLabels: | ||
network/sourceloop-sanbox: "true" |
File renamed without changes.
File renamed without changes.
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 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
io.sourceloop.service: pgadmin | ||
name: pgadmin | ||
namespace: sourceloop-sandbox | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.sourceloop.service: pgadmin | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
# network/sourceloop-sanbox: "true" | ||
io.sourceloop.service: pgadmin | ||
spec: | ||
containers: | ||
- env: | ||
- name: PGADMIN_DEFAULT_EMAIL | ||
value: [email protected] | ||
- name: PGADMIN_DEFAULT_PASSWORD | ||
value: admin | ||
image: dpage/pgadmin4 | ||
name: pgadmin-container | ||
ports: | ||
- containerPort: 80 | ||
resources: {} | ||
volumeMounts: | ||
- mountPath: /root/.pgadmin | ||
name: pgadmin | ||
restartPolicy: Always | ||
volumes: | ||
- name: pgadmin | ||
persistentVolumeClaim: | ||
claimName: pgadmin | ||
status: {} |
15 changes: 15 additions & 0 deletions
15
sandbox/k8s/manifests/pgadmin/pgadmin-persistentvolumeclaim.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,15 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.sourceloop.service: pgadmin | ||
name: pgadmin | ||
namespace: sourceloop-sandbox | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
status: {} |
Oops, something went wrong.