Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Switch API's for Kubernetes >= 1.16 #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.alertmanager.enabled -}}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: {{ template "prometheus.grafana.fullname" . }}
Expand Down
2 changes: 1 addition & 1 deletion helm/prometheus-chart/templates/grafana-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
rules:
- apiGroups: ['extensions']
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames: [{{ template "prometheus.grafana.fullname" . }}]
2 changes: 1 addition & 1 deletion helm/prometheus-chart/templates/prometheus-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
{{- if .Values.server.deploymentAnnotations }}
Expand Down
41 changes: 29 additions & 12 deletions manifests-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Namespace
metadata:
name: monitoring
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
Expand All @@ -18,7 +18,7 @@ subjects:
name: prometheus-k8s
namespace: monitoring
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
Expand Down Expand Up @@ -333,7 +333,7 @@ data:
- channel: '#alertmanager-test'
send_resolved: true
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: alertmanager
Expand Down Expand Up @@ -395,7 +395,7 @@ spec:
port: 9093
targetPort: 9093
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana-core
Expand All @@ -405,6 +405,10 @@ metadata:
component: core
spec:
replicas: 1
selector:
matchLabels:
app: grafana
component: core
template:
metadata:
labels:
Expand Down Expand Up @@ -2552,7 +2556,7 @@ metadata:
name: prometheus-core
namespace: monitoring
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-core
Expand All @@ -2562,6 +2566,10 @@ metadata:
component: core
spec:
replicas: 1
selector:
matchLabels:
app: prometheus
component: core
template:
metadata:
name: prometheus-main
Expand Down Expand Up @@ -2601,13 +2609,16 @@ spec:
configMap:
name: prometheus-rules
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-state-metrics
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
app: kube-state-metrics
template:
metadata:
labels:
Expand All @@ -2621,7 +2632,7 @@ spec:
- containerPort: 8080
---
# ---
# apiVersion: rbac.authorization.k8s.io/v1beta1
# apiVersion: rbac.authorization.k8s.io/v1
# kind: ClusterRoleBinding
# metadata:
# name: kube-state-metrics
Expand All @@ -2634,7 +2645,7 @@ spec:
# name: kube-state-metrics
# namespace: monitoring
# ---
# apiVersion: rbac.authorization.k8s.io/v1beta1
# apiVersion: rbac.authorization.k8s.io/v1
# kind: ClusterRole
# metadata:
# name: kube-state-metrics
Expand All @@ -2648,7 +2659,7 @@ spec:
# - replicationcontrollers
# - limitranges
# verbs: ["list", "watch"]
# - apiGroups: ["extensions"]
# - apiGroups: ["extensions", "apps"]
# resources:
# - daemonsets
# - deployments
Expand Down Expand Up @@ -2677,9 +2688,8 @@ spec:
protocol: TCP
selector:
app: kube-state-metrics

---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-directory-size-metrics
Expand All @@ -2692,6 +2702,9 @@ metadata:
These are scheduled on every node in the Kubernetes cluster.
To choose directories from the node to check, just mount them on the `read-du` container below `/mnt`.
spec:
selector:
matchLabels:
app: node-directory-size-metrics
template:
metadata:
labels:
Expand Down Expand Up @@ -2751,7 +2764,7 @@ spec:
emptyDir:
medium: Memory
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: prometheus-node-exporter
Expand All @@ -2760,6 +2773,10 @@ metadata:
app: prometheus
component: node-exporter
spec:
selector:
matchLabels:
app: prometheus
component: node-exporter
template:
metadata:
name: prometheus-node-exporter
Expand Down
2 changes: 1 addition & 1 deletion manifests/alertmanager/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: alertmanager
Expand Down
6 changes: 5 additions & 1 deletion manifests/grafana/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana-core
Expand All @@ -8,6 +8,10 @@ metadata:
component: core
spec:
replicas: 1
selector:
matchLabels:
app: grafana
component: core
template:
metadata:
labels:
Expand Down
6 changes: 5 additions & 1 deletion manifests/prometheus/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-core
Expand All @@ -8,6 +8,10 @@ metadata:
component: core
spec:
replicas: 1
selector:
matchLabels:
app: prometheus
component: core
template:
metadata:
name: prometheus-main
Expand Down
5 changes: 4 additions & 1 deletion manifests/prometheus/kube-state-metrics/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-state-metrics
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
app: kube-state-metrics
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion manifests/prometheus/kube-state-metrics/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# - replicationcontrollers
# - limitranges
# verbs: ["list", "watch"]
# - apiGroups: ["extensions"]
# - apiGroups: ["apps"]
# resources:
# - daemonsets
# - deployments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-directory-size-metrics
Expand All @@ -11,6 +11,9 @@ metadata:
These are scheduled on every node in the Kubernetes cluster.
To choose directories from the node to check, just mount them on the `read-du` container below `/mnt`.
spec:
selector:
matchLabels:
app: node-directory-size-metrics
template:
metadata:
labels:
Expand Down
6 changes: 5 additions & 1 deletion manifests/prometheus/node-exporter/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: prometheus-node-exporter
Expand All @@ -7,6 +7,10 @@ metadata:
app: prometheus
component: node-exporter
spec:
selector:
matchLabels:
app: prometheus
component: node-exporter
template:
metadata:
name: prometheus-node-exporter
Expand Down