Skip to content

Commit

Permalink
Change name of SqlAction operator to AzureSqlAction
Browse files Browse the repository at this point in the history
  • Loading branch information
aka-msft committed Oct 11, 2019
1 parent f7dbf3a commit 099418d
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 137 deletions.
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ resources:
kind: ConsumerGroup
- group: azure
version: v1alpha1
kind: SqlAction
kind: AzureSqlAction
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// SqlActionSpec defines the desired state of SqlAction
type SqlActionSpec struct {
// AzureSqlActionSpec defines the desired state of AzureSqlAction
type AzureSqlActionSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
ResourceGroup string `json:"resourcegroup"`
ActionName string `json:"actionname"`
ServerName string `json:"servername"`
}

// SqlActionStatus defines the observed state of SqlAction
type SqlActionStatus struct {
// AzureSqlActionStatus defines the observed state of AzureSqlAction
type AzureSqlActionStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Provisioning bool `json:"provisioning,omitempty"`
Expand All @@ -43,28 +43,28 @@ type SqlActionStatus struct {
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// SqlAction is the Schema for the sqlactions API
type SqlAction struct {
// AzureSqlAction is the Schema for the azuresqlactions API
type AzureSqlAction struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec SqlActionSpec `json:"spec,omitempty"`
Status SqlActionStatus `json:"status,omitempty"`
Spec AzureSqlActionSpec `json:"spec,omitempty"`
Status AzureSqlActionStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// SqlActionList contains a list of SqlAction
type SqlActionList struct {
// AzureSqlActionList contains a list of AzureSqlAction
type AzureSqlActionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SqlAction `json:"items"`
Items []AzureSqlAction `json:"items"`
}

func init() {
SchemeBuilder.Register(&SqlAction{}, &SqlActionList{})
SchemeBuilder.Register(&AzureSqlAction{}, &AzureSqlActionList{})
}

func (s *SqlAction) IsSubmitted() bool {
func (s *AzureSqlAction) IsSubmitted() bool {
return s.Status.Provisioned || s.Status.Provisioning
}
178 changes: 89 additions & 89 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resources:
- bases/azure.microsoft.com_sqlservers.yaml
- bases/azure.microsoft.com_sqldatabases.yaml
- bases/azure.microsoft.com_sqlfirewallrules.yaml
- bases/azure.microsoft.com_sqlactions.yaml
- bases/azure.microsoft.com_azuresqlactions.yaml
# +kubebuilder:scaffold:crdkustomizeresource

patches:
Expand All @@ -26,7 +26,7 @@ patches:
#- patches/webhook_in_sqlservers.yaml
#- patches/webhook_in_sqldatabases.yaml
#- patches/webhook_in_sqlfirewallrules.yaml
#- patches/webhook_in_sqlactions.yaml
#- patches/webhook_in_azuresqlactions.yaml
# +kubebuilder:scaffold:crdkustomizewebhookpatch

# [CAINJECTION] patches here are for enabling the CA injection for each CRD
Expand All @@ -38,7 +38,7 @@ patches:
#- patches/cainjection_in_sqlservers.yaml
#- patches/cainjection_in_sqldatabases.yaml
#- patches/cainjection_in_sqlfirewallrules.yaml
#- patches/cainjection_in_sqlactions.yaml
#- patches/cainjection_in_azuresqlactions.yaml
# +kubebuilder:scaffold:crdkustomizecainjectionpatch

# the following config is for teaching kustomize how to do kustomization for CRDs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
certmanager.k8s.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: sqlactions.azure.microsoft.com
name: azuresqlactions.azure.microsoft.com
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: sqlactions.azure.microsoft.com
name: azuresqlactions.azure.microsoft.com
spec:
conversion:
strategy: Webhook
Expand Down
8 changes: 8 additions & 0 deletions config/samples/azure_v1alpha1_azuresqlaction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: azure.microsoft.com/v1alpha1
kind: AzureSqlAction
metadata:
name: azuresqlaction-sample
spec:
resourcegroup: resourcegroup-azure-operators
actionname: rollcreds
servername: sqlserver-sample-777
8 changes: 0 additions & 8 deletions config/samples/azure_v1alpha1_sqlaction.yaml

This file was deleted.

Loading

0 comments on commit 099418d

Please # to comment.