Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

fix(all-in-one): support for Kubernetes v1.16+ #132

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
dist: trusty
dist: xenial
sudo: required

language: java
jdk:
- oraclejdk8
- openjdk8

services:
- docker

before_install:
# install nsenter which is required for port forwarding
# install conntrack which is required for minikube
- sudo apt-get -qq -y install conntrack
# install nsenter which is required for port forwarding
- travis/ubuntu-compile-nsenter.sh && sudo cp $HOME/nsenter/util-linux-2.30.2/nsenter /usr/bin
- travis/install-start-minikube.sh && export PATH=`pwd`:${PATH} # set minikube and kubectl to PATH
- kubectl get all --all-namespaces
Expand Down
19 changes: 17 additions & 2 deletions all-in-one/jaeger-all-in-one-template.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2017-2019 The Jaeger Authors
# Copyright 2017-2020 The Jaeger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -15,7 +15,7 @@
apiVersion: v1
kind: List
items:
- apiVersion: extensions/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
Expand All @@ -25,6 +25,9 @@ items:
app.kubernetes.io/component: all-in-one
spec:
replicas: 1
selector:
matchLabels:
app: jaeger
strategy:
type: Recreate
template:
Expand Down Expand Up @@ -70,6 +73,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: query
spec:
selector:
matchLabels:
app: jaeger-query
ports:
- name: query-http
port: 80
Expand All @@ -88,6 +94,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: collector
spec:
selector:
matchLabels:
app: jaeger-collector
ports:
- name: jaeger-collector-tchannel
port: 14267
Expand All @@ -114,6 +123,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: agent
spec:
selector:
matchLabels:
app: jaeger-agent
ports:
- name: agent-zipkin-thrift
port: 5775
Expand Down Expand Up @@ -144,6 +156,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: zipkin
spec:
selector:
matchLabels:
app: zipkin
ports:
- name: jaeger-collector-zipkin
port: 9411
Expand Down
26 changes: 22 additions & 4 deletions jaeger-production-template.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2017-2019 The Jaeger Authors
# Copyright 2017-2020 The Jaeger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -15,7 +15,7 @@
apiVersion: v1
kind: List
items:
- apiVersion: extensions/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger-collector
Expand All @@ -25,6 +25,9 @@ items:
app.kubernetes.io/component: collector
spec:
replicas: 1
selector:
matchLabels:
app: jaeger
strategy:
type: Recreate
template:
Expand Down Expand Up @@ -77,6 +80,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: collector
spec:
selector:
matchLabels:
app: jaeger-collector
ports:
- name: jaeger-collector-tchannel
port: 14267
Expand All @@ -103,6 +109,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: zipkin
spec:
selector:
matchLabels:
app: zipkin
ports:
- name: jaeger-collector-zipkin
port: 9411
Expand All @@ -112,7 +121,7 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: collector
type: ClusterIP
- apiVersion: extensions/v1beta1
- apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger-query
Expand All @@ -121,6 +130,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: query
spec:
selector:
matchLabels:
app: jaeger
replicas: 1
strategy:
type: Recreate
Expand Down Expand Up @@ -170,6 +182,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: query
spec:
selector:
matchLabels:
app: jaeger-query
ports:
- name: jaeger-query
port: 80
Expand All @@ -179,7 +194,7 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: query
type: LoadBalancer
- apiVersion: extensions/v1beta1
- apiVersion: apps/v1
kind: DaemonSet
metadata:
name: jaeger-agent
Expand All @@ -188,6 +203,9 @@ items:
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: agent
spec:
selector:
matchLabels:
app: jaeger
template:
metadata:
labels:
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2017-2018 The Jaeger Authors
Copyright 2017-2020 The Jaeger Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -31,9 +31,9 @@
<version.com.uber.jaeger-jaeger-core>0.21.0</version.com.uber.jaeger-jaeger-core>
<version.junit>4.12</version.junit>
<version.org.awaitility-awaitility>3.0.0</version.org.awaitility-awaitility>
<version.org.arquillian.cube>1.15.1</version.org.arquillian.cube>
<version.org.jboss.arquillian>1.2.0.Final</version.org.jboss.arquillian>
<version.io.fabric8.kubernetes-client>3.1.8</version.io.fabric8.kubernetes-client>
<version.org.arquillian.cube>1.18.2</version.org.arquillian.cube>
<version.org.jboss.arquillian>1.6.0.Final</version.org.jboss.arquillian>
<version.io.fabric8.kubernetes-client>4.9.1</version.io.fabric8.kubernetes-client>
<version.io.zipkin.brave>4.8.0</version.io.zipkin.brave>
<version.io.zipkin.reporter>1.1.1</version.io.zipkin.reporter>

Expand Down
32 changes: 15 additions & 17 deletions travis/install-start-minikube.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright 2017-2018 The Jaeger Authors
# Copyright 2017-2020 The Jaeger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -13,25 +13,23 @@
# the License.
#

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.25.0/minikube-linux-amd64 && chmod +x minikube
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.9.0/bin/linux/amd64/kubectl && chmod +x kubectl

export CHANGE_MINIKUBE_NONE_USER=true
export MINIKUBE_WANTUPDATENOTIFICATION=false
export MINIKUBE_WANTREPORTERRORPROMPT=false
export MINIKUBE_HOME=$HOME
export CHANGE_MINIKUBE_NONE_USER=true
mkdir $HOME/.kube || true
touch $HOME/.kube/config

export KUBECONFIG=$HOME/.kube/config
sudo -E ./minikube start --vm-driver=none

# this for loop waits until kubectl can access the api server that minikube has created
for i in {1..150} # timeout for 5 minutes
do
./kubectl get po &> /dev/null
if [ $? -ne 1 ]; then
break
fi
sleep 2
done
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.9.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.18.2/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

mkdir -p $HOME/.kube $HOME/.minikube
touch $KUBECONFIG

sudo minikube start --profile=minikube --vm-driver=none --kubernetes-version=v1.18.2
minikube update-context --profile=minikube

eval "$(minikube docker-env --profile=minikube)" && export DOCKER_CLI='docker'

# Wait for kube-dns to be ready.
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lk8s-app=kube-dns -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-dns to be available"; kubectl get pods --all-namespaces; done