Skip to content

Commit

Permalink
New: Add k8s resource refresh spec/route and align k8sresourceattrs (#…
Browse files Browse the repository at this point in the history
…923)

* New: Add k8s resource refresh spec/route and align k8sresourceattrs

* Update: Add namespace kind, adjust labels and annotations, and add omit_empty

* Update: Naming cleanup
  • Loading branch information
Eric Powers committed Aug 17, 2023
1 parent f5a6b5e commit 7cee982
Show file tree
Hide file tree
Showing 12 changed files with 808 additions and 178 deletions.
1 change: 1 addition & 0 deletions .spelling
Expand Up @@ -258,6 +258,7 @@ JWTCertificateType
JWTs
K8s
K8sAsset
K8sResourceRefresh
k8s
k8s.aporeto.io
Katacoda
Expand Down
40 changes: 26 additions & 14 deletions doc/documentation.md
Expand Up @@ -15529,6 +15529,7 @@ Represents a read-only K8s resource such as a service.

```json
{
"accountID": 912303033456,
"cloudProvider": "GCP",
"clusterID": "https://container.googleapis.com/v1/projects/my-project/zones/us-central1-c/clusters/my-cluster",
"data": "{
Expand All @@ -15538,7 +15539,7 @@ Represents a read-only K8s resource such as a service.
}",
"k8sID": "k8s:my-namespace:service:my-service:gcp:https://container.googleapis.com/v1/projects/my-project/zones/us-central1-c/clusters/my-cluster",
"k8sNamespace": "my-namespace",
"kind": "Service",
"kind": "DaemonSet",
"name": "abc",
"prismaRegion": "us-east-1",
"prismaUnifiedAssetID": "4b882952f1a26c8a3ce16ee90af3cac9",
Expand All @@ -15554,11 +15555,17 @@ Type: `string`

Identifier of the object.

##### `accountID` [`autogenerated`,`read_only`]
##### `accountID` [`required`]

Type: `string`

The 12 digit ID of the AWS account the resource belongs.
The ID of the cloud account the resource belongs.

##### `annotations`

Type: `map[string]string`

Key value annotation pairs for k8s resources.

##### `cloudProvider` [`required`]

Expand Down Expand Up @@ -15608,27 +15615,21 @@ Type: `string`

The formed k8s resource ID of resource.

##### `k8sNamespace` [`required`]
##### `k8sNamespace`

Type: `string`

The k8s Namespace of the resource.

##### `kind` [`autogenerated`,`read_only`]
##### `kind` [`required`]

Type: `enum(Pending | Pod | Deployment | ReplicaSet | StatefulSet | DaemonSet | NetworkPolicy | Cluster | Service | Endpoints | Node)`
Type: `enum(Cluster | DaemonSet | Deployment | Endpoints | Namespace | NetworkPolicy | Node | ReplicaSet | Service | StatefulSet)`

The specific kind of the k8s resource.

Default value:
##### `labels`

```json
"Pending"
```

##### `labels` [`autogenerated`,`read_only`]

Type: `[]string`
Type: `map[string]string`

Key value label pairs for k8s resources.

Expand Down Expand Up @@ -15668,6 +15669,17 @@ Type: `time`

Last update date of the object.

### K8sResourceRefresh

When requested, k8s resources will start the process of pulling down all
Kubernetes resources from PrismaCloud.

#### Relations

##### `POST /k8sresourcerefreshes`

Trigger a Kubernetes resource refresh.

### PollAccount

Initiates a poll for a particular account. Data are stored in the current
Expand Down
50 changes: 32 additions & 18 deletions identities_registry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cee982

Please sign in to comment.