Skip to content

Commit

Permalink
🚑 add certs in dockerfile (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuetao Song authored and ks-ci-bot committed May 14, 2019
1 parent b9e531c commit 5620ca5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

### Changed
- simplify `Makefile`

- remove certs mounts [@magicsong](https://github.com/yunify/qingcloud-cloud-controller-manager/pull/56)
- recording logs when e2e-test failure

## [ 1.3.3 ] - 2019-05-04
### Added
- support UDP [@magicsong](https://github.com/yunify/qingcloud-cloud-controller-manager/pull/54)
Expand Down
4 changes: 0 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ pipeline {
post {
failure {
echo "Detect failure .Save logs "
sh """
podname=`kubectl get pod -n cloud-test-$tag -l app=tide -o jsonpath="{.items[0].metadata.name}"`
kubectl logs $podname -n cloud-test-$tag > cloud_controller.log
"""
archiveArtifacts artifacts: 'cloud_controller.log'
}
always {
Expand Down
2 changes: 2 additions & 0 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copy the controller-manager into a thin image
FROM alpine
RUN apk --no-cache add iptables ca-certificates \
&& update-ca-certificates 2>/dev/null || true
WORKDIR /
COPY . .
ENTRYPOINT ["/manager"]
5 changes: 0 additions & 5 deletions deploy/kube-cloud-controller-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ spec:
- mountPath: /etc/kubernetes
name: k8s
readOnly: true
- mountPath: /etc/ssl/certs
name: certs
- mountPath: /etc/qingcloud
name: qingcloud
readOnly: true
Expand All @@ -63,9 +61,6 @@ spec:
- hostPath:
path: /etc/kubernetes
name: k8s
- hostPath:
path: /etc/ssl/certs
name: certs
- name: qingcloud
secret:
secretName: qcsecret
Expand Down
9 changes: 8 additions & 1 deletion hack/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ secret_file=${HOME}/.qingcloud/config.yaml
function cleanup(){
result=$?
set +e

if [ $result != "0" ]; then
echo "Detect test failure, save logs"
podname=`kubectl get pod -n $TEST_NS -l app=yunify-cloud-controller-manager -o jsonpath="{.items[0].metadata.name}"`
kubectl logs $podname -n $TEST_NS > cloud_controller.log
fi

echo "Cleaning Namespace"
kubectl delete secret qcsecret -n $TEST_NS
kubectl delete ns $TEST_NS > /dev/null
Expand Down Expand Up @@ -82,4 +89,4 @@ kubectl apply -f $DEST
export TEST_NS
export secret_file

go test -timeout 20m -v -mod=vendor ./test/pkg/e2e/
go test -timeout 20m -v -mod=vendor ./test/pkg/e2e/
3 changes: 2 additions & 1 deletion test/pkg/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var _ = Describe("E2e", func() {
Expect(e2eutil.KubectlDelete(servicePath)).ShouldNot(HaveOccurred())
time.Sleep(1 * time.Minute)
//make sure lb is deleted
time.Sleep(time.Second * 30)
lbService, _ := qcService.LoadBalancer("ap2a")
Eventually(func() error { return e2eutil.WaitForLoadBalancerDeleted(lbService) }, time.Minute*2, time.Second*10).Should(Succeed())
}()
Expand Down Expand Up @@ -56,7 +57,7 @@ var _ = Describe("E2e", func() {
Expect(e2eutil.KubectlDelete(service1Path)).ShouldNot(HaveOccurred())
//make sure lb is deleted
lbService, _ := qcService.LoadBalancer("ap2a")
time.Sleep(time.Second * 30)
time.Sleep(time.Second * 45)
Eventually(func() error { return e2eutil.WaitForLoadBalancerDeleted(lbService) }, time.Minute*1, time.Second*10).Should(Succeed())
}()
log.Println("Just wait 2 minutes before tests because following procedure is so so so slow ")
Expand Down

0 comments on commit 5620ca5

Please sign in to comment.