forked from instana/robot-shop
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Killpit/master
Add GKE files to demo
- Loading branch information
Showing
32 changed files
with
957 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
name: robot-shop | ||
version: 1.1.0 | ||
home: https://github.com/instana/robot-shop | ||
description: Sample micoservices application |
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,12 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: robot-shop-gclb | ||
annotations: | ||
kubernetes.io/ingress.backend: "robot-shop" | ||
kubernetes.io/ingress.class: gce | ||
spec: | ||
backend: | ||
serviceName: "robot-shop" | ||
servicePort: 8080 | ||
|
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,17 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
namespace: robot-shop | ||
name: robot-shop | ||
spec: | ||
ingressClassName: gce | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: web | ||
port: | ||
number: 8080 |
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,50 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: cart | ||
labels: | ||
service: cart | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
service: cart | ||
template: | ||
metadata: | ||
labels: | ||
service: cart | ||
spec: | ||
{{ if .Values.psp.enabled }} | ||
serviceAccountName: robot-shop | ||
{{ end }} | ||
containers: | ||
- name: cart | ||
image: {{ .Values.image.repo }}/rs-cart:{{ .Values.image.version }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
# agent networking access | ||
env: | ||
- name: INSTANA_AGENT_HOST | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.hostIP | ||
ports: | ||
- containerPort: 8080 | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 50Mi | ||
{{- with .Values.cart.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.cart.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.cart.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
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 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: cart | ||
spec: | ||
ports: | ||
- name: http | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
service: cart |
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,50 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: catalogue | ||
labels: | ||
service: catalogue | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
service: catalogue | ||
template: | ||
metadata: | ||
labels: | ||
service: catalogue | ||
spec: | ||
{{ if .Values.psp.enabled }} | ||
serviceAccountName: robot-shop | ||
{{ end }} | ||
containers: | ||
- name: catalogue | ||
image: {{ .Values.image.repo }}/rs-catalogue:{{ .Values.image.version }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: INSTANA_AGENT_HOST | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.hostIP | ||
ports: | ||
- containerPort: 8080 | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 50Mi | ||
restartPolicy: Always | ||
{{- with .Values.catalogue.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.catalogue.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.catalogue.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
service: catalogue | ||
name: catalogue | ||
spec: | ||
ports: | ||
- name: http | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
service: catalogue |
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 @@ | ||
{{ if .Values.psp.enabled }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: robot-shop | ||
rules: | ||
- apiGroups: | ||
- policy | ||
resourceNames: | ||
- robot-shop | ||
resources: | ||
- podsecuritypolicies | ||
verbs: | ||
- use | ||
{{ end }} |
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 @@ | ||
{{ if .Values.psp.enabled }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: robot-shop | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: robot-shop | ||
subjects: | ||
- kind: ServiceAccount | ||
name: robot-shop | ||
namespace: robot-shop | ||
{{ end }} |
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,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dispatch | ||
labels: | ||
service: dispatch | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
service: dispatch | ||
template: | ||
metadata: | ||
labels: | ||
service: dispatch | ||
spec: | ||
{{ if .Values.psp.enabled }} | ||
serviceAccountName: robot-shop | ||
{{ end }} | ||
containers: | ||
- name: dispatch | ||
image: {{ .Values.image.repo }}/rs-dispatch:{{ .Values.image.version }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
# agent networking access | ||
- name: INSTANA_AGENT_HOST | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.hostIP | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 50Mi | ||
restartPolicy: Always | ||
{{- with .Values.dispatch.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.dispatch.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.dispatch.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
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,16 @@ | ||
# dispatch just listens to a message queue | ||
# it does not expose any ports | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: dispatch | ||
labels: | ||
service: dispatch | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- name: headless | ||
port: 55555 | ||
targetPort: 0 | ||
selector: | ||
service: dispatch |
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,45 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mongodb | ||
labels: | ||
service: mongodb | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
service: mongodb | ||
template: | ||
metadata: | ||
labels: | ||
service: mongodb | ||
spec: | ||
{{ if .Values.psp.enabled }} | ||
serviceAccountName: robot-shop | ||
{{ end }} | ||
containers: | ||
- name: mongodb | ||
image: {{ .Values.image.repo }}/rs-mongodb:{{ .Values.image.version }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- containerPort: 27017 | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 200Mi | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
restartPolicy: Always | ||
{{- with .Values.mongodb.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.mongodb.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.mongodb.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
service: mongodb | ||
name: mongodb | ||
spec: | ||
ports: | ||
- name: mongo | ||
port: 27017 | ||
targetPort: 27017 | ||
selector: | ||
service: mongodb |
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,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mysql | ||
labels: | ||
service: mysql | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
service: mysql | ||
template: | ||
metadata: | ||
labels: | ||
service: mysql | ||
spec: | ||
{{ if .Values.psp.enabled }} | ||
serviceAccountName: robot-shop | ||
{{ end }} | ||
containers: | ||
- name: mysql | ||
image: {{ .Values.image.repo }}/rs-mysql-db:{{ .Values.image.version }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
# added for Istio | ||
securityContext: | ||
capabilities: | ||
add: ["NET_ADMIN"] | ||
ports: | ||
- containerPort: 3306 | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 1024Mi | ||
requests: | ||
cpu: 100m | ||
memory: 700Mi | ||
restartPolicy: Always | ||
{{- with .Values.mysql.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.mysql.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.mysql.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
Oops, something went wrong.