Skip to content

Commit

Permalink
Merge pull request #299 from weaveworks/298-update-k8st-manifests-tha…
Browse files Browse the repository at this point in the history
…t-have

Update manifests from v1beta1 -> v1
  • Loading branch information
bboreham authored Sep 20, 2019
2 parents 244ee72 + b3ae4bb commit d25a944
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ job_environment_v1_14_2: &job_environment_v1_14_2
CHANGE_MINIKUBE_NONE_USER: true
KUBE_SERVER_VERSION: echo v1.14.2
KUBECTL_VERSION: echo v1.14.2
MINIKUBE_VERSION: echo latest
MINIKUBE_VERSION: echo v1.2.0

job_environment_vstable: &job_environment_vstable
environment:
CHANGE_MINIKUBE_NONE_USER: true
KUBE_SERVER_VERSION: curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt
KUBECTL_VERSION: curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt
MINIKUBE_VERSION: echo latest
MINIKUBE_VERSION: echo v1.2.0

workflow_job_defaults: &workflow_job_defaults
requires:
Expand Down
6 changes: 4 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,3 @@ branch = "release-1.11"
[[constraint]]
name = "github.com/prometheus/client_golang"
version = "v0.9.0-pre1"

[[constraint]]
name = "github.com/dlespiau/kube-test-harness"
revision = "6dfa02a8c9926e2caffa14aa405dd699363bd9d3"

2 changes: 1 addition & 1 deletion docker/kubectl.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
KUBECTL_VERSION=v1.11.10
KUBECTL_VERSION=v1.13.11
48 changes: 42 additions & 6 deletions integration-tests/k8s/k8s-kube-system.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ items:
metadata:
name: flux-git-deploy
type: Opaque
- apiVersion: apps/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: weave-flux-memcached
Expand All @@ -54,6 +54,12 @@ items:
weave-flux-component: memcached
spec:
replicas: 1
selector:
matchLabels:
name: weave-flux-memcached
app: weave-flux
weave-cloud-component: flux
weave-flux-component: memcached
template:
metadata:
annotations:
Expand Down Expand Up @@ -93,7 +99,7 @@ items:
app: weave-flux
weave-cloud-component: flux
weave-flux-component: memcached
- apiVersion: apps/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: weave-flux-agent
Expand All @@ -104,6 +110,12 @@ items:
weave-flux-component: agent
spec:
replicas: 1
selector:
matchLabels:
name: weave-flux-agent
app: weave-flux
weave-cloud-component: flux
weave-flux-component: agent
strategy:
type: Recreate
template:
Expand Down Expand Up @@ -172,7 +184,7 @@ items:
- kind: ServiceAccount
name: weave-scope
namespace: kube-system
- apiVersion: extensions/v1beta1
- apiVersion: apps/v1
kind: DaemonSet
metadata:
name: weave-scope-agent
Expand All @@ -182,6 +194,12 @@ items:
weave-cloud-component: scope
weave-scope-component: agent
spec:
selector:
matchLabels:
name: weave-scope-agent
app: weave-scope
weave-cloud-component: scope
weave-scope-component: agent
template:
metadata:
labels:
Expand Down Expand Up @@ -265,7 +283,7 @@ items:
- kind: ServiceAccount
name: weave-cortex
namespace: kube-system
- apiVersion: apps/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: weave-cortex-agent
Expand All @@ -276,6 +294,12 @@ items:
weave-cortex-component: agent
spec:
replicas: 1
selector:
matchLabels:
name: weave-cortex-agent
app: weave-cortex
weave-cloud-component: cortex
weave-cortex-component: agent
template:
metadata:
annotations:
Expand Down Expand Up @@ -305,7 +329,7 @@ items:
- name: agent-config-volume
configMap:
name: weave-cortex-agent-config
- apiVersion: extensions/v1beta1
- apiVersion: apps/v1
kind: DaemonSet
metadata:
name: weave-cortex-node-exporter
Expand All @@ -315,6 +339,12 @@ items:
weave-cloud-component: cortex
weave-cortex-component: node-exporter
spec:
selector:
matchLabels:
name: weave-cortex-node-exporter
app: weave-cortex
weave-cloud-component: cortex
weave-cortex-component: node-exporter
template:
metadata:
annotations:
Expand Down Expand Up @@ -342,7 +372,7 @@ items:
operator: Exists
updateStrategy:
type: RollingUpdate
- apiVersion: apps/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: weave-cortex-state-metrics
Expand All @@ -353,6 +383,12 @@ items:
weave-cortex-component: state-metrics
spec:
replicas: 1
selector:
matchLabels:
name: weave-cortex-state-metrics
app: weave-cortex
weave-cloud-component: cortex
weave-cortex-component: state-metrics
template:
metadata:
annotations:
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/tests/install-update-flow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ run_self_update_test () {
echo "• Check the agent updated correctly"
if [[ $(kubectl get pods -n weave -l name=weave-agent -o jsonpath="{.items[0].metadata.labels.newLabel}") != "foo" ]]; then
echo "Failed to self update. Label newLabel=foo does not exist."
echo "Logs from weave-agent pods:"
kubectl logs -n weave -l name=weave-agent
exit 1
fi
}
Expand Down
5 changes: 4 additions & 1 deletion service/static/agent.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@ items:
- kind: ServiceAccount
name: weave-agent
namespace: weave
- apiVersion: apps/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: weave-agent
namespace: weave
spec:
replicas: 1
selector:
matchLabels:
name: weave-agent
# Wait 30 seconds to see if new version crashes before rolling next pod
minReadySeconds: 30
# Rolling update with 1 new instance added before removing any old instances
Expand Down

0 comments on commit d25a944

Please sign in to comment.