Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c2248324
Commit
c2248324
authored
Oct 31, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose etcd version.
parent
07f78836
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
9 deletions
+37
-9
common.sh
cluster/common.sh
+9
-0
config-test.sh
cluster/gce/config-test.sh
+3
-1
configure-vm.sh
cluster/gce/configure-vm.sh
+7
-2
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+7
-2
configure-helper.sh
cluster/gce/trusty/configure-helper.sh
+7
-2
config-default.sh
cluster/kubemark/config-default.sh
+3
-1
etcd.manifest
cluster/saltbase/salt/etcd/etcd.manifest
+1
-1
No files found.
cluster/common.sh
View file @
c2248324
...
@@ -702,6 +702,15 @@ NUM_NODES: $(yaml-quote ${NUM_NODES})
...
@@ -702,6 +702,15 @@ NUM_NODES: $(yaml-quote ${NUM_NODES})
STORAGE_BACKEND:
$(
yaml-quote
${
STORAGE_BACKEND
:-})
STORAGE_BACKEND:
$(
yaml-quote
${
STORAGE_BACKEND
:-})
ENABLE_GARBAGE_COLLECTOR:
$(
yaml-quote
${
ENABLE_GARBAGE_COLLECTOR
:-})
ENABLE_GARBAGE_COLLECTOR:
$(
yaml-quote
${
ENABLE_GARBAGE_COLLECTOR
:-})
EOF
EOF
# ETCD_IMAGE (if set) allows to use a custom etcd image.
if
[
-n
"
${
ETCD_IMAGE
:-}
"
]
;
then
cat
>>
$file
<<
EOF
ETCD_IMAGE:
$(
yaml-quote
${
ETCD_IMAGE
})
EOF
fi
# ETCD_VERSION (if set) allows you to use custom version of etcd.
# The main purpose of using it may be rollback of etcd v3 API,
# where we need 3.0.* image, but are rolling back to 2.3.7.
if
[
-n
"
${
ETCD_VERSION
:-}
"
]
;
then
if
[
-n
"
${
ETCD_VERSION
:-}
"
]
;
then
cat
>>
$file
<<
EOF
cat
>>
$file
<<
EOF
ETCD_VERSION:
$(
yaml-quote
${
ETCD_VERSION
})
ETCD_VERSION:
$(
yaml-quote
${
ETCD_VERSION
})
...
...
cluster/gce/config-test.sh
View file @
c2248324
...
@@ -94,7 +94,9 @@ ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
...
@@ -94,7 +94,9 @@ ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
# standalone - Heapster only. Metrics available via Heapster REST API.
# standalone - Heapster only. Metrics available via Heapster REST API.
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
influxdb
}
"
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
influxdb
}
"
# Set etcd version (e.g. 3.0.4-migration.1) if you need non-default version.
# Set etcd image (e.g. 3.0.13-experimental.1) version (e.g. 3.0.13) if you need
# non-default version.
ETCD_IMAGE
=
"
${
TEST_ETCD_IMAGE
:-}
"
ETCD_VERSION
=
"
${
TEST_ETCD_VERSION
:-}
"
ETCD_VERSION
=
"
${
TEST_ETCD_VERSION
:-}
"
# Default Log level for all components in test clusters and variables to override it in specific components.
# Default Log level for all components in test clusters and variables to override it in specific components.
...
...
cluster/gce/configure-vm.sh
View file @
c2248324
...
@@ -470,12 +470,17 @@ EOF
...
@@ -470,12 +470,17 @@ EOF
kubelet_port: '
$(
echo
"
$KUBELET_PORT
"
|
sed
-e
"s/'/''/g"
)
'
kubelet_port: '
$(
echo
"
$KUBELET_PORT
"
|
sed
-e
"s/'/''/g"
)
'
EOF
EOF
fi
fi
# Configuration changes for test clusters
if
[
-n
"
${
ETCD_IMAGE
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
etcd_docker_tag: '
$(
echo
"
$ETCD_IMAGE
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
ETCD_VERSION
:-}
"
]
;
then
if
[
-n
"
${
ETCD_VERSION
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
etcd_
docker_tag
: '
$(
echo
"
$ETCD_VERSION
"
|
sed
-e
"s/'/''/g"
)
'
etcd_
version
: '
$(
echo
"
$ETCD_VERSION
"
|
sed
-e
"s/'/''/g"
)
'
EOF
EOF
fi
fi
# Configuration changes for test clusters
if
[
-n
"
${
APISERVER_TEST_ARGS
:-}
"
]
;
then
if
[
-n
"
${
APISERVER_TEST_ARGS
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
apiserver_test_args: '
$(
echo
"
$APISERVER_TEST_ARGS
"
|
sed
-e
"s/'/''/g"
)
'
apiserver_test_args: '
$(
echo
"
$APISERVER_TEST_ARGS
"
|
sed
-e
"s/'/''/g"
)
'
...
...
cluster/gce/gci/configure-helper.sh
View file @
c2248324
...
@@ -626,11 +626,16 @@ function prepare-etcd-manifest {
...
@@ -626,11 +626,16 @@ function prepare-etcd-manifest {
sed
-i
-e
"s@{{ *etcd_cluster *}}@
$etcd_cluster
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *etcd_cluster *}}@
$etcd_cluster
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *storage_backend *}}@
${
STORAGE_BACKEND
:-}
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *storage_backend *}}@
${
STORAGE_BACKEND
:-}
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *cluster_state *}}@
$cluster_state
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *cluster_state *}}@
$cluster_state
@g"
"
${
temp_file
}
"
if
[[
-n
"
${
ETCD_
VERSION
:-}
"
]]
;
then
if
[[
-n
"
${
ETCD_
IMAGE
:-}
"
]]
;
then
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
${
ETCD_
VERSION
}
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
${
ETCD_
IMAGE
}
@g"
"
${
temp_file
}
"
else
else
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
\1
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
\1
@g"
"
${
temp_file
}
"
fi
fi
if
[[
-n
"
${
ETCD_VERSION
:-}
"
]]
;
then
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_version', '
\(
.*
\)
') *}}@
${
ETCD_VERSION
}
@g"
"
${
temp_file
}
"
else
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_version', '
\(
.*
\)
') *}}@
\1
@g"
"
${
temp_file
}
"
fi
# Replace the volume host path.
# Replace the volume host path.
sed
-i
-e
"s@/mnt/master-pd/var/etcd@/mnt/disks/master-pd/var/etcd@g"
"
${
temp_file
}
"
sed
-i
-e
"s@/mnt/master-pd/var/etcd@/mnt/disks/master-pd/var/etcd@g"
"
${
temp_file
}
"
mv
"
${
temp_file
}
"
/etc/kubernetes/manifests
mv
"
${
temp_file
}
"
/etc/kubernetes/manifests
...
...
cluster/gce/trusty/configure-helper.sh
View file @
c2248324
...
@@ -458,11 +458,16 @@ prepare_etcd_manifest() {
...
@@ -458,11 +458,16 @@ prepare_etcd_manifest() {
sed
-i
-e
"s@{{ *etcd_cluster *}}@
$etcd_cluster
@g"
"
${
etcd_temp_file
}
"
sed
-i
-e
"s@{{ *etcd_cluster *}}@
$etcd_cluster
@g"
"
${
etcd_temp_file
}
"
sed
-i
-e
"s@{{ *storage_backend *}}@
${
STORAGE_BACKEND
:-}
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *storage_backend *}}@
${
STORAGE_BACKEND
:-}
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *cluster_state *}}@
$cluster_state
@g"
"
${
etcd_temp_file
}
"
sed
-i
-e
"s@{{ *cluster_state *}}@
$cluster_state
@g"
"
${
etcd_temp_file
}
"
if
[[
-n
"
${
ETCD_
VERSION
:-}
"
]]
;
then
if
[[
-n
"
${
ETCD_
IMAGE
:-}
"
]]
;
then
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
${
ETCD_
VERSION
}
@g"
"
${
etcd_temp_file
}
"
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
${
ETCD_
IMAGE
}
@g"
"
${
etcd_temp_file
}
"
else
else
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
\1
@g"
"
${
etcd_temp_file
}
"
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_docker_tag', '
\(
.*
\)
') *}}@
\1
@g"
"
${
etcd_temp_file
}
"
fi
fi
if
[[
-n
"
${
ETCD_VERSION
:-}
"
]]
;
then
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_version', '
\(
.*
\)
') *}}@
${
ETCD_VERSION
}
@g"
"
${
etcd_temp_file
}
"
else
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_version', '
\(
.*
\)
') *}}@
\1
@g"
"
${
etcd_temp_file
}
"
fi
# Replace the volume host path
# Replace the volume host path
sed
-i
-e
"s@/mnt/master-pd/var/etcd@/mnt/disks/master-pd/var/etcd@g"
"
${
etcd_temp_file
}
"
sed
-i
-e
"s@/mnt/master-pd/var/etcd@/mnt/disks/master-pd/var/etcd@g"
"
${
etcd_temp_file
}
"
mv
"
${
etcd_temp_file
}
"
/etc/kubernetes/manifests
mv
"
${
etcd_temp_file
}
"
/etc/kubernetes/manifests
...
...
cluster/kubemark/config-default.sh
View file @
c2248324
...
@@ -46,7 +46,9 @@ CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.240.0.0/11}"
...
@@ -46,7 +46,9 @@ CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.240.0.0/11}"
RUNTIME_CONFIG
=
"
${
KUBE_RUNTIME_CONFIG
:-}
"
RUNTIME_CONFIG
=
"
${
KUBE_RUNTIME_CONFIG
:-}
"
TERMINATED_POD_GC_THRESHOLD
=
${
TERMINATED_POD_GC_THRESHOLD
:-
100
}
TERMINATED_POD_GC_THRESHOLD
=
${
TERMINATED_POD_GC_THRESHOLD
:-
100
}
# Set etcd version (e.g. 3.0.4-migration.1) if you need non-default version.
# Set etcd image (e.g. 3.0.13-experimental.1) version (e.g. 3.0.13) if you need
# non-default version.
ETCD_IMAGE
=
"
${
TEST_ETCD_IMAGE
:-}
"
ETCD_VERSION
=
"
${
TEST_ETCD_VERSION
:-}
"
ETCD_VERSION
=
"
${
TEST_ETCD_VERSION
:-}
"
# Storage backend. 'etcd2' supported, 'etcd3' experimental.
# Storage backend. 'etcd2' supported, 'etcd3' experimental.
STORAGE_BACKEND
=
${
STORAGE_BACKEND
:-
etcd2
}
STORAGE_BACKEND
=
${
STORAGE_BACKEND
:-
etcd2
}
...
...
cluster/saltbase/salt/etcd/etcd.manifest
View file @
c2248324
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
"value": "{{ storage_backend }}"
"value": "{{ storage_backend }}"
},
},
{ "name": "TARGET_VERSION",
{ "name": "TARGET_VERSION",
"value": "{{ pillar.get('etcd_
docker_tag
', '2.2.1') }}"
"value": "{{ pillar.get('etcd_
version
', '2.2.1') }}"
},
},
{ "name": "DATA_DIRECTORY",
{ "name": "DATA_DIRECTORY",
"value": "/var/etcd/data{{ suffix }}"
"value": "/var/etcd/data{{ suffix }}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment