controller: use status updater to update nginx status

parent 532b12d1
......@@ -26,7 +26,7 @@ jobs:
- kubectl describe pods --all-namespaces
- kubectl describe nginx --all-namespaces
env:
- KUBERNETES_VERSION=v1.10.0
- KUBERNETES_VERSION=v1.10.13
- stage: integration
script: "./scripts/localkube-integration.sh"
after_failure:
......@@ -35,7 +35,7 @@ jobs:
- kubectl describe pods --all-namespaces
- kubectl describe nginx --all-namespaces
env:
- KUBERNETES_VERSION=v1.12.0
- KUBERNETES_VERSION=v1.12.7
- stage: push to docker
script:
- echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
......
......@@ -191,7 +191,7 @@ func (r *ReconcileNginx) refreshStatus(nginx *nginxv1alpha1.Nginx) error {
if !reflect.DeepEqual(pods, nginx.Status.Pods) || !reflect.DeepEqual(services, nginx.Status.Services) {
nginx.Status.Pods = pods
nginx.Status.Services = services
err := r.client.Update(context.TODO(), nginx)
err := r.client.Status().Update(context.TODO(), nginx)
if err != nil {
return fmt.Errorf("failed to update nginx status: %v", err)
}
......
......@@ -4,7 +4,7 @@
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download minikube.
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.35.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
sudo minikube start --vm-driver=none --kubernetes-version=$KUBERNETES_VERSION
sudo minikube start --feature-gates=CustomResourceSubresources=true --vm-driver=none --kubernetes-version=$KUBERNETES_VERSION
# Fix the kubectl context, as it's often stale.
sudo minikube update-context
sudo chown -R $(id -un):$(id -gn) /home/travis/.minikube
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment