Getting/Starting
* To create the operator: (cluster level) {code:java} $ operator-sdk new mobile-security-service-operator --cluster-scoped {code}
* Adding the CDR {code:java} $ operator-sdk add api --api-version=mobile-security-service.aerogear.com/v1alpha1 --kind=MobileSecurityService {code}
* InitialTypes - Just to validate operator creation
{code:java} type MobileSecurityServiceSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html Size int32 `json:"size"` }
// MobileSecurityServiceStatus defines the observed state of MobileSecurityService // +k8s:openapi-gen=true type MobileSecurityServiceStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html Nodes []string `json:"nodes"` } {code}
{code:java} $ operator-sdk generate k8s {code}
* Adding a controller {code:java} operator-sdk add controller --api-version=mobile-security-service.aerogear.com/v1alpha1 --kind=MobileSecurityService {code}
|
|