mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 19:10:21 +00:00
5ea99fdd5b
This initial version of yamlgen generates deploy/scc.yaml based on the deployment artifact that is provided by the new api/deploy/ocp package. Signed-off-by: Niels de Vos <ndevos@redhat.com>
26 lines
714 B
Go
26 lines
714 B
Go
package v1
|
|
|
|
import (
|
|
corev1 "k8s.io/api/core/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
)
|
|
|
|
var (
|
|
legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"}
|
|
legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme)
|
|
DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme
|
|
)
|
|
|
|
func addLegacyKnownTypes(scheme *runtime.Scheme) error {
|
|
types := []runtime.Object{
|
|
&SecurityContextConstraints{},
|
|
&SecurityContextConstraintsList{},
|
|
&PodSecurityPolicySubjectReview{},
|
|
&PodSecurityPolicySelfSubjectReview{},
|
|
&PodSecurityPolicyReview{},
|
|
}
|
|
scheme.AddKnownTypes(legacyGroupVersion, types...)
|
|
return nil
|
|
}
|