From 40eaf67c11d6b29b62c8177465b1596b0ca57c48 Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Fri, 29 Nov 2024 17:02:37 +0100 Subject: [PATCH] feat(audit_trail): add Kubernetes ACL resource (#2339) --- api/audit_trail/v1alpha1/audit_trail_sdk.go | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/api/audit_trail/v1alpha1/audit_trail_sdk.go b/api/audit_trail/v1alpha1/audit_trail_sdk.go index a6ddb3c9..98fb697c 100644 --- a/api/audit_trail/v1alpha1/audit_trail_sdk.go +++ b/api/audit_trail/v1alpha1/audit_trail_sdk.go @@ -85,6 +85,7 @@ const ( ResourceTypeKubeCluster = ResourceType("kube_cluster") ResourceTypeKubePool = ResourceType("kube_pool") ResourceTypeKubeNode = ResourceType("kube_node") + ResourceTypeKubeACL = ResourceType("kube_acl") ) func (enum ResourceType) String() string { @@ -103,6 +104,7 @@ func (enum ResourceType) Values() []ResourceType { "kube_cluster", "kube_pool", "kube_node", + "kube_acl", } } @@ -121,6 +123,10 @@ func (enum *ResourceType) UnmarshalJSON(data []byte) error { return nil } +// KubernetesACLInfo: kubernetes acl info. +type KubernetesACLInfo struct { +} + // KubernetesClusterInfo: kubernetes cluster info. type KubernetesClusterInfo struct { } @@ -169,20 +175,23 @@ type Resource struct { Name *string `json:"name"` - // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo must be set. + // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo must be set. SecmSecretInfo *SecretManagerSecretInfo `json:"secm_secret_info,omitempty"` - // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo must be set. + // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo must be set. SecmSecretVersionInfo *SecretManagerSecretVersionInfo `json:"secm_secret_version_info,omitempty"` - // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo must be set. + // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo must be set. KubeClusterInfo *KubernetesClusterInfo `json:"kube_cluster_info,omitempty"` - // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo must be set. + // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo must be set. KubePoolInfo *KubernetesPoolInfo `json:"kube_pool_info,omitempty"` - // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo must be set. + // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo must be set. KubeNodeInfo *KubernetesNodeInfo `json:"kube_node_info,omitempty"` + + // Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo must be set. + KubeACLInfo *KubernetesACLInfo `json:"kube_acl_info,omitempty"` } // Event: event.