Skip to content

Commit

Permalink
Merge pull request #2 from jananivMS/UserManagerMySQL
Browse files Browse the repository at this point in the history
changes to make mysqluser rbac work & updated helm chart
  • Loading branch information
buhongw7583c authored Jun 5, 2020
2 parents 0536f59 + ca8c85a commit 10ee37a
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion api/v1alpha1/mysqluser_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ type MySQLUserSpec struct {
// +kubebuilder:subresource:status

// MySQLUser is the Schema for the postgresqlusers API
// +kubebuilder:resource:shortName=mysqlu,path=mysqluser
// +kubebuilder:printcolumn:name="Provisioned",type="string",JSONPath=".status.provisioned"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message"
type MySQLUser struct {
Expand Down
Binary file modified charts/azure-service-operator-0.1.0.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions charts/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ entries:
azure-service-operator:
- apiVersion: v2
appVersion: 0.1.0
created: "2020-06-02T09:40:24.98057+08:00"
created: "2020-06-04T18:12:40.330549-06:00"
dependencies:
- condition: azureUseMI
name: aad-pod-identity
repository: https://raw.githubusercontent.com/Azure/aad-pod-identity/master/charts
version: 1.5.5
description: Deploy components and dependencies of azure-service-operator
digest: b549a78f07f6dca8a8f761cd65791ca8cad73b3bf90b03891101fa2cd70e3de8
digest: 8bda2a91ae7c89eb2b06a1b71522595ce6d208c5875f11550a96190d17b52279
home: https://github.com/Azure/azure-service-operator
name: azure-service-operator
sources:
- https://github.com/Azure/azure-service-operator
urls:
- azure-service-operator-0.1.0.tgz
version: 0.1.0
generated: "2020-06-02T09:40:24.976336+08:00"
generated: "2020-06-04T18:12:40.327241-06:00"
2 changes: 2 additions & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ patches:
#- patches/webhook_in_rediscacheactions.yaml
#- patches/webhook_in_rediscachefirewallrules.yaml
#- patches/webhook_in_azurevirtualmachineextensions.yaml
#- patches/webhook_in_mysqlusers.yaml
# +kubebuilder:scaffold:crdkustomizewebhookpatch

# [CAINJECTION] patches here are for enabling the CA injection for each CRD
Expand Down Expand Up @@ -124,6 +125,7 @@ patches:
#- patches/cainjection_in_rediscacheactions.yaml
#- patches/cainjection_in_rediscachefirewallrules.yaml
#- patches/cainjection_in_azurevirtualmachineextensions.yaml
#- patches/cainjection_in_mysqlusers.yaml
# +kubebuilder:scaffold:crdkustomizecainjectionpatch

# the following config is for teaching kustomize how to do kustomization for CRDs.
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_mysqlusers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io.k8s.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: mysqlusers.azure.microsoft.com
2 changes: 1 addition & 1 deletion config/rbac/mysqluser_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# permissions for end users to edit mysqlservers.
# permissions for end users to edit mysqlusers.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/mysqluser_viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# permissions for end users to view mysqlservers.
# permissions for end users to view mysqlusers.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func init() {
// +kubebuilder:rbac:groups=azure.microsoft.com,resources=azuresqlusers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=azure.microsoft.com,resources=postgresqlusers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=azure.microsoft.com,resources=postgresqlusers/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=azure.microsoft.com,resources=mysqlusers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=azure.microsoft.com,resources=mysqlusers/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch

Expand Down

0 comments on commit 10ee37a

Please sign in to comment.