Skip to content

Commit

Permalink
upgrade weave, flannel, kubernetes and base AMI image
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Oct 28, 2020
1 parent 5688f84 commit fc09c5a
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 19 deletions.
6 changes: 4 additions & 2 deletions k8s/02_efs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ trap 'err_report $LINENO' ERR

START_TIME=`date +%s`

CLUSTER_SPEC_TEMPLATE=$1

my_dir="$(dirname "$0")"
source "$my_dir/install-playbook/validation.sh"

echo "Installing EFS..."

vpcId=`aws ec2 describe-vpcs --region=$AWS_REGION --filters Name=tag:Name,Values=$NAME --output text | awk '/VPCS/ { print $8 }'`
vpcId=`aws ec2 describe-vpcs --region=$AWS_REGION --filters Name=tag:Name,Values=$CLUSTER_NAME --output text | awk '/VPCS/ { print $8 }'`

if [[ -z ${vpcId} ]]; then
echo "Couldn't detect AWS VPC created by `kops`"
Expand All @@ -26,7 +28,7 @@ fi

echo "Detected VPC: $vpcId"

securityGroupId=`aws ec2 describe-security-groups --region=$AWS_REGION --output text | awk '/nodes.'$NAME'/ && /SECURITYGROUPS/ { print $6 };'`
securityGroupId=`aws ec2 describe-security-groups --region=$AWS_REGION --output text | awk '/nodes.'$CLUSTER_NAME'/ && /SECURITYGROUPS/ { print $6 };'`

if [[ -z ${securityGroupId} ]]; then
echo "Couldn't detect AWS Security Group created by `kops`"
Expand Down
2 changes: 2 additions & 0 deletions k8s/03_ebs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ trap 'err_report $LINENO' ERR

START_TIME=`date +%s`

CLUSTER_SPEC_TEMPLATE=$1

my_dir="$(dirname "$0")"
source "$my_dir/install-playbook/validation.sh"

Expand Down
2 changes: 2 additions & 0 deletions k8s/04_testground_daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ trap 'err_report $LINENO' ERR

START_TIME=`date +%s`

CLUSTER_SPEC_TEMPLATE=$1

my_dir="$(dirname "$0")"
source "$my_dir/install-playbook/validation.sh"

Expand Down
22 changes: 11 additions & 11 deletions k8s/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kops.k8s.io/v1alpha2
kind: Cluster
metadata:
creationTimestamp: null
name: ${NAME}
name: ${CLUSTER_NAME}
spec:
cloudLabels:
Team: ${TEAM}
Expand All @@ -27,7 +27,7 @@ spec:
rbac: {}
channel: stable
cloudProvider: aws
configBase: ${KOPS_STATE_STORE}/${NAME}
configBase: ${KOPS_STATE_STORE}/${CLUSTER_NAME}
docker:
defaultUlimit:
- "nofile=${ULIMIT_NOFILE}"
Expand Down Expand Up @@ -83,9 +83,9 @@ spec:
kubeAPIBurst: 40
kubernetesApiAccess:
- 0.0.0.0/0
kubernetesVersion: 1.18.3
masterInternalName: api.internal.${NAME}
masterPublicName: api.${NAME}
kubernetesVersion: 1.18.10
masterInternalName: api.internal.${CLUSTER_NAME}
masterPublicName: api.${CLUSTER_NAME}
networkCIDR: 172.20.0.0/16
networking:
flannel:
Expand Down Expand Up @@ -115,7 +115,7 @@ kind: InstanceGroup
metadata:
creationTimestamp: null
labels:
kops.k8s.io/cluster: ${NAME}
kops.k8s.io/cluster: ${CLUSTER_NAME}
name: master-${ZONE}
spec:
additionalUserData:
Expand All @@ -139,7 +139,7 @@ spec:
net.ipv4.neigh.default.gc_thresh2 = 4096
net.ipv4.neigh.default.gc_thresh3 = 32768
EOT
image: 909427826938/testground_2020-06-09
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20201014
machineType: ${MASTER_NODE_TYPE}
maxSize: 1
minSize: 1
Expand All @@ -156,7 +156,7 @@ kind: InstanceGroup
metadata:
creationTimestamp: null
labels:
kops.k8s.io/cluster: ${NAME}
kops.k8s.io/cluster: ${CLUSTER_NAME}
name: nodes
spec:
additionalUserData:
Expand All @@ -182,7 +182,7 @@ spec:
EOT
cloudLabels:
testground.node.role.plan: "true"
image: 909427826938/testground_2020-06-09
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20201014
machineType: ${WORKER_NODE_TYPE}
maxSize: ${WORKER_NODES}
minSize: ${WORKER_NODES}
Expand All @@ -201,7 +201,7 @@ kind: InstanceGroup
metadata:
creationTimestamp: null
labels:
kops.k8s.io/cluster: ${NAME}
kops.k8s.io/cluster: ${CLUSTER_NAME}
name: tginfra
spec:
additionalUserData:
Expand All @@ -227,7 +227,7 @@ spec:
EOT
cloudLabels:
testground.node.role.infra: "true"
image: 909427826938/testground_2020-06-09
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20201014
machineType: c5.2xlarge
maxSize: 2
minSize: 2
Expand Down
2 changes: 1 addition & 1 deletion k8s/install-playbook/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
# Validate required arguments
if [ -z "$CLUSTER_SPEC_TEMPLATE" ]
then
echo -e "Please provider cluster spec template file as argument. For example: \`./install.sh cluster.yaml\`"
echo -e "Please provider cluster spec template file as argument. For example: \`./01_install.sh cluster.yaml\`"
exit 2
fi
if [ ! -f "$CLUSTER_SPEC_TEMPLATE" ]; then
Expand Down
4 changes: 2 additions & 2 deletions k8s/kops-weave/flannel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ spec:
priorityClassName: system-node-critical
initContainers:
- name: install-cni
image: quay.io/coreos/flannel:v0.11.0-amd64
image: quay.io/coreos/flannel:v0.13.0-amd64
command:
- cp
args:
Expand All @@ -185,7 +185,7 @@ spec:
mountPath: /etc/kube-flannel/
containers:
- name: kube-flannel
image: quay.io/coreos/flannel:v0.11.0-amd64
image: quay.io/coreos/flannel:v0.13.0-amd64
command:
- /opt/bin/flanneld
args:
Expand Down
4 changes: 2 additions & 2 deletions k8s/kops-weave/weave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ items:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
#image: 'docker.io/weaveworks/weave-kube:2.6.0'
image: 'iptestground/weave-kube:0.0.1'
image: 'docker.io/weaveworks/weave-kube:2.7.0'
#image: 'iptestground/weave-kube:0.0.1'
readinessProbe:
httpGet:
host: 127.0.0.1
Expand Down
2 changes: 1 addition & 1 deletion k8s/testground-daemon/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
limits:
memory: 512Mi
- name: testground-daemon
image: iptestground/testground:edge
image: nonsens3/daemon:supervisor
imagePullPolicy: Always
env:
- name: REDIS_HOST
Expand Down

0 comments on commit fc09c5a

Please sign in to comment.