Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
Add version-checker deployment
Browse files Browse the repository at this point in the history
Exposes potential image upgrades via prometheus metrics.
  • Loading branch information
davidsbond committed Nov 27, 2020
1 parent b7054f4 commit 8d8caf2
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/kube-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace: kube-system
resources:
- system-upgrade-controller
- traefik
- version-checker

configMapGenerator:
- name: traefik
Expand Down
8 changes: 8 additions & 0 deletions manifests/kube-system/version-checker/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: version-checker
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
12 changes: 12 additions & 0 deletions manifests/kube-system/version-checker/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: version-checker
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: version-checker
subjects:
- kind: ServiceAccount
name: version-checker
namespace: kube-system
30 changes: 30 additions & 0 deletions manifests/kube-system/version-checker/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: version-checker
name: version-checker
spec:
replicas: 1
selector:
matchLabels:
app: version-checker
template:
metadata:
labels:
app: version-checker
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
spec:
serviceAccountName: version-checker
containers:
- image: quay.io/jetstack/version-checker:v0.2.1
imagePullPolicy: Always
ports:
- containerPort: 8080
name: version-checker
command: ["version-checker"]
args:
- --test-all-containers
8 changes: 8 additions & 0 deletions manifests/kube-system/version-checker/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- clusterrolebinding.yaml
- clusterrole.yaml
- deployment.yaml
- serviceaccount.yaml
4 changes: 4 additions & 0 deletions manifests/kube-system/version-checker/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: version-checker

0 comments on commit 8d8caf2

Please sign in to comment.