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
52f7695f
Commit
52f7695f
authored
Nov 14, 2017
by
Karol Wychowaniec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add deployment for Stackdriver Metadata Agent with version and resource…
Add deployment for Stackdriver Metadata Agent with version and resource requirement controlled by env variable
parent
8bdd6614
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
0 deletions
+88
-0
OWNERS
cluster/addons/metadata-agent/OWNERS
+6
-0
README.md
cluster/addons/metadata-agent/README.md
+4
-0
metadata-agent.yaml
...ter/addons/metadata-agent/stackdriver/metadata-agent.yaml
+38
-0
common.sh
cluster/common.sh
+2
-0
config-default.sh
cluster/gce/config-default.sh
+10
-0
configure-helper.sh
cluster/gce/container-linux/configure-helper.sh
+14
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+14
-0
No files found.
cluster/addons/metadata-agent/OWNERS
0 → 100644
View file @
52f7695f
approvers:
- kawych
- piosz
reviewers:
- kawych
- piosz
cluster/addons/metadata-agent/README.md
0 → 100644
View file @
52f7695f
# Kubernetes Metadata Agent
Metadata Agent is a source of metadata required by logging and monitoring agents
running on a cluster.
cluster/addons/metadata-agent/stackdriver/metadata-agent.yaml
0 → 100644
View file @
52f7695f
kind
:
DaemonSet
apiVersion
:
extensions/v1beta1
metadata
:
labels
:
app
:
stackdriver-agents
kubernetes.io/cluster-service
:
"
true"
addonmanager.kubernetes.io/mode
:
Reconcile
name
:
stackdriver-agents
namespace
:
kube-system
spec
:
selector
:
matchLabels
:
app
:
stackdriver-agents
template
:
metadata
:
labels
:
app
:
stackdriver-agents
spec
:
containers
:
-
image
:
us.gcr.io/container-monitoring-storage/stackdriver-metadata-agent:{{ metadata_agent_version }}
imagePullPolicy
:
IfNotPresent
name
:
metadata-agent
ports
:
-
containerPort
:
8000
hostPort
:
8000
protocol
:
TCP
resources
:
requests
:
cpu
:
{{
metadata_agent_cpu_request
}}
memory
:
{{
metadata_agent_memory_request
}}
dnsPolicy
:
ClusterFirst
restartPolicy
:
Always
schedulerName
:
default-scheduler
terminationGracePeriodSeconds
:
30
updateStrategy
:
rollingUpdate
:
maxUnavailable
:
1
type
:
RollingUpdate
cluster/common.sh
View file @
52f7695f
...
@@ -610,6 +610,8 @@ KUBERNETES_MASTER_NAME: $(yaml-quote ${KUBERNETES_MASTER_NAME})
...
@@ -610,6 +610,8 @@ KUBERNETES_MASTER_NAME: $(yaml-quote ${KUBERNETES_MASTER_NAME})
ALLOCATE_NODE_CIDRS:
$(
yaml-quote
${
ALLOCATE_NODE_CIDRS
:-
false
})
ALLOCATE_NODE_CIDRS:
$(
yaml-quote
${
ALLOCATE_NODE_CIDRS
:-
false
})
ENABLE_CLUSTER_MONITORING:
$(
yaml-quote
${
ENABLE_CLUSTER_MONITORING
:-
none
})
ENABLE_CLUSTER_MONITORING:
$(
yaml-quote
${
ENABLE_CLUSTER_MONITORING
:-
none
})
ENABLE_METRICS_SERVER:
$(
yaml-quote
${
ENABLE_METRICS_SERVER
:-
false
})
ENABLE_METRICS_SERVER:
$(
yaml-quote
${
ENABLE_METRICS_SERVER
:-
false
})
ENABLE_METADATA_AGENT:
$(
yaml-quote
${
ENABLE_METADATA_AGENT
:-
none
})
METADATA_AGENT_VERSION:
$(
yaml-quote
${
METADATA_AGENT_VERSION
:-})
DOCKER_REGISTRY_MIRROR_URL:
$(
yaml-quote
${
DOCKER_REGISTRY_MIRROR_URL
:-})
DOCKER_REGISTRY_MIRROR_URL:
$(
yaml-quote
${
DOCKER_REGISTRY_MIRROR_URL
:-})
ENABLE_L7_LOADBALANCING:
$(
yaml-quote
${
ENABLE_L7_LOADBALANCING
:-
none
})
ENABLE_L7_LOADBALANCING:
$(
yaml-quote
${
ENABLE_L7_LOADBALANCING
:-
none
})
ENABLE_CLUSTER_LOGGING:
$(
yaml-quote
${
ENABLE_CLUSTER_LOGGING
:-
false
})
ENABLE_CLUSTER_LOGGING:
$(
yaml-quote
${
ENABLE_CLUSTER_LOGGING
:-
false
})
...
...
cluster/gce/config-default.sh
View file @
52f7695f
...
@@ -145,6 +145,16 @@ ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
...
@@ -145,6 +145,16 @@ ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
# TODO(piosz) remove this option once Metrics Server became a stable thing.
# TODO(piosz) remove this option once Metrics Server became a stable thing.
ENABLE_METRICS_SERVER
=
"
${
KUBE_ENABLE_METRICS_SERVER
:-
true
}
"
ENABLE_METRICS_SERVER
=
"
${
KUBE_ENABLE_METRICS_SERVER
:-
true
}
"
# Optional: Metadata agent to setup as part of the cluster bring up:
# none - No metadata agent
# stackdriver - Stackdriver metadata agent
# Metadata agent is a daemon set that provides metadata of kubernetes objects
# running on the same node for exporting metrics and logs.
ENABLE_METADATA_AGENT
=
"
${
KUBE_ENABLE_METADATA_AGENT
:-
none
}
"
# Version tag of metadata agent
METADATA_AGENT_VERSION
=
"
${
KUBE_METADATA_AGENT_VERSION
:-
0
.2-0.0.13-5
}
"
# One special node out of NUM_NODES would be created of this type if specified.
# One special node out of NUM_NODES would be created of this type if specified.
# Useful for scheduling heapster in large clusters with nodes of small size.
# Useful for scheduling heapster in large clusters with nodes of small size.
HEAPSTER_MACHINE_TYPE
=
"
${
HEAPSTER_MACHINE_TYPE
:-}
"
HEAPSTER_MACHINE_TYPE
=
"
${
HEAPSTER_MACHINE_TYPE
:-}
"
...
...
cluster/gce/container-linux/configure-helper.sh
View file @
52f7695f
...
@@ -1289,6 +1289,20 @@ EOF
...
@@ -1289,6 +1289,20 @@ EOF
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
}
"
update-prometheus-to-sd-parameters
${
controller_yaml
}
update-prometheus-to-sd-parameters
${
controller_yaml
}
fi
fi
if
[[
"
${
ENABLE_CLUSTER_MONITORING
:-}
"
==
"stackdriver"
]]
||
([[
"
${
ENABLE_CLUSTER_LOGGING
:-}
"
==
"true"
]]
&&
[[
"
${
LOGGING_DESTINATION
:-}
"
==
"gcp"
]])
;
then
if
[[
"
${
ENABLE_METADATA_AGENT
:-}
"
==
"stackdriver"
]]
&&
[[
"
${
METADATA_AGENT_VERSION
:-}
"
!=
""
]]
;
then
metadata_agent_cpu_request
=
"
${
METADATA_AGENT_CPU_REQUEST
:-
40m
}
"
metadata_agent_memory_request
=
"
${
METADATA_AGENT_MEMORY_REQUEST
:-
50Mi
}
"
setup-addon-manifests
"addons"
"metadata-agent/stackdriver"
deployment_yaml
=
"
${
dst_dir
}
/metadata-agent/stackdriver/metadata-agent.yaml"
sed
-i
-e
"s@{{ metadata_agent_version }}@
${
METADATA_AGENT_VERSION
}
@g"
"
${
deployment_yaml
}
"
sed
-i
-e
"s@{{ metadata_agent_cpu_request }}@
${
metadata_agent_cpu_request
}
@g"
"
${
deployment_yaml
}
"
sed
-i
-e
"s@{{ metadata_agent_memory_request }}@
${
metadata_agent_memory_request
}
@g"
"
${
deployment_yaml
}
"
fi
fi
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"metrics-server"
setup-addon-manifests
"addons"
"metrics-server"
fi
fi
...
...
cluster/gce/gci/configure-helper.sh
View file @
52f7695f
...
@@ -1854,6 +1854,20 @@ EOF
...
@@ -1854,6 +1854,20 @@ EOF
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
}
"
update-prometheus-to-sd-parameters
${
controller_yaml
}
update-prometheus-to-sd-parameters
${
controller_yaml
}
fi
fi
if
[[
"
${
ENABLE_CLUSTER_MONITORING
:-}
"
==
"stackdriver"
]]
||
([[
"
${
ENABLE_CLUSTER_LOGGING
:-}
"
==
"true"
]]
&&
[[
"
${
LOGGING_DESTINATION
:-}
"
==
"gcp"
]])
;
then
if
[[
"
${
ENABLE_METADATA_AGENT
:-}
"
==
"stackdriver"
]]
&&
[[
"
${
METADATA_AGENT_VERSION
:-}
"
!=
""
]]
;
then
metadata_agent_cpu_request
=
"
${
METADATA_AGENT_CPU_REQUEST
:-
40m
}
"
metadata_agent_memory_request
=
"
${
METADATA_AGENT_MEMORY_REQUEST
:-
50Mi
}
"
setup-addon-manifests
"addons"
"metadata-agent/stackdriver"
deployment_yaml
=
"
${
dst_dir
}
/metadata-agent/stackdriver/metadata-agent.yaml"
sed
-i
-e
"s@{{ metadata_agent_version }}@
${
METADATA_AGENT_VERSION
}
@g"
"
${
deployment_yaml
}
"
sed
-i
-e
"s@{{ metadata_agent_cpu_request }}@
${
metadata_agent_cpu_request
}
@g"
"
${
deployment_yaml
}
"
sed
-i
-e
"s@{{ metadata_agent_memory_request }}@
${
metadata_agent_memory_request
}
@g"
"
${
deployment_yaml
}
"
fi
fi
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"metrics-server"
setup-addon-manifests
"addons"
"metrics-server"
fi
fi
...
...
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