mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #30080 from jszczepkowski/ps-rollback
Automatic merge from submit-queue Reverted conversion of influx-db to PetSet. ```release-note Reverted conversion of influx-db to Pet Set, it is now a Replication Controller. ``` Reverted conversion of influx-db to PetSet, it is now a Replication Controller and Persistent Volumes are no longer used.
This commit is contained in:
commit
689f06f936
@ -1,15 +0,0 @@
|
||||
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
|
||||
|
@ -1,5 +1,5 @@
|
||||
apiVersion: apps/v1alpha1
|
||||
kind: PetSet
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: monitoring-influxdb-grafana-v3
|
||||
namespace: kube-system
|
||||
@ -9,6 +9,9 @@ metadata:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: influxGrafana
|
||||
version: v3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@ -65,8 +68,7 @@ spec:
|
||||
mountPath: /var
|
||||
volumes:
|
||||
- name: influxdb-persistent-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: influxdb-claim
|
||||
emptyDir: {}
|
||||
- name: grafana-persistent-storage
|
||||
emptyDir: {}
|
||||
serviceName: monitoring-influxdb
|
||||
|
@ -1,19 +0,0 @@
|
||||
{% 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
|
@ -0,0 +1,74 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: monitoring-influxdb-grafana-v3
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: influxGrafana
|
||||
version: v3
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: influxGrafana
|
||||
version: v3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: influxGrafana
|
||||
version: v3
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/heapster_influxdb:v0.5
|
||||
name: influxdb
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
ports:
|
||||
- containerPort: 8083
|
||||
- containerPort: 8086
|
||||
volumeMounts:
|
||||
- name: influxdb-persistent-storage
|
||||
mountPath: /data
|
||||
- image: gcr.io/google_containers/heapster_grafana:v2.6.0-2
|
||||
name: grafana
|
||||
env:
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
env:
|
||||
# This variable is required to setup templates in Grafana.
|
||||
- name: INFLUXDB_SERVICE_URL
|
||||
value: http://monitoring-influxdb:8086
|
||||
# The following env variables are required to make Grafana accessible via
|
||||
# the kubernetes api-server proxy. On production clusters, we recommend
|
||||
# removing these env variables, setup auth for grafana, and expose the grafana
|
||||
# service using a LoadBalancer or a public IP.
|
||||
- name: GF_AUTH_BASIC_ENABLED
|
||||
value: "false"
|
||||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
||||
value: "true"
|
||||
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
|
||||
value: Admin
|
||||
- name: GF_SERVER_ROOT_URL
|
||||
value: /api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/
|
||||
volumeMounts:
|
||||
- name: grafana-persistent-storage
|
||||
mountPath: /var
|
||||
volumes:
|
||||
- name: influxdb-persistent-storage
|
||||
emptyDir: {}
|
||||
- name: grafana-persistent-storage
|
||||
emptyDir: {}
|
||||
|
@ -865,12 +865,6 @@ function start-kube-addons {
|
||||
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}"
|
||||
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
|
||||
setup-addon-manifests "addons" "dns"
|
||||
local -r dns_rc_file="${dst_dir}/dns/skydns-rc.yaml"
|
||||
|
@ -712,14 +712,6 @@ function create-master() {
|
||||
--size "${CLUSTER_REGISTRY_DISK_SIZE}" &
|
||||
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
|
||||
# from the other cluster variables so that the client (this
|
||||
# computer) can forget it later. This should disappear with
|
||||
@ -1267,11 +1259,6 @@ function check-resources {
|
||||
return 1
|
||||
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.
|
||||
local -a minions
|
||||
minions=( $(gcloud compute instances list \
|
||||
|
Loading…
Reference in New Issue
Block a user