Documentation ¶
Index ¶
- Constants
- Variables
- func Configure(logger hclog.Logger, config interface{}) (schema.ClientMeta, diag.Diagnostics)
- func ContextMultiplex(meta schema.ClientMeta) []schema.ClientMeta
- func DeleteContextFilter(meta schema.ClientMeta, _ *schema.Resource) []interface{}
- func ErrorClassifier(_ schema.ClientMeta, resourceName string, err error) diag.Diagnostics
- func IgnoreForbidden(err error) bool
- func K8sMockTestHelper(t *testing.T, table *schema.Table, ...)
- func K8sTestHelper(t *testing.T, table *schema.Table, snapshotDirPath string)
- func OwnerReferenceResolver(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, ...) error
- func ResolveContext(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error
- type Client
- type Config
- type CronJobsClient
- type DaemonSetsClient
- type DeploymentsClient
- type EndpointsClient
- type JobsClient
- type LimitRangesClient
- type NamespacesClient
- type NetworkPoliciesClient
- type NodesClient
- type OwnerReferences
- type PodsClient
- type ReplicaSetsClient
- type ResourceQuotasClient
- type RoleBindingsClient
- type RolesClient
- type ServiceAccountsClient
- type Services
- type ServicesClient
- type StatefulSetsClient
- type TestOptions
Constants ¶
View Source
const ( ContextFieldName = "context" ContextFieldDesc = "Name of the context from k8s configuration." )
Variables ¶
View Source
var CommonContextField = schema.Column{ Name: ContextFieldName, Description: ContextFieldDesc, Type: schema.TypeString, Resolver: ResolveContext, }
Functions ¶
func Configure ¶
func Configure(logger hclog.Logger, config interface{}) (schema.ClientMeta, diag.Diagnostics)
func ContextMultiplex ¶
func ContextMultiplex(meta schema.ClientMeta) []schema.ClientMeta
ContextMultiplex returns a list of clients for each context from the cq config
func DeleteContextFilter ¶
func DeleteContextFilter(meta schema.ClientMeta, _ *schema.Resource) []interface{}
DeleteContextFilter returns a delete filter that cleans up the data belonging to the k8s context.
func ErrorClassifier ¶ added in v0.4.3
func ErrorClassifier(_ schema.ClientMeta, resourceName string, err error) diag.Diagnostics
func IgnoreForbidden ¶ added in v0.4.3
func K8sMockTestHelper ¶ added in v0.3.1
func K8sMockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, *gomock.Controller) Services, options TestOptions)
func K8sTestHelper ¶ added in v0.3.1
func OwnerReferenceResolver ¶ added in v0.3.0
Types ¶
type Client ¶
type Client struct { Log hclog.Logger Context string // contains filtered or unexported fields }
func (*Client) SetServices ¶ added in v0.3.0
func (Client) WithContext ¶ added in v0.3.0
type CronJobsClient ¶ added in v0.3.0
type CronJobsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*batchv1.CronJobList, error)
}
type DaemonSetsClient ¶ added in v0.3.0
type DaemonSetsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*appsv1.DaemonSetList, error)
}
type DeploymentsClient ¶ added in v0.3.0
type DeploymentsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*appsv1.DeploymentList, error)
}
type EndpointsClient ¶ added in v0.3.1
type EndpointsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*corev1.EndpointsList, error)
}
type JobsClient ¶ added in v0.3.0
type LimitRangesClient ¶ added in v0.3.1
type LimitRangesClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*corev1.LimitRangeList, error)
}
type NamespacesClient ¶ added in v0.3.0
type NamespacesClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*corev1.NamespaceList, error)
}
type NetworkPoliciesClient ¶ added in v0.3.0
type NetworkPoliciesClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*networkingv1.NetworkPolicyList, error)
}
type NodesClient ¶
type OwnerReferences ¶ added in v0.3.0
type OwnerReferences struct { ResourceUID types.UID v1.OwnerReference }
type PodsClient ¶
type ReplicaSetsClient ¶ added in v0.3.0
type ReplicaSetsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*appsv1.ReplicaSetList, error)
}
type ResourceQuotasClient ¶ added in v0.3.1
type ResourceQuotasClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*corev1.ResourceQuotaList, error)
}
type RoleBindingsClient ¶ added in v0.3.0
type RoleBindingsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*rbacv1.RoleBindingList, error)
}
type RolesClient ¶ added in v0.3.0
type ServiceAccountsClient ¶ added in v0.3.1
type ServiceAccountsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*corev1.ServiceAccountList, error)
}
type Services ¶
type Services struct { Client *kubernetes.Clientset CronJobs CronJobsClient DaemonSets DaemonSetsClient Deployments DeploymentsClient Endpoints EndpointsClient Jobs JobsClient LimitRanges LimitRangesClient Namespaces NamespacesClient NetworkPolicies NetworkPoliciesClient Nodes NodesClient Pods PodsClient ReplicaSets ReplicaSetsClient ResourceQuotas ResourceQuotasClient RoleBindings RoleBindingsClient Roles RolesClient ServiceAccounts ServiceAccountsClient Services ServicesClient StatefulSets StatefulSetsClient }
type ServicesClient ¶
type ServicesClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*corev1.ServiceList, error)
}
type StatefulSetsClient ¶ added in v0.3.0
type StatefulSetsClient interface {
List(ctx context.Context, opts metav1.ListOptions) (*appsv1.StatefulSetList, error)
}
type TestOptions ¶ added in v0.3.1
type TestOptions struct {
SkipEmptyJsonB bool
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.