Open mohsen0 opened 4 years ago
I don't have enough experience with Helm to answer this. What would be the options?
@mustafaakin I guess you need to create another repo under your organization that can be called - helm-exporter-event (anything you want) and creates a directory with the helm-chart layout as explained here https://medium.com/containerum/how-to-make-and-share-your-own-helm-package-50ae40f6c221
Just FYI, I am working on a chart contribution: https://github.com/bitnami/charts/pull/3788
Another FYI: My chart contribution was merged and released yesterday: https://artifacthub.io/packages/helm/bitnami/kubernetes-event-exporter :smiley:
@mkilchhofer so I got some errors in logs
2021-09-30T23:35:56Z ERR bitnami/blacksmith-sandox/kubernetes-event-exporter-0.10.0/src/github.com/opsgenie/kubernetes-event-exporter/pkg/kube/watcher.go:72 > Cannot list labels of the object error="applications.argoproj.io \"promtail\" is forbidden: User \"system:serviceaccount:monitoring:kubernetes-event-exporter\" cannot get resource \"applications\" in API group \"argoproj.io\" in the namespace \"argo-cd\""
2021-09-30T23:35:56Z ERR bitnami/blacksmith-sandox/kubernetes-event-exporter-0.10.0/src/github.com/opsgenie/kubernetes-event-exporter/pkg/kube/watcher.go:81 > Cannot list annotations of the object error="applications.argoproj.io \"promtail\" is forbidden: User \"system:serviceaccount:monitoring:kubernetes-event-exporter\" cannot get resource \"applications\" in API group \"argoproj.io\" in the namespace \"argo-cd\""
config file for argo:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kubernetes-event-exporter
namespace: argo-cd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
server: https://kubernetes.default.svc
namespace: monitoring
project: default
source:
chart: kubernetes-event-exporter
helm:
values: |
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 25Mi
config:
logLevel: debug
logFormat: pretty
receivers:
- name: "dump"
file:
path: "/dev/stdout"
layout:
message: "{{ .Message }}"
reason: "{{ .Reason }}"
type: "{{ .Type }}"
count: "{{ .Count }}"
kind: "{{ .InvolvedObject.Kind }}"
name: "{{ .InvolvedObject.Name }}"
namespace: "{{ .Namespace }}"
component: "{{ .Source.Component }}"
host: "{{ .Source.Host }}"
repoURL: https://charts.bitnami.com/bitnami
targetRevision: 1.1.15
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
That's the exact same behaviour as you would have installed kubernetes-event-exporter from the manifests in the /deploy folder in this repo here.
This tool runs with a serviceaccount bound to the ClusterRole view
. There are 3 special ClusterRoles: view
, edit
and admin
in every kubernetes distro. These roles are updated with custom ClusterRoles specifying special annotations called Aggregated ClusterRoles.
Did you install ArgoCD also by helm? There is a special config flag to deploy such an Aggregated ClusterRoles:
createAggregateRoles: true
See: https://github.com/argoproj/argo-helm/blob/argo-cd-3.22.1/charts/argo-cd/values.yaml#L40
Thanks @mkilchhofer!
I can contribute that but not sure how it can be distributed since you don't have any repo for helm charts. any thoughts?