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

Commit

Permalink
add ci pipeline (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Irving authored Mar 22, 2019
1 parent e455c3a commit afba7e9
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
workspace:
base: /go
path: src/github.com/uswitch/nidhogg

pipeline:
test:
image: golang:1.10
commands:
- curl -L -O "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v1.0.8/kubebuilder_1.0.8_linux_amd64.tar.gz"
- tar -zxvf kubebuilder_1.0.8_linux_amd64.tar.gz
- mv kubebuilder_1.0.8_linux_amd64 kubebuilder && mv kubebuilder /usr/local/
- make test

docker-latest:
image: plugins/docker
repo: quay.io/uswitch/nidhogg
registry: quay.io
secrets: [ docker_username, docker_password ]
tags:
- ${DRONE_COMMIT_SHA}
- latest
when:
event: push
branch: master

docker-tagged:
image: plugins/docker
repo: quay.io/uswitch/nidhogg
registry: quay.io
secrets: [ docker_username, docker_password ]
tags:
- ${DRONE_TAG}
when:
event: tag
branch: master
3 changes: 1 addition & 2 deletions config/default/manager_image_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ spec:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: nidhogg:latest
imagePullPolicy: Never
- image: quay.io/uswitch/nidhogg:latest
name: manager
28 changes: 28 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ spec:
image: controller:latest
imagePullPolicy: Always
name: manager
args:
- --config-file=/config/config.json
env:
- name: POD_NAMESPACE
valueFrom:
Expand All @@ -69,15 +71,41 @@ spec:
- mountPath: /tmp/cert
name: cert
readOnly: true
- mountPath: /config
name: config
readOnly: true
terminationGracePeriodSeconds: 10
volumes:
- name: cert
secret:
defaultMode: 420
secretName: webhook-server-secret
- name: config
configMap:
defaultMode: 420
name: config
---
apiVersion: v1
kind: Secret
metadata:
name: webhook-server-secret
namespace: system
---
apiVersion: v1
kind: ConfigMap
metadata:
name: config
namespace: system
data:
config.json: |
{
"nodeSelector": {
"node-role.kubernetes.io/master": ""
},
"daemonsets": [
{
"name": "kiam",
"namespace": "kube-system"
}
]
}

0 comments on commit afba7e9

Please sign in to comment.