Skip to content

Commit

Permalink
simplify k8s manifest example
Browse files Browse the repository at this point in the history
  • Loading branch information
jreisinger committed May 11, 2022
1 parent 0e17ca5 commit 2036769
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
34 changes: 6 additions & 28 deletions k8s-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,11 @@ spec:
containers:
- name: kcount
image: ghcr.io/pan-net-security/kcount:latest
# Kubeconfigs for secondary and tertiary cluster
volumeMounts:
- name: kubeconfig-secondary
mountPath: /root/.kube/kubeconfig-secondary
subPath: kubeconfig-secondary
readOnly: true
- name: kubeconfig-tertiary
mountPath: /root/.kube/kubeconfig-tertiary
subPath: kubeconfig-tertiary
readOnly: true
resources:
limits:
memory: "128Mi" # 128 MiB
cpu: "500m" # 0.5 CPU
args:
- -l
- "env=prod"
- -a
- -d
- /root/.kube/kubeconfig-secondary
- /root/.kube/kubeconfig-tertiary
volumes:
- name: kubeconfig-secondary
secret:
secretName: kubeconfig-secondary
items:
- key: project.conf
path: kubeconfig-secondary
- name: kubeconfig-tertiary
secret:
secretName: kubeconfig-tertiary
items:
- key: project.conf
path: kubeconfig-tertiary
serviceAccountName: myuser
serviceAccountName: default # CHANGEME
2 changes: 1 addition & 1 deletion object.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func CountObjectsAcrossClusters(clusters []Cluster, flags Flags) Counts {
go func(cluster Cluster, kind string) {
obj, err := countObjects(cluster, kind, flags.labelSelector)
if err != nil {
log.Printf("counting objects in cluster %s: %v", cluster.cluster, err)
log.Printf("counting objects in cluster '%s': %v", cluster.cluster, err)
}
ch <- obj
}(cluster, kind)
Expand Down

0 comments on commit 2036769

Please sign in to comment.