Created
July 6, 2021 11:31
-
-
Save cmaster11/dce11e4819c91751f74d26fd90e7d24e to your computer and use it in GitHub Desktop.
Markdium-Restart Kubernetes deployments using HTTP requests
This file contains hidden or 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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: restart-helper | |
--- | |
# Allows the service account to: | |
# | |
# - Get namespaces. | |
# - Get/patch our deployments and statefulsets, to allow the | |
# "restart rollout" command to work. | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: restart-helper | |
rules: | |
- apiGroups: [ "" ] | |
resources: [ "namespaces" ] | |
verbs: [ "get" ] | |
- apiGroups: [ "apps", "extensions" ] | |
resources: [ "deployments", "statefulsets" ] | |
verbs: [ "get", "patch" ] | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: restart-helper | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: restart-helper | |
subjects: | |
- kind: ServiceAccount | |
name: restart-helper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment