src/server/pkg/deploy/assets/assets.go
func EtcdVolumeClaim(size int, opts *AssetOpts) *v1.PersistentVolumeClaim {
	return &v1.PersistentVolumeClaim{
		TypeMeta: metav1.TypeMeta{
			Kind:       "PersistentVolumeClaim",
			APIVersion: "v1",
		},
		ObjectMeta: objectMeta(etcdVolumeClaimName, labels(etcdName), nil, opts.Namespace),
		Spec: v1.PersistentVolumeClaimSpec{
			Resources: v1.ResourceRequirements{
				Requests: map[v1.ResourceName]resource.Quantity{
					"storage": resource.MustParse(fmt.Sprintf("%vGi", size)),
				},
			},
			AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce},
			VolumeName:  etcdVolumeName,
		},
	}
}
func EtcdVolumeClaim(size int, opts *AssetOpts) *v1.PersistentVolumeClaim {
	return &v1.PersistentVolumeClaim{
		TypeMeta: metav1.TypeMeta{
			Kind:       "PersistentVolumeClaim",
			APIVersion: "v1",
		},
		ObjectMeta: objectMeta(etcdVolumeClaimName, labels(etcdName), nil, opts.Namespace),
		Spec: v1.PersistentVolumeClaimSpec{
			Resources: v1.ResourceRequirements{
				Requests: map[v1.ResourceName]resource.Quantity{
					"storage": resource.MustParse(fmt.Sprintf("%vGi", size)),
				},
			},
			AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce},
			VolumeName:  etcdVolumeName,
		},
	}
}
func EtcdVolumeClaim ( size int , opts * AssetOpts ) * v1 . PersistentVolumeClaim { return & v1 . PersistentVolumeClaim { TypeMeta : metav1 . TypeMeta { Kind : " " , APIVersion : " " , } , ObjectMeta : objectMeta ( etcdVolumeClaimName , labels ( etcdName ) , nil , opts . Namespace ) , Spec : v1 . PersistentVolumeClaimSpec { Resources : v1 . ResourceRequirements { Requests : map [ v1 . ResourceName ] resource . Quantity { " " : resource . MustParse ( fmt . Sprintf ( " " , size ) ) , } , } , AccessModes : [ ] v1 . PersistentVolumeAccessMode { v1 . ReadWriteOnce } , VolumeName : etcdVolumeName , } , } }
// EtcdVolumeClaim creates a persistent volume claim of 'size' GB.
//
// Note that if you're controlling Etcd with a Stateful Set, this is
// unnecessary (the stateful set controller will create PVCs automatically).
EtcdVolumeClaim creates a persistent volume claim of size GB . Note that if you re controlling Etcd with a Stateful Set this is unnecessary ( the stateful set controller will create PVCs automatically ) .