Skip to content

Commit

Permalink
Merge branch 'main' into http-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
MicaiahReid committed Jun 7, 2023
2 parents 285dc0d + 1b192d5 commit f72fc87
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/nginx-service.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: my-nginx-service
namespace: devnet
spec:
ports:
- port: 80
protocol: TCP
selector:
name: my-nginx
14 changes: 14 additions & 0 deletions templates/nginx.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
labels:
name: my-nginx
name: my-nginx
namespace: devnet
spec:
containers:
- name: my-nginx-container
image: nginx:latest
ports:
- containerPort: 80
protocol: TCP
19 changes: 19 additions & 0 deletions templates/stacks-devnet-api-pod.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Pod
metadata:
labels:
name: stacks-devnet-api
name: stacks-devnet-api
namespace: devnet
spec:
containers:
- command:
- ./stacks-devnet-api
name: stacks-devnet-api-container
# image: nginx:latest
image: stacks-devnet-api
imagePullPolicy: Never
ports:
- containerPort: 8477
name: api
protocol: TCP
67 changes: 67 additions & 0 deletions templates/stacks-devnet-api-service.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: stacks-devnet-api-service-account
namespace: devnet

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: stacks-devnet-api-service-account
rules:
- apiGroups: [""]
resources: ["pods", "services", "configmaps", "pvc"]
verbs: ["get", "delete", "create"]

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: stacks-devnet-api-service-account
subjects:
- kind: ServiceAccount
name: stacks-devnet-api-service-account
roleRef:
kind: ClusterRole
name: stacks-devnet-api-service-account
apiGroup: rbac.authorization.k8s.io

---
apiVersion: v1
kind: Pod
metadata:
labels:
name: stacks-devnet-api
name: stacks-devnet-api
namespace: devnet
spec:
serviceAccountName: stacks-devnet-api-service-account
containers:
- command: ["DEVELOPMENT=TRUE ./stacks-devnet-api"]
name: stacks-devnet-api-container
# image: nginx:latest
image: stacks-devnet-api
imagePullPolicy: Never
ports:
- containerPort: 8477
name: api
protocol: TCP

---
apiVersion: v1
kind: Service
metadata:
name: stacks-devnet-api-service
namespace: devnet
spec:
ports:
- name: api
port: 8477
protocol: TCP
targetPort: 8477
nodePort: 30000
selector:
name: stacks-devnet-api
type: NodePort

0 comments on commit f72fc87

Please sign in to comment.