intercept

package
v0.4.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TFAllTypes = []string{

	"kubernetes_namespace_v1", "kubernetes_namespace",
	"kubernetes_service_v1", "kubernetes_service",
	"kubernetes_service_account_v1", "kubernetes_service_account",
	"kubernetes_default_service_account_v1", "kubernetes_default_service_account",
	"kubernetes_config_map_v1", "kubernetes_config_map", "kubernetes_config_map_v1_data",
	"kubernetes_secret_v1", "kubernetes_secret",
	"kubernetes_pod_v1", "kubernetes_pod",
	"kubernetes_endpoints_v1", "kubernetes_endpoints",
	"kubernetes_limit_range_v1", "kubernetes_limit_range",
	"kubernetes_persistent_volume_v1", "kubernetes_persistent_volume",
	"kubernetes_persistent_volume_claim_v1", "kubernetes_persistent_volume_claim",
	"kubernetes_replication_controller_v1", "kubernetes_replication_controller",
	"kubernetes_resource_quota_v1", "kubernetes_resource_quota",

	"kubernetes_api_service_v1", "kubernetes_api_service",

	"kubernetes_deployment_v1", "kubernetes_deployment",
	"kubernetes_daemon_set_v1", "kubernetes_daemonset", "kubernetes_daemon_set",
	"kubernetes_stateful_set_v1", "kubernetes_stateful_set",

	"kubernetes_cron_job_v1",
	"kubernetes_cron_job",
	"kubernetes_job_v1", "kubernetes_job",

	"kubernetes_horizontal_pod_autoscaler_v2",
	"kubernetes_horizontal_pod_autoscaler_v2beta2",
	"kubernetes_horizontal_pod_autoscaler_v1", "kubernetes_horizontal_pod_autoscaler",

	"kubernetes_certificate_signing_request_v1",
	"kubernetes_certificate_signing_request",

	"kubernetes_role_v1", "kubernetes_role",
	"kubernetes_role_binding_v1", "kubernetes_role_binding",
	"kubernetes_cluster_role_v1", "kubernetes_cluster_role",
	"kubernetes_cluster_role_binding_v1", "kubernetes_cluster_role_binding",

	"kubernetes_ingress_v1",
	"kubernetes_ingress",
	"kubernetes_ingress_class_v1", "kubernetes_ingress_class",
	"kubernetes_network_policy_v1", "kubernetes_network_policy",

	"kubernetes_pod_disruption_budget_v1",
	"kubernetes_pod_disruption_budget",
	"kubernetes_pod_security_policy_v1beta1", "kubernetes_pod_security_policy",

	"kubernetes_priority_class_v1", "kubernetes_priority_class",

	"kubernetes_validating_webhook_configuration_v1",
	"kubernetes_validating_webhook_configuration",
	"kubernetes_mutating_webhook_configuration_v1",
	"kubernetes_mutating_webhook_configuration",

	"kubernetes_storage_class_v1", "kubernetes_storage_class",
	"kubernetes_csi_driver_v1", "kubernetes_csi_driver",
}
View Source
var TFEndpointsTypes = []string{

	"kubernetes_service",
	"kubernetes_service_v1",

	"kubernetes_ingress",
	"kubernetes_ingress_v1",

	"kubectl_manifest",

	"helm_release",
}
View Source
var TFLabeledTypes = []string{

	"kubernetes_pod_v1", "kubernetes_pod",
	"kubernetes_replication_controller_v1", "kubernetes_replication_controller",
	"kubernetes_persistent_volume_v1", "kubernetes_persistent_volume",
	"kubernetes_persistent_volume_claim_v1", "kubernetes_persistent_volume_claim",
	"kubernetes_service", "kubernetes_service_v1",

	"kubernetes_deployment_v1", "kubernetes_deployment",
	"kubernetes_daemon_set_v1", "kubernetes_daemonset", "kubernetes_daemon_set",
	"kubernetes_stateful_set_v1", "kubernetes_stateful_set",

	"kubernetes_cron_job_v1",
	"kubernetes_cron_job",
	"kubernetes_job_v1", "kubernetes_job",

	"kubernetes_ingress", "kubernetes_ingress_v1",
}

Functions

This section is empty.

Types

type Converter

type Converter interface {
	// GetGVK returns the GroupVersionKind info with the given alias,
	// and returns false if failed to convert.
	GetGVK(alias string) (gvk schema.GroupVersionKind, ok bool)

	// GetGVR returns the GroupVersionResource info with the given alias,
	// and returns false if failed to convert.
	GetGVR(alias string) (gvr schema.GroupVersionResource, ok bool)
}

Converter holds the functions to transfer the given string to a schema descriptor.

func Terraform

func Terraform() Converter

Terraform returns Converter to convert Terraform provider resource type to raw Kubernetes GVK/GVR.

type Enforcer

type Enforcer interface {
	// AllowGVK returns true if the given GroupVersionKind is valid.
	AllowGVK(gvk schema.GroupVersionKind) (valid bool)

	// AllowGVR returns true if the given GroupVersionResource is valid.
	AllowGVR(gvr schema.GroupVersionResource) (valid bool)
}

Enforcer holds the functions to judge the given schema descriptor, whether to be interested in.

func Accessible

func Accessible() Enforcer

Accessible returns Enforcer to detect if the given Kubernetes GVK/GVR is accessible enforcer.

func Composite

func Composite() Enforcer

Composite returns Enforcer to detect if the given Kubernetes GVK/GVR is composite enforcer.

func Operable

func Operable() Enforcer

Operable returns Enforcer to detect if the given Kubernetes GVK/GVR is operable enforcer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL