Skip to content

Commit

Permalink
Set up languagedepot namespace in task setup (#803)
Browse files Browse the repository at this point in the history
This will avoid Skaffold deleting the languagedepot namespace when you
run `skaffold delete`, so it doesn't have to be re-created each time.
  • Loading branch information
rmunn authored May 17, 2024
1 parent 52cb509 commit 0e6739a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ tasks:
- echo "#OTEL_SDK_DISABLED=true" >> deployment/local-dev/local.env
- echo "GOOGLE_OAUTH_CLIENT_ID=__REPLACE__.apps.googleusercontent.com" >> deployment/local-dev/local.env
- echo "GOOGLE_OAUTH_CLIENT_SECRET=__REPLACE__" >> deployment/local-dev/local.env
- kubectl --context=docker-desktop apply -f deployment/setup/namespace.yaml
setup-win:
platforms: [ windows ]
cmds:
Expand Down
42 changes: 17 additions & 25 deletions deployment/local-dev/ingress-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
name: ingress-nginx
---
apiVersion: v1
automountServiceAccountToken: true
kind: ServiceAccount
metadata:
Expand All @@ -17,7 +9,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx
namespace: ingress-nginx
namespace: languagedepot
---
apiVersion: v1
kind: ServiceAccount
Expand All @@ -29,7 +21,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-admission
namespace: ingress-nginx
namespace: languagedepot
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -41,7 +33,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx
namespace: ingress-nginx
namespace: languagedepot
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -131,7 +123,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-admission
namespace: ingress-nginx
namespace: languagedepot
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -251,15 +243,15 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx
namespace: ingress-nginx
namespace: languagedepot
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ingress-nginx
subjects:
- kind: ServiceAccount
name: ingress-nginx
namespace: ingress-nginx
namespace: languagedepot
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand All @@ -271,15 +263,15 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-admission
namespace: ingress-nginx
namespace: languagedepot
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ingress-nginx-admission
subjects:
- kind: ServiceAccount
name: ingress-nginx-admission
namespace: ingress-nginx
namespace: languagedepot
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -297,7 +289,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: ingress-nginx
namespace: ingress-nginx
namespace: languagedepot
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -316,7 +308,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: ingress-nginx-admission
namespace: ingress-nginx
namespace: languagedepot
---
apiVersion: v1
data:
Expand All @@ -334,7 +326,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-controller
namespace: ingress-nginx
namespace: languagedepot
---
apiVersion: v1
kind: Service
Expand All @@ -346,7 +338,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-controller
namespace: ingress-nginx
namespace: languagedepot
spec:
externalTrafficPolicy: Local
ipFamilies:
Expand Down Expand Up @@ -379,7 +371,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-controller-admission
namespace: ingress-nginx
namespace: languagedepot
spec:
ports:
- appProtocol: https
Expand All @@ -402,7 +394,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-controller
namespace: ingress-nginx
namespace: languagedepot
spec:
minReadySeconds: 0
revisionHistoryLimit: 10
Expand Down Expand Up @@ -516,7 +508,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-admission-create
namespace: ingress-nginx
namespace: languagedepot
spec:
template:
metadata:
Expand Down Expand Up @@ -563,7 +555,7 @@ metadata:
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.0
name: ingress-nginx-admission-patch
namespace: ingress-nginx
namespace: languagedepot
spec:
template:
metadata:
Expand Down Expand Up @@ -631,7 +623,7 @@ webhooks:
clientConfig:
service:
name: ingress-nginx-controller-admission
namespace: ingress-nginx
namespace: languagedepot
path: /networking/v1/ingresses
failurePolicy: Fail
matchPolicy: Equivalent
Expand Down
File renamed without changes.

0 comments on commit 0e6739a

Please sign in to comment.