Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from datreeio/k8s-demo-file
Browse files Browse the repository at this point in the history
fix: update k8s-demo file to match docs
  • Loading branch information
Eyar Zilberman authored Apr 20, 2021
2 parents d9d87a6 + ab955aa commit 8ba2e56
Showing 1 changed file with 14 additions and 151 deletions.
165 changes: 14 additions & 151 deletions internal/fixtures/kube/k8s-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,53 +1,14 @@
apiVersion: extensions/v1beta1
kind: Pod
metadata:
name: static-web
namespace: test
labels:
role: .myrole
spec:
serviceAccount: my-service-account
hostPID: true
hostIPC: true
hostNetwork: true
containers:
- name: web
image: nginx:latest
securityContext:
privileged: true
runAsUser: 2000
livenessProbe:
httpGet:
path: /health
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: "64Mi"
limits:
memory: "128Mi"
ports:
- name: web
containerPort: 80
protocol: TCP
---
apiVersion: kubeadm.k8s.io/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: rss-site
namespace: default
namespace: test
labels:
owner: [email protected]
owner: --
environment: prod
app: web
spec:
replicas: 1
replicas: 2
selector:
matchLabels:
app: web
Expand All @@ -57,140 +18,42 @@ spec:
labels:
app: web
spec:
restartPolicy: Never
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
containers:
- name: front-end
image: nginx@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
livenessProbe:
httpGet:
path: /healthz
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
image: nginx:latest
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: "64Mi"
memory: "64Mi"
cpu: "64m"
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 80
- name: rss-reader
image: nickchase/nginx@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
securityContext:
runAsUser: 100
image: datree/nginx@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
livenessProbe:
httpGet:
path: /healthz
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
- name: Custom-Header
value: Awesome
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
memory: "64Mi"
cpu: "64Mi"
cpu: "64m"
memory: "128Mi"
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 88
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-wildcard-host
labels:
owner: [email protected]
environment: prod
spec:
rules:
- host: "*"
http:
paths:
- pathType: Prefix
path: "/bar"
backend:
service:
name: service1
port:
number: 80
---
apiVersion: v1
kind: Service
metadata:
name: my-service
labels:
owner: [email protected]
spec:
type: NodePort
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hello
namespace: test
labels:
owner: [email protected]
spec:
schedule: "1 * * *"
jobTemplate:
spec:
template:
spec:
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker
containers:
- name: hello
image: busybox
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: php-apache
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
---
apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: InitConfiguration
---
apiVersion: apps/v1beta2
kind: Deployment

0 comments on commit 8ba2e56

Please sign in to comment.