Skip to content

Commit

Permalink
new deployment files for v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yuval-k committed Jan 8, 2018
1 parent e412511 commit a202d99
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def label = UUID.randomUUID().toString()
}
stage('Build squash binaries') {
container('go') {
sh 'cd /go/src/github.com/solo-io/squash/;make binaries'
sh 'cd /go/src/github.com/solo-io/squash/;make release-binaries'
}
}
stage('Build squash containers') {
Expand All @@ -59,7 +59,7 @@ def label = UUID.randomUUID().toString()
}
*/
stage('Archive artifacts') {
archiveArtifacts 'target/kubernetes/*.yml,target/squash'
archiveArtifacts 'target/kubernetes/*.yml,target/squash-linux,target/squash-osx'
}
}
}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ all: binaries deployment
.PHONY: binaries
binaries: target/squash-server/squash-server target/squash-client/squash-client target/squash

.PHONY: release-binaries
release-binaries: target/squash-server/squash-server target/squash-client/squash-client target/squash-linux target/squash-osx

.PHONY: containers
containers: target/squash-server-container target/squash-client-container

Expand Down
13 changes: 11 additions & 2 deletions contrib/kubernetes/squash-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
labels:
app: squash-client
name: squash-client
namespace: squash
spec:
template:
metadata:
Expand All @@ -13,7 +14,7 @@ spec:
hostPID: true
containers:
- name: squash-client
image: soloio/squash-client:v0.2.0
image: soloio/squash-client:v0.2.1
volumeMounts:
- mountPath: /var/run/cri.sock
name: crisock
Expand All @@ -25,10 +26,18 @@ spec:
env:
- name: SERVERURL
value: "http://$(SQUASH_SERVER_SERVICE_HOST):$(SQUASH_SERVER_SERVICE_PORT_HTTP_SQUASH_API)"
- name: HOST_ADDR
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: HOST_ADDR
value: $(POD_NAME).$(POD_NAMESPACE)
- name: NODE_NAME
valueFrom:
fieldRef:
Expand Down
17 changes: 13 additions & 4 deletions contrib/kubernetes/squash-server.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
apiVersion: v1
kind: Namespace
metadata:
name: squash
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: squash-server
namespace: squash
---
kind: Role
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: squash-pod-reader
Expand All @@ -12,23 +18,25 @@ rules:
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
kind: RoleBinding
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: squash-read-pod-info
subjects:
- kind: ServiceAccount
namespace: squash
name: squash-server
# apiGroup: rbac.authorization.k8s.io # some reason this fails on kube 1.7.4
roleRef:
kind: Role
kind: ClusterRole
name: squash-pod-reader
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: squash-server
namespace: squash
labels:
app: squash-server
spec:
Expand All @@ -44,7 +52,7 @@ spec:
serviceAccountName: squash-server
containers:
- name: squash-server
image: soloio/squash-server:v0.2.0
image: soloio/squash-server:v0.2.1
ports:
- containerPort: 8080
protocol: TCP
Expand All @@ -54,6 +62,7 @@ kind: Service
apiVersion: v1
metadata:
name: squash-server
namespace: squash
spec:
selector:
app: squash-server
Expand Down

0 comments on commit a202d99

Please sign in to comment.