Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions deploy/charts/disco-agent/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ data:
resource-type:
resource: serviceaccounts
version: v1
- kind: k8s-dynamic
name: ark/configmaps
config:
resource-type:
resource: configmaps
version: v1
label-selectors:
- conjur.org/name=conjur-connect-configmap
- kind: k8s-dynamic
name: ark/roles
config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ custom-cluster-description:
resource-type:
resource: serviceaccounts
version: v1
- kind: k8s-dynamic
name: ark/configmaps
config:
resource-type:
resource: configmaps
version: v1
label-selectors:
- conjur.org/name=conjur-connect-configmap
- kind: k8s-dynamic
name: ark/roles
config:
Expand Down Expand Up @@ -133,6 +141,14 @@ custom-cluster-name:
resource-type:
resource: serviceaccounts
version: v1
- kind: k8s-dynamic
name: ark/configmaps
config:
resource-type:
resource: configmaps
version: v1
label-selectors:
- conjur.org/name=conjur-connect-configmap
- kind: k8s-dynamic
name: ark/roles
config:
Expand Down Expand Up @@ -240,6 +256,14 @@ custom-period:
resource-type:
resource: serviceaccounts
version: v1
- kind: k8s-dynamic
name: ark/configmaps
config:
resource-type:
resource: configmaps
version: v1
label-selectors:
- conjur.org/name=conjur-connect-configmap
- kind: k8s-dynamic
name: ark/roles
config:
Expand Down Expand Up @@ -347,6 +371,14 @@ defaults:
resource-type:
resource: serviceaccounts
version: v1
- kind: k8s-dynamic
name: ark/configmaps
config:
resource-type:
resource: configmaps
version: v1
label-selectors:
- conjur.org/name=conjur-connect-configmap
- kind: k8s-dynamic
name: ark/roles
config:
Expand Down
10 changes: 10 additions & 0 deletions examples/machinehub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ data-gatherers:
resource: serviceaccounts
version: v1

# Gather Kubernetes config maps with specific conjur.org label
- name: ark/configmaps
kind: k8s-dynamic
config:
resource-type:
resource: configmaps
version: v1
label-selectors:
- conjur.org/name=conjur-connect-configmap

# Gather Kubernetes roles
- name: ark/roles
kind: k8s-dynamic
Expand Down
6 changes: 6 additions & 0 deletions examples/machinehub/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,11 @@
"data": {
"items": []
}
},
{
"data-gatherer": "ark/configmaps",
"data": {
"items": []
}
}
]
2 changes: 2 additions & 0 deletions internal/cyberark/dataupload/dataupload.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ type Snapshot struct {
Secrets []runtime.Object `json:"secrets"`
// ServiceAccounts is a list of ServiceAccount resources in the cluster.
ServiceAccounts []runtime.Object `json:"serviceaccounts"`
// ConfigMaps is a list of ConfigMap resources in the cluster.
ConfigMaps []runtime.Object `json:"configmaps"`
// Roles is a list of Role resources in the cluster.
Roles []runtime.Object `json:"roles"`
// ClusterRoles is a list of ClusterRole resources in the cluster.
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/client_cyberark.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ var defaultExtractorFunctions = map[string]func(*api.DataReading, *dataupload.Sn
"ark/pods": func(r *api.DataReading, s *dataupload.Snapshot) error {
return extractResourceListFromReading(r, &s.Pods)
},
"ark/configmaps": func(r *api.DataReading, s *dataupload.Snapshot) error {
return extractResourceListFromReading(r, &s.ConfigMaps)
},
}

// convertDataReadings processes a list of DataReadings using the provided
Expand Down
Loading