Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into manageduser-db
  • Loading branch information
jananivMS committed Apr 23, 2020
2 parents 94c9eae + 6df78cf commit feb1c42
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
17 changes: 17 additions & 0 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
mysqlDatabaseManager "github.com/Azure/azure-service-operator/pkg/resourcemanager/mysql/database"
mysqlFirewallManager "github.com/Azure/azure-service-operator/pkg/resourcemanager/mysql/firewallrule"
mysqlServerManager "github.com/Azure/azure-service-operator/pkg/resourcemanager/mysql/server"
mysqlvnetrule "github.com/Azure/azure-service-operator/pkg/resourcemanager/mysql/vnetrule"
resourcemanagernic "github.com/Azure/azure-service-operator/pkg/resourcemanager/nic"
resourcemanagerpip "github.com/Azure/azure-service-operator/pkg/resourcemanager/pip"
resourcemanagerpsqldatabase "github.com/Azure/azure-service-operator/pkg/resourcemanager/psql/database"
Expand Down Expand Up @@ -636,6 +637,22 @@ func setup() error {
return err
}

err = (&MySQLVNetRuleReconciler{
Reconciler: &AsyncReconciler{
Client: k8sManager.GetClient(),
AzureClient: mysqlvnetrule.NewMySQLVNetRuleClient(),
Telemetry: telemetry.InitializeTelemetryDefault(
"MySQLVNetRule",
ctrl.Log.WithName("controllers").WithName("MySQLVNetRule"),
),
Recorder: k8sManager.GetEventRecorderFor("MySQLVNetRule-controller"),
Scheme: k8sManager.GetScheme(),
},
}).SetupWithManager(k8sManager)
if err != nil {
return err
}

err = (&PostgreSQLServerReconciler{
Reconciler: &AsyncReconciler{
Client: k8sManager.GetClient(),
Expand Down
32 changes: 16 additions & 16 deletions devops/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,25 @@ steps:
kind create cluster
export KUBECONFIG=$(kind get kubeconfig-path --name="kind")
kubectl cluster-info
kubectl create namespace cert-manager
kubectl label namespace cert-manager cert-manager.io/disable-validation=true
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.12.0/cert-manager.yaml
kubectl create namespace azureoperator-system
kubectl --namespace azureoperator-system \
create secret generic azureoperatorsettings \
--from-literal=AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \
--from-literal=AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \
--from-literal=AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} \
--from-literal=AZURE_TENANT_ID=${AZURE_TENANT_ID}
# kubectl create namespace cert-manager
# kubectl label namespace cert-manager cert-manager.io/disable-validation=true
# kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.12.0/cert-manager.yaml
# kubectl create namespace azureoperator-system
# kubectl --namespace azureoperator-system \
# create secret generic azureoperatorsettings \
# --from-literal=AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \
# --from-literal=AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \
# --from-literal=AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID} \
# --from-literal=AZURE_TENANT_ID=${AZURE_TENANT_ID}
#create image and load it into cluster
IMG="docker.io/controllertest:1" make docker-build
kind load docker-image docker.io/controllertest:1 --loglevel "trace"
# IMG="docker.io/controllertest:1" make docker-build
# kind load docker-image docker.io/controllertest:1 --loglevel "trace"
make install
kubectl get namespaces
kubectl -n cert-manager rollout status deployment.v1.apps/cert-manager
kubectl get pods --namespace cert-manager
echo "all the pods should be running"
make deploy
# kubectl -n cert-manager rollout status deployment.v1.apps/cert-manager
# kubectl get pods --namespace cert-manager
# echo "all the pods should be running"
#make deploy
make test-existing-controllers
continueOnError: 'false'
displayName: 'Set kind cluster and Run int tests'
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "NetworkInterface")
os.Exit(1)
}

if err = (&controllers.MySQLVNetRuleReconciler{
Reconciler: &controllers.AsyncReconciler{
Client: mgr.GetClient(),
Expand Down

0 comments on commit feb1c42

Please sign in to comment.