Created
October 3, 2018 12:10
-
-
Save joatmon08/9be97c870c63d8697e532e6e8f8e7015 to your computer and use it in GitHub Desktop.
Hello Stateful types.go V1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package v1alpha1 | |
| import ( | |
| appsv1 "k8s.io/api/apps/v1" | |
| corev1 "k8s.io/api/core/v1" | |
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
| ) | |
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | |
| type HelloStatefulList struct { | |
| metav1.TypeMeta `json:",inline"` | |
| metav1.ListMeta `json:"metadata"` | |
| Items []HelloStateful `json:"items"` | |
| } | |
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | |
| type HelloStateful struct { | |
| metav1.TypeMeta `json:",inline"` | |
| metav1.ObjectMeta `json:"metadata"` | |
| Spec HelloStatefulSpec `json:"spec"` | |
| Status HelloStatefulStatus `json:"status,omitempty"` | |
| } | |
| type HelloStatefulSpec struct { | |
| PersistentVolume corev1.PersistentVolume `json:"persistentVolume"` | |
| PersistentVolumeClaim corev1.PersistentVolumeClaim `json:"persistentVolumeClaim"` | |
| StatefulSet appsv1.StatefulSet `json:"statefulSet"` | |
| Service corev1.Service `json:"service"` | |
| } | |
| type HelloStatefulStatus struct { | |
| // Fill me | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment