-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sharding and autosharding introduced a number of manifests that are very similar, but not identical to the standard manifests. This introduces generating all manifests using jsonnet and moves them to the explicit `/examples` directory.
- Loading branch information
Showing
30 changed files
with
655 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...e-state-metrics-cluster-role-binding.yaml → ...es/autosharding/cluster-role-binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 | ||
name: kube-state-metrics | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- secrets | ||
- nodes | ||
- pods | ||
- services | ||
- resourcequotas | ||
- replicationcontrollers | ||
- limitranges | ||
- persistentvolumeclaims | ||
- persistentvolumes | ||
- namespaces | ||
- endpoints | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- extensions | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- replicasets | ||
- ingresses | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- statefulsets | ||
- daemonsets | ||
- deployments | ||
- replicasets | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- batch | ||
resources: | ||
- cronjobs | ||
- jobs | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- autoscaling | ||
resources: | ||
- horizontalpodautoscalers | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- authentication.k8s.io | ||
resources: | ||
- tokenreviews | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- authorization.k8s.io | ||
resources: | ||
- subjectaccessreviews | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- policy | ||
resources: | ||
- poddisruptionbudgets | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- certificates.k8s.io | ||
resources: | ||
- certificatesigningrequests | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- storage.k8s.io | ||
resources: | ||
- storageclasses | ||
verbs: | ||
- list | ||
- watch |
7 changes: 4 additions & 3 deletions
7
...ding/kube-state-metrics-role-binding.yaml → examples/autosharding/role-binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 | ||
name: kube-state-metrics | ||
namespace: kube-system | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: kube-state-metrics-autosharding | ||
name: kube-state-metrics | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kube-state-metrics | ||
namespace: kube-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 | ||
name: kube-state-metrics | ||
namespace: kube-system | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- apps | ||
resourceNames: | ||
- kube-state-metrics | ||
resources: | ||
- statefulsets | ||
verbs: | ||
- get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 | ||
name: kube-state-metrics | ||
namespace: kube-system |
12 changes: 5 additions & 7 deletions
12
kubernetes/kube-state-metrics-service.yaml → examples/autosharding/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 | ||
name: kube-state-metrics | ||
namespace: kube-system | ||
labels: | ||
k8s-app: kube-state-metrics | ||
annotations: | ||
prometheus.io/scrape: 'true' | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- name: http-metrics | ||
port: 8080 | ||
targetPort: http-metrics | ||
protocol: TCP | ||
- name: telemetry | ||
port: 8081 | ||
targetPort: telemetry | ||
protocol: TCP | ||
selector: | ||
k8s-app: kube-state-metrics | ||
app.kubernetes.io/name: kube-state-metrics |
45 changes: 25 additions & 20 deletions
45
...rding/kube-state-metrics-statefulset.yaml → examples/autosharding/statefulset.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,58 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 | ||
name: kube-state-metrics | ||
namespace: kube-system | ||
labels: | ||
k8s-app: kube-state-metrics | ||
spec: | ||
serviceName: kube-state-metrics | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
k8s-app: kube-state-metrics | ||
replicas: 2 | ||
app.kubernetes.io/name: kube-state-metrics | ||
serviceName: kube-state-metrics | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: kube-state-metrics | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 | ||
spec: | ||
serviceAccountName: kube-state-metrics | ||
containers: | ||
- name: kube-state-metrics | ||
image: quay.io/coreos/kube-state-metrics:v1.7.1 | ||
args: | ||
- "--pod=$(POD_NAME)" | ||
- "--pod-namespace=$(POD_NAMESPACE)" | ||
- args: | ||
- --pod=$(POD_NAME) | ||
- --pod-namespace=$(POD_NAMESPACE) | ||
env: | ||
- name: POD_NAME | ||
value: "" | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.name | ||
- name: POD_NAMESPACE | ||
value: "" | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.namespace | ||
ports: | ||
- name: http-metrics | ||
containerPort: 8080 | ||
- name: telemetry | ||
containerPort: 8081 | ||
image: quay.io/coreos/kube-state-metrics:v1.8.0-rc.1 | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8080 | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 5 | ||
name: kube-state-metrics | ||
ports: | ||
- containerPort: 8080 | ||
name: http-metrics | ||
- containerPort: 8081 | ||
name: telemetry | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 8080 | ||
port: 8081 | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 5 | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
serviceAccountName: kube-state-metrics | ||
volumeClaimTemplates: [] |
4 changes: 3 additions & 1 deletion
4
...e-state-metrics-cluster-role-binding.yaml → examples/standard/cluster-role-binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.