Skip to content

Commit

Permalink
feat(waiter/intern-prac): resources for intern
Browse files Browse the repository at this point in the history
  • Loading branch information
Min Yoon committed Nov 28, 2024
1 parent efe3712 commit 3a1b91f
Show file tree
Hide file tree
Showing 22 changed files with 1,744 additions and 0 deletions.
82 changes: 82 additions & 0 deletions argocd/waiter/intern-prac/00.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: intern-{}
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: intern-{}
namespace: intern-{}
spec:
hostnames:
- 'practice.bacchus.io'
parentRefs:
- kind: Gateway
name: web-gateway
namespace: cilium-system
rules:
- matches:
- path:
type: PathPrefix
value: "/intern-{}"
backendRefs:
- name: practice
port: 80
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: "/"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: intern-{}
namespace: intern-{}
subjects:
- kind: Group
name: [email protected]
roleRef:
kind: ClusterRole
name: edit
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Service
metadata:
name: intern-{}
namespace: intern-{}
spec:
selector:
instance: intern-rbac
ports:
- name: nginx
protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: intern-{}
namespace: intern-{}
labels:
instance: intern-rbac
spec:
replicas: 3
selector:
matchLabels:
instance: intern-rbac
template:
metadata:
labels:
instance: intern-rbac
spec:
containers:
- name: my-nginx
image: nginx:alpine
ports:
- containerPort: 80
22 changes: 22 additions & 0 deletions argocd/waiter/intern-prac/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
namespace: argocd
name: practice
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
destination:
name: in-cluster
namespace: default
# syncPolicy:
# automated:
# prune: true
# selfHeal: true
sources:
- repoURL: https://github.com/bacchus-snu/cd-manifests.git
targetRevision: main
path: argocd/waiter/intern-prac/svc/
---
82 changes: 82 additions & 0 deletions argocd/waiter/intern-prac/svc/01.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: intern-01
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: intern-01
namespace: intern-01
spec:
hostnames:
- 'practice.bacchus.io'
parentRefs:
- kind: Gateway
name: web-gateway
namespace: cilium-system
rules:
- matches:
- path:
type: PathPrefix
value: "/intern-01"
backendRefs:
- name: practice
port: 80
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: "/"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: intern-01
namespace: intern-01
subjects:
- kind: Group
name: [email protected]
roleRef:
kind: ClusterRole
name: edit
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Service
metadata:
name: intern-01
namespace: intern-01
spec:
selector:
instance: intern-rbac
ports:
- name: nginx
protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: intern-01
namespace: intern-01
labels:
instance: intern-rbac
spec:
replicas: 3
selector:
matchLabels:
instance: intern-rbac
template:
metadata:
labels:
instance: intern-rbac
spec:
containers:
- name: my-nginx
image: nginx:alpine
ports:
- containerPort: 80
82 changes: 82 additions & 0 deletions argocd/waiter/intern-prac/svc/02.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: intern-02
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: intern-02
namespace: intern-02
spec:
hostnames:
- 'practice.bacchus.io'
parentRefs:
- kind: Gateway
name: web-gateway
namespace: cilium-system
rules:
- matches:
- path:
type: PathPrefix
value: "/intern-02"
backendRefs:
- name: practice
port: 80
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: "/"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: intern-02
namespace: intern-02
subjects:
- kind: Group
name: [email protected]
roleRef:
kind: ClusterRole
name: edit
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Service
metadata:
name: intern-02
namespace: intern-02
spec:
selector:
instance: intern-rbac
ports:
- name: nginx
protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: intern-02
namespace: intern-02
labels:
instance: intern-rbac
spec:
replicas: 3
selector:
matchLabels:
instance: intern-rbac
template:
metadata:
labels:
instance: intern-rbac
spec:
containers:
- name: my-nginx
image: nginx:alpine
ports:
- containerPort: 80
82 changes: 82 additions & 0 deletions argocd/waiter/intern-prac/svc/03.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: intern-03
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: intern-03
namespace: intern-03
spec:
hostnames:
- 'practice.bacchus.io'
parentRefs:
- kind: Gateway
name: web-gateway
namespace: cilium-system
rules:
- matches:
- path:
type: PathPrefix
value: "/intern-03"
backendRefs:
- name: practice
port: 80
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: "/"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: intern-03
namespace: intern-03
subjects:
- kind: Group
name: [email protected]
roleRef:
kind: ClusterRole
name: edit
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Service
metadata:
name: intern-03
namespace: intern-03
spec:
selector:
instance: intern-rbac
ports:
- name: nginx
protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: intern-03
namespace: intern-03
labels:
instance: intern-rbac
spec:
replicas: 3
selector:
matchLabels:
instance: intern-rbac
template:
metadata:
labels:
instance: intern-rbac
spec:
containers:
- name: my-nginx
image: nginx:alpine
ports:
- containerPort: 80
Loading

0 comments on commit 3a1b91f

Please sign in to comment.