func registryDeploymentVersions()

in cost-optimization/gke-shift-left-cost/api/k8s_decoder.go [77:102]


func registryDeploymentVersions(scheme *runtime.Scheme) {
	gvkAppsV1 := schema.GroupVersionKind{
		Group:   "apps",
		Version: "v1",
		Kind:    DeploymentKind,
	}
	scheme.AddKnownTypeWithName(gvkAppsV1, &appsV1.Deployment{})

	gvkAppsV1beta1 := schema.GroupVersionKind{
		Group:   "apps",
		Version: "v1beta1",
		Kind:    DeploymentKind,
	}
	// we load v1, once the fields we are interested have in v1
	// This way, we don't need many implementations in builder_deployment.go file
	scheme.AddKnownTypeWithName(gvkAppsV1beta1, &appsV1.Deployment{})

	gvkAppsV1beta2 := schema.GroupVersionKind{
		Group:   "apps",
		Version: "v1beta2",
		Kind:    DeploymentKind,
	}
	// we load v1, once the fields we are interested have in v1
	// This way, we don't need many implementations in builder_deployment.go file
	scheme.AddKnownTypeWithName(gvkAppsV1beta2, &appsV1.Deployment{})
}