Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
add ship init integration test for k8s yaml without trailing newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Dec 20, 2018
1 parent b3be2f7 commit 5e9349a
Show file tree
Hide file tree
Showing 11 changed files with 292 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"v1": {
"config": {},
"releaseName": "ship",
"upstream": "https://github.com/replicatedhq/test-charts/tree/960955cdcf61891c3b5ff27c25dcde0184926add/plain-k8s-no-trailing-newline",
"metadata": null,
"contentSHA": "e03f03a48d619be6a9ff2c56c19808b0cfa2cb84615346b1c867eeca20ff92d0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 3
selector:
matchLabels:
app: guestbook
tier: frontend
template:
metadata:
labels:
app: guestbook
tier: frontend
spec:
containers:
- env:
- name: GET_HOSTS_FROM
value: dns
image: gcr.io/google-samples/gb-frontend:v4
name: php-redis
ports:
- containerPort: 80
resources:
requests:
cpu: 100m
memory: 100Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: guestbook
tier: frontend
name: frontend
spec:
ports:
- port: 80
selector:
app: guestbook
tier: frontend
type: NodePort
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: ""
apiversion: ""
resources:
- frontend-deployment.yaml
- frontend-service.yaml
- redis-master-deployment.yaml
- redis-master-service.yaml
- redis-slave-deployment.yaml
- redis-slave-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-master
spec:
replicas: 1
selector:
matchLabels:
app: redis
role: master
tier: backend
template:
metadata:
labels:
app: redis
role: master
tier: backend
spec:
containers:
- image: k8s.gcr.io/redis:e2e
name: master
ports:
- containerPort: 6379
resources:
requests:
cpu: 100m
memory: 100Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: redis
role: master
tier: backend
name: redis-master
spec:
ports:
- port: 6379
targetPort: 6379
selector:
app: redis
role: master
tier: backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-slave
spec:
replicas: 2
selector:
matchLabels:
app: redis
role: slave
tier: backend
template:
metadata:
labels:
app: redis
role: slave
tier: backend
spec:
containers:
- env:
- name: GET_HOSTS_FROM
value: dns
image: gcr.io/google_samples/gb-redisslave:v1
name: slave
ports:
- containerPort: 6379
resources:
requests:
cpu: 100m
memory: 100Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: redis
role: slave
tier: backend
name: redis-slave
spec:
ports:
- port: 6379
selector:
app: redis
role: slave
tier: backend
zquotenum: "123"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: ""
apiversion: ""
bases:
- ../../base
136 changes: 136 additions & 0 deletions integration/init/plain-k8s-no-trailing-newline/expected/rendered.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: guestbook
tier: frontend
name: frontend
spec:
ports:
- port: 80
selector:
app: guestbook
tier: frontend
type: NodePort
---
apiVersion: v1
kind: Service
metadata:
labels:
app: redis
role: master
tier: backend
name: redis-master
spec:
ports:
- port: 6379
targetPort: 6379
selector:
app: redis
role: master
tier: backend
---
apiVersion: v1
kind: Service
metadata:
labels:
app: redis
role: slave
tier: backend
name: redis-slave
spec:
ports:
- port: 6379
selector:
app: redis
role: slave
tier: backend
zquotenum: "123"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 3
selector:
matchLabels:
app: guestbook
tier: frontend
template:
metadata:
labels:
app: guestbook
tier: frontend
spec:
containers:
- env:
- name: GET_HOSTS_FROM
value: dns
image: gcr.io/google-samples/gb-frontend:v4
name: php-redis
ports:
- containerPort: 80
resources:
requests:
cpu: 100m
memory: 100Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-master
spec:
replicas: 1
selector:
matchLabels:
app: redis
role: master
tier: backend
template:
metadata:
labels:
app: redis
role: master
tier: backend
spec:
containers:
- image: k8s.gcr.io/redis:e2e
name: master
ports:
- containerPort: 6379
resources:
requests:
cpu: 100m
memory: 100Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-slave
spec:
replicas: 2
selector:
matchLabels:
app: redis
role: slave
tier: backend
template:
metadata:
labels:
app: redis
role: slave
tier: backend
spec:
containers:
- env:
- name: GET_HOSTS_FROM
value: dns
image: gcr.io/google_samples/gb-redisslave:v1
name: slave
ports:
- containerPort: 6379
resources:
requests:
cpu: 100m
memory: 100Mi
3 changes: 3 additions & 0 deletions integration/init/plain-k8s-no-trailing-newline/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
upstream: "https://github.com/replicatedhq/test-charts/tree/960955cdcf61891c3b5ff27c25dcde0184926add/plain-k8s-no-trailing-newline"
args: ["--prefer-git"]
skip_cleanup: false

0 comments on commit 5e9349a

Please sign in to comment.