func registryStatefulSetVersions()

in cost-optimization/gke-shift-left-cost/api/k8s_decoder.go [131:156]


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

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

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