Skip to content

Commit

Permalink
Merge pull request #13 from port-labs/PORT-3367-k-8-s-exporter-add-cr…
Browse files Browse the repository at this point in the history
…eate-missing-related-entities-and-verbosity-arguments

Add create missing related entities and verbosity arguments
  • Loading branch information
talsabagport authored Mar 30, 2023
2 parents a27adcb + 34442aa commit 666f942
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions charts/port-k8s-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: port-k8s-exporter
description: A Helm chart for Port Kubernetes Exporter
type: application
version: 0.1.12
appVersion: "0.1.8"
version: 0.1.13
appVersion: "0.1.9"
home: https://getport.io/
sources:
- https://github.com/port-labs/port-k8s-exporter
Expand Down
2 changes: 2 additions & 0 deletions charts/port-k8s-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The following table lists the configuration parameters of the `port-k8s-exporter
| `resyncInterval` | The interval in minutes before sending a sync event for all known objects | `0` |
| `stateKey` | Unique state key to enable delete of stale Port entities (which not listed in `config.yaml` anymore) | `""` (when empty, replaced by uuid) |
| `deleteDependents` | A flag to enable deletion of dependent Port Entities. | `false` |
| `createMissingRelatedEntities` | A flag to enable creation of missing related Port Entities. | `false` |
| `verbosity` | A number for the log level verbosity. Set to `-1` to print less info logs. | `0` |
| `image.repository` | Image repository | `ghcr.io/port-labs/port-k8s-exporter` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.tag` | Image tag | `""` |
Expand Down
4 changes: 2 additions & 2 deletions charts/port-k8s-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ Create the name of the secret to use
Create the name of the cluster role to use
*/}}
{{- define "port-k8s-exporter.clusterRoleName" -}}
{{- default (include "port-k8s-exporter.fullname" .) .Values.secret.name }}
{{- default (include "port-k8s-exporter.fullname" .) .Values.clusterRole.name }}
{{- end }}

{{/*
Create the name of the cluster role binding to use
*/}}
{{- define "port-k8s-exporter.clusterRoleBindingName" -}}
{{- default (include "port-k8s-exporter.fullname" .) .Values.secret.name }}
{{- default (include "port-k8s-exporter.fullname" .) .Values.clusterRoleBinding.name }}
{{- end }}
13 changes: 7 additions & 6 deletions charts/port-k8s-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
args:
- -config
- /config/config.yaml
- -state-key
- $(STATE_KEY)
- -config=/config/config.yaml
- -state-key=$(STATE_KEY)
- -delete-dependents={{ .Values.deleteDependents }}
- -create-missing-related-entities={{ .Values.createMissingRelatedEntities }}
{{- if ne (int .Values.verbosity) 0 }}
- -v={{ .Values.verbosity }}
{{- end }}
{{- if gt (int .Values.resyncInterval) 0 }}
- -resync-interval
- {{ .Values.resyncInterval | quote }}
- -resync-interval={{ .Values.resyncInterval }}
{{- end }}
envFrom:
- secretRef:
Expand Down
2 changes: 2 additions & 0 deletions charts/port-k8s-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
resyncInterval: 0
stateKey: ""
deleteDependents: false
createMissingRelatedEntities: false
verbosity: 0

image:
repository: ghcr.io/port-labs/port-k8s-exporter
Expand Down

0 comments on commit 666f942

Please sign in to comment.