stenic / sql-operator

Manage SQL databases, users and grant using kubernetes manifests
https://stenic.github.io/sql-operator/
Other
4 stars 3 forks source link

Use namespace labels to limit action on a SqlHost #45

Closed NoUseFreak closed 1 year ago

NoUseFreak commented 2 years ago
apiVersion: stenic.io/v1alpha1
kind: SqlHost
metadata:
  name: example-host
spec:
  engine: Mysql
  dsn: sqloperator:xxxxxxxxxxx@tcp(192.168.1.123:3306)/
  namespaceSelector:
    matchLabels:
      sql-operator/example-host: example-host
apiVersion: v1
kind: Namespace
metadata:
  labels:
    sql-operator/example-host: example-host
  name: my-project
spec:

SqlDatabase/SqlUser/SqlGrant can only be created if the namespace has the required labels

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.