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
d2c17c7c
Commit
d2c17c7c
authored
Aug 02, 2016
by
Daniel Smith
Committed by
GitHub
Aug 02, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29943 from kubernetes/revert-28840-influx-ps
Revert "Modified influxdb petset to provision persistent volume."
parents
fd4e9238
651c8a4b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
17 deletions
+68
-17
influxdb-claim.yaml
...er/addons/cluster-monitoring/influxdb/influxdb-claim.yaml
+15
-0
influxdb-grafana-petset.yaml
.../cluster-monitoring/influxdb/influxdb-grafana-petset.yaml
+6
-17
influxdb-pv.yaml
cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml
+19
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+6
-0
util.sh
cluster/gce/util.sh
+22
-0
No files found.
cluster/addons/cluster-monitoring/influxdb/influxdb-claim.yaml
0 → 100644
View file @
d2c17c7c
kind
:
PersistentVolumeClaim
apiVersion
:
v1
metadata
:
name
:
influxdb-claim
namespace
:
kube-system
labels
:
kubernetes.io/cluster-service
:
"
true"
spec
:
accessModes
:
-
ReadWriteOnce
resources
:
requests
:
storage
:
10Gi
volumeName
:
influxdb-pv
cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-petset.yaml
View file @
d2c17c7c
...
@@ -3,12 +3,11 @@ kind: PetSet
...
@@ -3,12 +3,11 @@ kind: PetSet
metadata
:
metadata
:
name
:
monitoring-influxdb-grafana-v3
name
:
monitoring-influxdb-grafana-v3
namespace
:
kube-system
namespace
:
kube-system
labels
:
labels
:
k8s-app
:
influxGrafana
k8s-app
:
influxGrafana
version
:
v3
version
:
v3
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/cluster-service
:
"
true"
spec
:
spec
:
serviceName
:
monitoring-influxdb
replicas
:
1
replicas
:
1
template
:
template
:
metadata
:
metadata
:
...
@@ -32,7 +31,7 @@ spec:
...
@@ -32,7 +31,7 @@ spec:
-
containerPort
:
8083
-
containerPort
:
8083
-
containerPort
:
8086
-
containerPort
:
8086
volumeMounts
:
volumeMounts
:
-
name
:
influxdb-p
s
-
name
:
influxdb-p
ersistent-storage
mountPath
:
/data
mountPath
:
/data
-
image
:
gcr.io/google_containers/heapster_grafana:v2.6.0-2
-
image
:
gcr.io/google_containers/heapster_grafana:v2.6.0-2
name
:
grafana
name
:
grafana
...
@@ -59,25 +58,15 @@ spec:
...
@@ -59,25 +58,15 @@ spec:
value
:
"
true"
value
:
"
true"
-
name
:
GF_AUTH_ANONYMOUS_ORG_ROLE
-
name
:
GF_AUTH_ANONYMOUS_ORG_ROLE
value
:
Admin
value
:
Admin
# This is kubernetes specific endpoint where the service may be reached.
# It is embeded in "kube-system" namespace.
-
name
:
GF_SERVER_ROOT_URL
-
name
:
GF_SERVER_ROOT_URL
value
:
/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/
value
:
/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/
volumeMounts
:
volumeMounts
:
-
name
:
grafana-persistent-storage
-
name
:
grafana-persistent-storage
mountPath
:
/var
mountPath
:
/var
volumes
:
volumes
:
-
name
:
influxdb-persistent-storage
persistentVolumeClaim
:
claimName
:
influxdb-claim
-
name
:
grafana-persistent-storage
-
name
:
grafana-persistent-storage
emptyDir
:
{}
emptyDir
:
{}
volumeClaimTemplates
:
serviceName
:
monitoring-influxdb
-
metadata
:
name
:
influxdb-ps
annotations
:
volume.alpha.kubernetes.io/storage-class
:
anything
spec
:
accessModes
:
-
ReadWriteOnce
resources
:
requests
:
storage
:
10Gi
cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml
0 → 100644
View file @
d2c17c7c
{
%
set pd_prefix = pillar.get('master_name'
,
'
'
) -%
}
{
%
set pd_name = pd_prefix + '-influxdb-pd' -%
}
kind
:
PersistentVolume
apiVersion
:
v1
metadata
:
name
:
influxdb-pv
labels
:
kubernetes.io/cluster-service
:
"
true"
spec
:
capacity
:
storage
:
10Gi
accessModes
:
-
ReadWriteOnce
-
ReadOnlyMany
gcePersistentDisk
:
pdName
:
{{
pd_name
}}
fsType
:
ext4
persistentVolumeReclaimPolicy
:
Delete
cluster/gce/gci/configure-helper.sh
View file @
d2c17c7c
...
@@ -865,6 +865,12 @@ function start-kube-addons {
...
@@ -865,6 +865,12 @@ function start-kube-addons {
sed
-i
-e
"s@{{ *nanny_memory *}}@
${
nanny_memory
}
@g"
"
${
controller_yaml
}
"
sed
-i
-e
"s@{{ *nanny_memory *}}@
${
nanny_memory
}
@g"
"
${
controller_yaml
}
"
sed
-i
-e
"s@{{ *metrics_cpu_per_node *}}@
${
metrics_cpu_per_node
}
@g"
"
${
controller_yaml
}
"
sed
-i
-e
"s@{{ *metrics_cpu_per_node *}}@
${
metrics_cpu_per_node
}
@g"
"
${
controller_yaml
}
"
fi
fi
if
[[
"
${
ENABLE_CLUSTER_MONITORING
:-}
"
==
"influxdb"
]]
;
then
pv_yaml
=
"
${
dst_dir
}
/
${
file_dir
}
/influxdb-pv.yaml"
pd_name
=
"
${
INSTANCE_PREFIX
}
-influxdb-pd"
remove-salt-config-comments
"
${
pv_yaml
}
"
sed
-i
-e
"s@{{ *pd_name *}}@
${
pd_name
}
@g"
"
${
pv_yaml
}
"
fi
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns"
setup-addon-manifests
"addons"
"dns"
local
-r
dns_rc_file
=
"
${
dst_dir
}
/dns/skydns-rc.yaml"
local
-r
dns_rc_file
=
"
${
dst_dir
}
/dns/skydns-rc.yaml"
...
...
cluster/gce/util.sh
View file @
d2c17c7c
...
@@ -712,6 +712,14 @@ function create-master() {
...
@@ -712,6 +712,14 @@ function create-master() {
--size
"
${
CLUSTER_REGISTRY_DISK_SIZE
}
"
&
--size
"
${
CLUSTER_REGISTRY_DISK_SIZE
}
"
&
fi
fi
# Create disk for influxdb if enabled
if
[[
"
${
ENABLE_CLUSTER_MONITORING
:-}
"
==
"influxdb"
]]
;
then
gcloud compute disks create
"
${
INSTANCE_PREFIX
}
-influxdb-pd"
\
--project
"
${
PROJECT
}
"
\
--zone
"
${
ZONE
}
"
\
--size
"10GiB"
&
fi
# Generate a bearer token for this cluster. We push this separately
# Generate a bearer token for this cluster. We push this separately
# from the other cluster variables so that the client (this
# from the other cluster variables so that the client (this
# computer) can forget it later. This should disappear with
# computer) can forget it later. This should disappear with
...
@@ -1190,6 +1198,15 @@ function kube-down {
...
@@ -1190,6 +1198,15 @@ function kube-down {
routes
=(
"
${
routes
[@]
:
${
batch
}}
"
)
routes
=(
"
${
routes
[@]
:
${
batch
}}
"
)
done
done
# Delete persistent disk for influx-db.
if
gcloud compute disks describe
"
${
INSTANCE_PREFIX
}
"
-influxdb-pd
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
&>/dev/null
;
then
gcloud compute disks delete
\
--project
"
${
PROJECT
}
"
\
--quiet
\
--zone
"
${
ZONE
}
"
\
"
${
INSTANCE_PREFIX
}
"
-influxdb-pd
fi
# If there are no more remaining master replicas, we should update kubeconfig.
# If there are no more remaining master replicas, we should update kubeconfig.
if
[[
"
${
REMAINING_MASTER_COUNT
}
"
==
"0"
]]
;
then
if
[[
"
${
REMAINING_MASTER_COUNT
}
"
==
"0"
]]
;
then
export
CONTEXT
=
"
${
PROJECT
}
_
${
INSTANCE_PREFIX
}
"
export
CONTEXT
=
"
${
PROJECT
}
_
${
INSTANCE_PREFIX
}
"
...
@@ -1250,6 +1267,11 @@ function check-resources {
...
@@ -1250,6 +1267,11 @@ function check-resources {
return
1
return
1
fi
fi
if
gcloud compute disks describe
--project
"
${
PROJECT
}
"
"
${
INSTANCE_PREFIX
}
-influxdb-pd"
--zone
"
${
ZONE
}
"
&>/dev/null
;
then
KUBE_RESOURCE_FOUND
=
"Persistent disk
${
INSTANCE_PREFIX
}
-influxdb-pd"
return
1
fi
# Find out what minions are running.
# Find out what minions are running.
local
-a
minions
local
-a
minions
minions
=(
$(
gcloud compute instances list
\
minions
=(
$(
gcloud compute instances list
\
...
...
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