-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from avi-biton/git_monitoring
update manifests for controller deployment
- Loading branch information
Showing
20 changed files
with
164 additions
and
243 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,147 +1,21 @@ | ||
# Adds namespace to all resources. | ||
namespace: notification-service-system | ||
namespace: notification-controller | ||
|
||
# Value of this field is prepended to the | ||
# names of all resources, e.g. a deployment named | ||
# "wordpress" becomes "alices-wordpress". | ||
# Note that it should also match with the prefix (text before '-') of the namespace | ||
# field above. | ||
namePrefix: notification-service- | ||
|
||
# Labels to add to all resources and selectors. | ||
#labels: | ||
#- includeSelectors: true | ||
# pairs: | ||
# someName: someValue | ||
namePrefix: notification-controller- | ||
|
||
resources: | ||
#- ../crd | ||
# Add rbac resources | ||
- ../rbac | ||
# Add manager manifest | ||
- ../manager | ||
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in | ||
# crd/kustomization.yaml | ||
#- ../webhook | ||
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. | ||
#- ../certmanager | ||
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. | ||
#- ../prometheus | ||
# [METRICS] To enable the controller manager metrics service, uncomment the following line. | ||
- metrics_service.yaml | ||
|
||
# Uncomment the patches line if you enable Metrics, and/or are using webhooks and cert-manager | ||
#patches: | ||
# [METRICS] The following patch will enable the metrics endpoint. Ensure that you also protect this endpoint. | ||
# More info: https://book.kubebuilder.io/reference/metrics | ||
# If you want to expose the metric endpoint of your controller-manager uncomment the following line. | ||
- path: manager_metrics_patch.yaml | ||
target: | ||
kind: Deployment | ||
|
||
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in | ||
# crd/kustomization.yaml | ||
#- path: manager_webhook_patch.yaml | ||
|
||
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. | ||
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. | ||
# 'CERTMANAGER' needs to be enabled to use ca injection | ||
#- path: webhookcainjection_patch.yaml | ||
# Enable prometheus monitor | ||
- ../prometheus | ||
|
||
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. | ||
# Uncomment the following replacements to add the cert-manager CA injection annotations | ||
#replacements: | ||
# - source: # Add cert-manager annotation to ValidatingWebhookConfiguration, MutatingWebhookConfiguration and CRDs | ||
# kind: Certificate | ||
# group: cert-manager.io | ||
# version: v1 | ||
# name: serving-cert # this name should match the one in certificate.yaml | ||
# fieldPath: .metadata.namespace # namespace of the certificate CR | ||
# targets: | ||
# - select: | ||
# kind: ValidatingWebhookConfiguration | ||
# fieldPaths: | ||
# - .metadata.annotations.[cert-manager.io/inject-ca-from] | ||
# options: | ||
# delimiter: '/' | ||
# index: 0 | ||
# create: true | ||
# - select: | ||
# kind: MutatingWebhookConfiguration | ||
# fieldPaths: | ||
# - .metadata.annotations.[cert-manager.io/inject-ca-from] | ||
# options: | ||
# delimiter: '/' | ||
# index: 0 | ||
# create: true | ||
# - select: | ||
# kind: CustomResourceDefinition | ||
# fieldPaths: | ||
# - .metadata.annotations.[cert-manager.io/inject-ca-from] | ||
# options: | ||
# delimiter: '/' | ||
# index: 0 | ||
# create: true | ||
# - source: | ||
# kind: Certificate | ||
# group: cert-manager.io | ||
# version: v1 | ||
# name: serving-cert # this name should match the one in certificate.yaml | ||
# fieldPath: .metadata.name | ||
# targets: | ||
# - select: | ||
# kind: ValidatingWebhookConfiguration | ||
# fieldPaths: | ||
# - .metadata.annotations.[cert-manager.io/inject-ca-from] | ||
# options: | ||
# delimiter: '/' | ||
# index: 1 | ||
# create: true | ||
# - select: | ||
# kind: MutatingWebhookConfiguration | ||
# fieldPaths: | ||
# - .metadata.annotations.[cert-manager.io/inject-ca-from] | ||
# options: | ||
# delimiter: '/' | ||
# index: 1 | ||
# create: true | ||
# - select: | ||
# kind: CustomResourceDefinition | ||
# fieldPaths: | ||
# - .metadata.annotations.[cert-manager.io/inject-ca-from] | ||
# options: | ||
# delimiter: '/' | ||
# index: 1 | ||
# create: true | ||
# - source: # Add cert-manager annotation to the webhook Service | ||
# kind: Service | ||
# version: v1 | ||
# name: webhook-service | ||
# fieldPath: .metadata.name # namespace of the service | ||
# targets: | ||
# - select: | ||
# kind: Certificate | ||
# group: cert-manager.io | ||
# version: v1 | ||
# fieldPaths: | ||
# - .spec.dnsNames.0 | ||
# - .spec.dnsNames.1 | ||
# options: | ||
# delimiter: '.' | ||
# index: 0 | ||
# create: true | ||
# - source: | ||
# kind: Service | ||
# version: v1 | ||
# name: webhook-service | ||
# fieldPath: .metadata.namespace # namespace of the service | ||
# targets: | ||
# - select: | ||
# kind: Certificate | ||
# group: cert-manager.io | ||
# version: v1 | ||
# fieldPaths: | ||
# - .spec.dnsNames.0 | ||
# - .spec.dnsNames.1 | ||
# options: | ||
# delimiter: '.' | ||
# index: 1 | ||
# create: true | ||
patchesStrategicMerge: | ||
# This patch inject a sidecar container which is a HTTP proxy for the controller manager | ||
- manager_auth_proxy_patch.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This patch inject a sidecar container which is a HTTP proxy for the | ||
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: kube-rbac-proxy | ||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0 | ||
args: | ||
- "--secure-listen-address=0.0.0.0:8443" | ||
- "--upstream=http://127.0.0.1:8080/" | ||
- "--logtostderr=true" | ||
- "--http2-disable" | ||
- "--v=0" | ||
ports: | ||
- containerPort: 8443 | ||
protocol: TCP | ||
name: https | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
requests: | ||
cpu: 5m | ||
memory: 64Mi | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
- name: manager | ||
args: | ||
- "--health-probe-bind-address=:8081" | ||
- "--metrics-bind-address=127.0.0.1:8080" |
This file was deleted.
Oops, something went wrong.
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,2 +1,7 @@ | ||
resources: | ||
- manager.yaml | ||
|
||
images: | ||
- name: controller | ||
newName: quay.io/konflux-ci/notification-service | ||
newTag: latest |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
resources: | ||
- monitor.yaml | ||
- secret.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,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: metrics-reader | ||
namespace: system | ||
annotations: | ||
kubernetes.io/service-account.name: notification-controller-metrics-reader | ||
type: kubernetes.io/service-account-token |
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,9 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: metrics-reader | ||
rules: | ||
- nonResourceURLs: | ||
- "/metrics" | ||
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,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: proxy-role | ||
rules: | ||
- apiGroups: | ||
- authentication.k8s.io | ||
resources: | ||
- tokenreviews | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- authorization.k8s.io | ||
resources: | ||
- subjectaccessreviews | ||
verbs: | ||
- create |
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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: proxy-rolebinding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: proxy-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: controller-manager | ||
namespace: 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
Oops, something went wrong.