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

Commit

Permalink
fix: update fail YAML to fail all rules
Browse files Browse the repository at this point in the history
  • Loading branch information
myishay committed Apr 14, 2021
1 parent 0b6c550 commit c39c768
Showing 1 changed file with 118 additions and 111 deletions.
229 changes: 118 additions & 111 deletions internal/fixtures/kube/fail-30.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ spec:
- name: web
image: nginx:latest
securityContext:
privileged: true
runAsUser: 2000
livenessProbe:
httpGet:
path: /health
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
- name: Custom-Header
value: Awesome
readinessProbe:
tcpSocket:
port: 8080
Expand All @@ -40,109 +41,109 @@ spec:
apiVersion: kubeadm.k8s.io/v1beta1
kind: Deployment
metadata:
name: rss-site
namespace: default
labels:
owner: [email protected]
app: web
name: rss-site
namespace: default
labels:
owner: [email protected]
app: web
spec:
replicas: 1
selector:
matchLabels:
app: web
template:
metadata:
namespace: test
labels:
app: web
spec:
restartPolicy: Never
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.socket
containers:
- name: front-end
image: nginx@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
livenessProbe:
httpGet:
path: /healthz
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: "64Mi"
limits:
memory: "128Mi"
ports:
- containerPort: 80
- name: rss-reader
image: nickchase/nginx@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
securityContext:
runAsUser: 100
livenessProbe:
httpGet:
path: /healthz
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
memory: "64Mi"
cpu: "64Mi"
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 88
replicas: 1
selector:
matchLabels:
app: web
template:
metadata:
namespace: test
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
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: "64Mi"
limits:
memory: "128Mi"
ports:
- containerPort: 80
- name: rss-reader
image: nickchase/nginx@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
securityContext:
runAsUser: 100
livenessProbe:
httpGet:
path: /healthz
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
memory: "64Mi"
cpu: "64Mi"
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
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
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]
name: my-service
labels:
owner: [email protected]
spec:
type: NodePort
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
type: NodePort
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
---
apiVersion: batch/v1beta1
kind: CronJob
Expand All @@ -152,23 +153,23 @@ metadata:
labels:
owner: [email protected]
spec:
schedule: "/1 * * * *"
schedule: "1 * * *"
jobTemplate:
spec:
template:
spec:
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker
- 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
- name: hello
image: busybox
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure
---
apiVersion: autoscaling/v2beta2
Expand All @@ -181,9 +182,15 @@ spec:
kind: Deployment
name: php-apache
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
- 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 c39c768

Please sign in to comment.