Repository: schemahero/schemahero
Pull request #315 (2021-02-06 06:44:06)

Allow dependabot to check go modules
This change allows dependabot to check any Go dependency which this project uses on a weekly basis and submit pull requests with version bumps in order to keep packages up-to-date.

https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates


Patch:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..61634d5a
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,7 @@
+---
+version: 2
+updates:
+  - package-ecosystem: "gomod"
+    directory: "/"
+    schedule:
+      interval: "weekly"
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 74781309..bca612b1 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -39,7 +39,7 @@ jobs:
 
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@test-build-runner
+      uses: github/codeql-action/init@v1
       with:
         languages: ${{ matrix.language }}
         # If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
     # If this step fails, then you should remove it and run the build manually (see below)
     - name: Autobuild
-      uses: github/codeql-action/autobuild@test-build-runner
+      uses: github/codeql-action/autobuild@v1
 
     # ℹ️ Command-line programs to run using the OS shell.
     # 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
     #   make release
 
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@test-build-runner
+      uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/proaction.yaml b/.github/workflows/proaction.yaml
index 0f891d09..5ae9111f 100644
--- a/.github/workflows/proaction.yaml
+++ b/.github/workflows/proaction.yaml
@@ -12,7 +12,7 @@ jobs:
         with:
           github-token: ${{secrets.GITHUB_TOKEN}}
 
-      - uses: peter-evans/create-pull-request@v3.8.0
+      - uses: peter-evans/create-pull-request@v3.5.0
         with:
           commit-message: "updating workflow"
           title: Updating workflow with latest actions
diff --git a/.github/workflows/tagged-release.yaml b/.github/workflows/tagged-release.yaml
index 71e46699..5dccf61b 100644
--- a/.github/workflows/tagged-release.yaml
+++ b/.github/workflows/tagged-release.yaml
@@ -17,11 +17,11 @@ jobs:
         shell: bash
       - uses: actions/checkout@v2
       - run: make all
-      - uses: actions/upload-artifact@v2.2.2
+      - uses: actions/upload-artifact@v2.2.1
         with:
           name: manager
           path: bin/manager
-      - uses: actions/upload-artifact@v2.2.2
+      - uses: actions/upload-artifact@v2.2.1
         with:
           name: kubectl-schemahero
           path: bin/kubectl-schemahero
@@ -35,7 +35,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -51,7 +51,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -67,7 +67,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -96,7 +96,7 @@ jobs:
         run: |
           echo "GORELEASER_PREVIOUS_TAG=$(curl --silent 'https://api.github.com/repos/schemahero/schemahero/releases/latest' | grep -Po '\"tag_name\": \"\K.*?(?=\")' )" >> $GITHUB_ENV
       - name: Run GoReleaser
-        uses: goreleaser/goreleaser-action@v2.4.1
+        uses: goreleaser/goreleaser-action@v2.3.0
         with:
           version: latest
           args: release --rm-dist --config deploy/.goreleaser.yaml
diff --git a/config/crds/v1/databases.schemahero.io_databases.yaml b/config/crds/v1/databases.schemahero.io_databases.yaml
index a8ae2283..33b13b3b 100644
--- a/config/crds/v1/databases.schemahero.io_databases.yaml
+++ b/config/crds/v1/databases.schemahero.io_databases.yaml
@@ -116,12 +116,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -207,12 +203,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -298,12 +290,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -395,12 +383,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -486,12 +470,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -577,12 +557,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -668,12 +644,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -759,12 +731,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -850,12 +818,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -941,12 +905,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1037,12 +997,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1132,12 +1088,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1223,12 +1175,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1314,12 +1262,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1405,12 +1349,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1496,12 +1436,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1590,12 +1526,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1681,12 +1613,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1772,12 +1700,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1863,12 +1787,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -1954,12 +1874,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2045,12 +1961,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2136,12 +2048,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
diff --git a/config/crds/v1beta1/databases.schemahero.io_databases.yaml b/config/crds/v1beta1/databases.schemahero.io_databases.yaml
index bea8f40f..165d74de 100644
--- a/config/crds/v1beta1/databases.schemahero.io_databases.yaml
+++ b/config/crds/v1beta1/databases.schemahero.io_databases.yaml
@@ -116,12 +116,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -207,12 +203,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -298,12 +290,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -395,12 +383,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -486,12 +470,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -577,12 +557,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -668,12 +644,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -759,12 +731,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -850,12 +818,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -941,12 +905,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1037,12 +997,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1132,12 +1088,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1223,12 +1175,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1314,12 +1262,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1405,12 +1349,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1496,12 +1436,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1590,12 +1526,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1681,12 +1613,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1772,12 +1700,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1863,12 +1787,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1954,12 +1874,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -2045,12 +1961,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -2136,12 +2048,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
diff --git a/go.sum b/go.sum
index 2dd1a19b..5b2b02e8 100644
--- a/go.sum
+++ b/go.sum
@@ -645,9 +645,11 @@ k8s.io/cli-runtime v0.18.0 h1:jG8XpSqQ5TrV0N+EZ3PFz6+gqlCk71dkggWCCq9Mq34=
 k8s.io/cli-runtime v0.18.0/go.mod h1:1eXfmBsIJosjn9LjEBUd2WVPoPAY9XGTqTFcPMIBsUQ=
 k8s.io/client-go v0.18.0 h1:yqKw4cTUQraZK3fcVCMeSa+lqKwcjZ5wtcOIPnxQno4=
 k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8=
+k8s.io/code-generator v0.18.0 h1:0xIRWzym+qMgVpGmLESDeMfz/orwgxwxFFAo1xfGNtQ=
 k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=
 k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c=
 k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
+k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4=
 k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
 k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
 k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
@@ -665,6 +667,7 @@ sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5
 sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
 sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E=
 sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
+sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
 sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
 sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
 sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
diff --git a/pkg/apis/databases/v1alpha4/string_or_value.go b/pkg/apis/databases/v1alpha4/string_or_value.go
index 208e0180..45885b90 100644
--- a/pkg/apis/databases/v1alpha4/string_or_value.go
+++ b/pkg/apis/databases/v1alpha4/string_or_value.go
@@ -21,14 +21,13 @@ type SecretKeyRef struct {
 }
 
 type Vault struct {
-	AgentInject             bool   `json:"agentInject,omitempty" yaml:"agentInject,omitempty"`
-	Secret                  string `json:"secret" yaml:"secret"`
-	Role                    string `json:"role" yaml:"role"`
+	AgentInject bool   `json:"agentInject,omitempty" yaml:"agentInject,omitempty"`
+	Secret      string `json:"secret" yaml:"secret"`
+	Role        string `json:"role" yaml:"role"`
+
 	Endpoint                string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
 	ServiceAccount          string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"`
 	ServiceAccountNamespace string `json:"serviceAccountNamespace,omitempty" yaml:"serviceAccountNamespace,omitempty"`
-	ConnectionTemplate      string `json:"connectionTemplate,omitempty" yaml:"connectionTemplate,omitempty"`
-	KubernetesAuthEndpoint  string `json:"kubernetesAuthEndpoint,omitempty" yaml:"kubernetesAuthEndpoint,omitempty"`
 }
 
 type SSM struct {
diff --git a/pkg/apis/databases/v1alpha4/vault.go b/pkg/apis/databases/v1alpha4/vault.go
index afa33814..1201f1b8 100644
--- a/pkg/apis/databases/v1alpha4/vault.go
+++ b/pkg/apis/databases/v1alpha4/vault.go
@@ -71,9 +71,7 @@ func (d Database) getDbType() (string, error) {
 
 // GetVaultAnnotations configures the required Vault annotations to
 // work with Vault secret injection, or returns an error if the Database
-// is misconfigured for Vault.
-// If there is a connection template specified it will be used otherwise
-// a default is provided for the supported database types.
+// is misconfigured for Vault
 func (d *Database) GetVaultAnnotations() (map[string]string, error) {
 	if !d.UsingVault() {
 		return nil, nil
@@ -88,49 +86,35 @@ func (d *Database) GetVaultAnnotations() (map[string]string, error) {
 		return nil, nil
 	}
 
-	db, err := d.getDbType()
+	t, err := d.getDbType()
 	if err != nil {
 		return nil, err
 	}
 
-	connTemplate := v.ConnectionTemplate
+	annotations := make(map[string]string)
 
-	var template string
-	if connTemplate != "" {
-		template = fmt.Sprintf(`
-{{- with secret "database/creds/%s" -}}
-%s{{- end }}`, v.Role, connTemplate)
-
-	} else {
-		switch db {
-		case "postgres", "cockroachdb":
-			template = fmt.Sprintf(`
+	switch t {
+	case "postgres", "cockroachdb":
+		t := fmt.Sprintf(`
 {{- with secret "database/creds/%s" -}}
 postgres://{{ .Data.username }}:{{ .Data.password }}@postgres:5432/%s{{- end }}`, v.Role, d.Name)
-		} else {
-			t = fmt.Sprintf(`
-{{- with secret "database/creds/%s" -}}
-%s`, v.Role, connTemplate)
-		}
 
-		case "mysql":
-			template = fmt.Sprintf(`
+		annotations["vault.hashicorp.com/agent-inject-template-schemaherouri"] = t
+	case "mysql":
+		t := fmt.Sprintf(`
 {{- with secret "database/creds/%s" -}}
 {{ .Data.username }}:{{ .Data.password }}@tcp(mysql:3306)/%s{{- end }}`, v.Role, d.Name)
 
-		case "cassandra":
-			return nil, errors.New("not implemented")
-		default:
-			return nil, fmt.Errorf("unknown database driver: %q", db)
-		}
+		annotations["vault.hashicorp.com/agent-inject-template-schemaherouri"] = t
+	case "cassandra":
+		return nil, errors.New("not implemented")
+	default:
+		return nil, fmt.Errorf("unknown database driver: %q", t)
 	}
 
-	a := map[string]string{
-		"vault.hashicorp.com/agent-inject-template-schemaherouri": template,
-		"vault.hashicorp.com/agent-inject":                        "true",
-		"vault.hashicorp.com/agent-inject-secret-schemaherouri":   fmt.Sprintf("database/creds/%s", v.Role),
-		"vault.hashicorp.com/role":                                v.Role,
-	}
+	annotations["vault.hashicorp.com/agent-inject"] = "true"
+	annotations["vault.hashicorp.com/agent-inject-secret-schemaherouri"] = fmt.Sprintf("database/creds/%s", v.Role)
+	annotations["vault.hashicorp.com/role"] = v.Role
 
-	return a, nil
+	return annotations, nil
 }
diff --git a/pkg/apis/databases/v1alpha4/vault_connection.go b/pkg/apis/databases/v1alpha4/vault_connection.go
index c9cf0ee2..04a114fd 100644
--- a/pkg/apis/databases/v1alpha4/vault_connection.go
+++ b/pkg/apis/databases/v1alpha4/vault_connection.go
@@ -30,7 +30,7 @@ import (
 	"k8s.io/client-go/kubernetes"
 )
 
-func (d *Database) getVaultConnection(ctx context.Context, clientset kubernetes.Interface, driver string, valueOrValueFrom ValueOrValueFrom) (string, string, error) {
+func (d *Database) getVaultConnection(ctx context.Context, clientset *kubernetes.Clientset, driver string, valueOrValueFrom ValueOrValueFrom) (string, string, error) {
 	// if the value is in vault and we are using the vault injector, just read the file
 	if valueOrValueFrom.ValueFrom.Vault.AgentInject {
 		vaultInjectedFileContents, err := ioutil.ReadFile("/vault/secrets/schemaherouri")
@@ -74,11 +74,7 @@ func (d *Database) getVaultConnection(ctx context.Context, clientset kubernetes.
 		return "", "", errors.Wrap(err, "failed to marshal login payload")
 	}
 
-	k8sAuthEndpoint := "/v1/auth/kubernetes/login"
-	if valueOrValueFrom.ValueFrom.Vault.KubernetesAuthEndpoint != "" {
-		k8sAuthEndpoint = valueOrValueFrom.ValueFrom.Vault.KubernetesAuthEndpoint
-	}
-	req, err := http.NewRequest("POST", fmt.Sprintf("%s%s", valueOrValueFrom.ValueFrom.Vault.Endpoint, k8sAuthEndpoint), bytes.NewReader(marshalledLoginBody))
+	req, err := http.NewRequest("POST", fmt.Sprintf("%s/v1/auth/kubernetes/login", valueOrValueFrom.ValueFrom.Vault.Endpoint), bytes.NewReader(marshalledLoginBody))
 	if err != nil {
 		return "", "", errors.Wrap(err, "failed to create login request")
 	}
@@ -141,7 +137,41 @@ func (d *Database) getVaultConnection(ctx context.Context, clientset kubernetes.
 		return "", "", errors.Wrap(err, "failed to unmarshal response")
 	}
 
-	uriTemplate, err := getConnectionURITemplate(valueOrValueFrom.ValueFrom.Vault, loginResponse.Auth.ClientToken, d.Name)
+	req, err = http.NewRequest("GET", fmt.Sprintf("%s/v1/database/config/%s", valueOrValueFrom.ValueFrom.Vault.Endpoint, d.Name), nil)
+	if err != nil {
+		return "", "", errors.Wrap(err, "failed to create request")
+	}
+	req.Header.Add("X-Vault-Token", loginResponse.Auth.ClientToken)
+
+	resp, err = http.DefaultClient.Do(req)
+	if err != nil {
+		return "", "", errors.Wrap(err, "failed to execute request")
+	}
+	defer resp.Body.Close()
+
+	if resp.StatusCode != http.StatusOK {
+		return "", "", errors.Errorf("unexpected response from vault reading config: %d", resp.StatusCode)
+	}
+
+	type ConnectionDetails struct {
+		ConnectionURL string `json:"connection_url"`
+	}
+	type ConfigDataResponse struct {
+		ConnectionDetails ConnectionDetails `json:"connection_details"`
+	}
+	configResponse := struct {
+		Data ConfigDataResponse `json:"data"`
+	}{
+		Data: ConfigDataResponse{},
+	}
+
+	b, err = ioutil.ReadAll(resp.Body)
+	if err != nil {
+		return "", "", errors.Wrap(err, "failed to read body")
+	}
+	if err := json.Unmarshal(b, &configResponse); err != nil {
+		return "", "", errors.Wrap(err, "failed to unmarshal response")
+	}
 
 	funcMap := template.FuncMap{}
 	funcMap["username"] = func() string {
@@ -152,7 +182,7 @@ func (d *Database) getVaultConnection(ctx context.Context, clientset kubernetes.
 	}
 
 	// with the connection url and the username and password (context), we can build a connection string
-	t := template.Must(template.New(fmt.Sprintf("%s/%s/%s", d.Namespace, d.Name, d.ResourceVersion)).Funcs(funcMap).Parse(uriTemplate))
+	t := template.Must(template.New(fmt.Sprintf("%s/%s/%s", d.Namespace, d.Name, d.ResourceVersion)).Funcs(funcMap).Parse(configResponse.Data.ConnectionDetails.ConnectionURL))
 	var connectionURI bytes.Buffer
 	if err := t.Execute(&connectionURI, credsResponse.Data); err != nil {
 		return "", "", errors.Wrap(err, "failed to render vault connection template")
@@ -160,48 +190,3 @@ func (d *Database) getVaultConnection(ctx context.Context, clientset kubernetes.
 
 	return driver, connectionURI.String(), nil
 }
-
-// get the uri template from the DB spec if set, otherwise use DB config in Vault
-func getConnectionURITemplate(vault *Vault, token string, dbName string) (string, error) {
-	if vault.ConnectionTemplate != "" {
-		return vault.ConnectionTemplate, nil
-	} else {
-		req, err := http.NewRequest("GET", fmt.Sprintf("%s/v1/database/config/%s", vault.Endpoint, dbName), nil)
-		if err != nil {
-			return "", errors.Wrap(err, "failed to create request")
-		}
-		req.Header.Add("X-Vault-Token", token)
-
-		resp, err := http.DefaultClient.Do(req)
-		if err != nil {
-			return "", errors.Wrap(err, "failed to execute request")
-		}
-		defer resp.Body.Close()
-
-		if resp.StatusCode != http.StatusOK {
-			return "", errors.Errorf("unexpected response from vault reading config: %d", resp.StatusCode)
-		}
-
-		type ConnectionDetails struct {
-			ConnectionURL string `json:"connection_url"`
-		}
-		type ConfigDataResponse struct {
-			ConnectionDetails ConnectionDetails `json:"connection_details"`
-		}
-		configResponse := struct {
-			Data ConfigDataResponse `json:"data"`
-		}{
-			Data: ConfigDataResponse{},
-		}
-
-		b, err := ioutil.ReadAll(resp.Body)
-		if err != nil {
-			return "", errors.Wrap(err, "failed to read body")
-		}
-		if err := json.Unmarshal(b, &configResponse); err != nil {
-			return "", errors.Wrap(err, "failed to unmarshal response")
-		}
-
-		return configResponse.Data.ConnectionDetails.ConnectionURL, nil
-	}
-}
diff --git a/pkg/controller/database/rbac.go b/pkg/controller/database/rbac.go
index 433ccc7f..37ac225c 100644
--- a/pkg/controller/database/rbac.go
+++ b/pkg/controller/database/rbac.go
@@ -121,7 +121,7 @@ func (r *ReconcileDatabase) reconcileRBACRole(ctx context.Context, databaseInsta
 			Rules: []rbacv1.PolicyRule{
 				{
 					APIGroups: []string{""},
-					Resources: []string{"secrets", "serviceaccounts"},
+					Resources: []string{"secrets"},
 					Verbs:     metav1.Verbs{"get"},
 				},
 				{
diff --git a/pkg/installer/database_objects.go b/pkg/installer/database_objects.go
index 0437bc5e..c0394114 100644
--- a/pkg/installer/database_objects.go
+++ b/pkg/installer/database_objects.go
@@ -118,12 +118,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -209,12 +205,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -300,12 +292,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -397,12 +385,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -488,12 +472,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -579,12 +559,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -670,12 +646,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -761,12 +733,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -852,12 +820,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -943,12 +907,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1039,12 +999,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1134,12 +1090,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1225,12 +1177,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1316,12 +1264,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1407,12 +1351,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1498,12 +1438,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1592,12 +1528,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1683,12 +1615,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1774,12 +1702,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1865,12 +1789,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -1956,12 +1876,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -2047,12 +1963,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -2138,12 +2050,8 @@ spec:
                               properties:
                                 agentInject:
                                   type: boolean
-                                connectionTemplate:
-                                  type: string
                                 endpoint:
                                   type: string
-                                kubernetesAuthEndpoint:
-                                  type: string
                                 role:
                                   type: string
                                 secret:
@@ -2325,12 +2233,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2416,12 +2320,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2507,12 +2407,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2604,12 +2500,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2695,12 +2587,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2786,12 +2674,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2877,12 +2761,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -2968,12 +2848,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3059,12 +2935,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3150,12 +3022,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3246,12 +3114,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3341,12 +3205,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3432,12 +3292,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3523,12 +3379,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3614,12 +3466,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3705,12 +3553,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3799,12 +3643,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3890,12 +3730,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -3981,12 +3817,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -4072,12 +3904,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -4163,12 +3991,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -4254,12 +4078,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:
@@ -4345,12 +4165,8 @@ spec:
                                 properties:
                                   agentInject:
                                     type: boolean
-                                  connectionTemplate:
-                                    type: string
                                   endpoint:
                                     type: string
-                                  kubernetesAuthEndpoint:
-                                    type: string
                                   role:
                                     type: string
                                   secret:


Test patch:
diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml
index 2ac8b690..b325a4b9 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/build-and-test.yaml
@@ -18,11 +18,11 @@ jobs:
         shell: bash
       - uses: actions/checkout@v2
       - run: make all
-      - uses: actions/upload-artifact@v2.2.2
+      - uses: actions/upload-artifact@v2.2.1
         with:
           name: kubectl-schemahero
           path: bin/kubectl-schemahero
-      - uses: actions/upload-artifact@v2.2.2
+      - uses: actions/upload-artifact@v2.2.1
         with:
           name: manager
           path: bin/manager
@@ -36,7 +36,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -52,7 +52,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -68,7 +68,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -84,7 +84,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -100,7 +100,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
@@ -116,7 +116,7 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Download kubectl-schemahero binary
-        uses: actions/download-artifact@v2.0.8
+        uses: actions/download-artifact@v2.0.6
         with:
           name: kubectl-schemahero
           path: bin/
diff --git a/pkg/apis/databases/v1alpha4/vault_test.go b/pkg/apis/databases/v1alpha4/database_types_test.go
similarity index 75%
rename from pkg/apis/databases/v1alpha4/vault_test.go
rename to pkg/apis/databases/v1alpha4/database_types_test.go
index 9c947378..0abf2fea 100644
--- a/pkg/apis/databases/v1alpha4/vault_test.go
+++ b/pkg/apis/databases/v1alpha4/database_types_test.go
@@ -91,41 +91,10 @@ postgres://{{ .Data.username }}:{{ .Data.password }}@postgres:5432/testdb{{- end
 {{- with secret "database/creds/test" -}}
 postgres://{{ .Data.username }}:{{ .Data.password }}@postgres:5432/testdb{{- end }}`,
 		},
-		{
-			name: "Postgres_template_passed_in",
-			db: &Database{
-				ObjectMeta: v1.ObjectMeta{
-					Name: "testdb",
-				},
-				Spec: DatabaseSpec{
-					Connection: DatabaseConnection{
-						Postgres: &PostgresConnection{
-							URI: ValueOrValueFrom{
-								ValueFrom: &ValueFrom{
-									Vault: &Vault{
-										AgentInject:        true,
-										Role:               "test",
-										Secret:             "database/creds/test",
-										ConnectionTemplate: "postgres://{{ .username }}:{{ .password }}@postgres:1234/userdb",
-									},
-								},
-							},
-						},
-					},
-				},
-			},
-			want: `
-{{- with secret "database/creds/test" -}}
-postgres://{{ .username }}:{{ .password }}@postgres:1234/userdb{{- end }}`,
-		},
 	}
 
 	for _, test := range tests {
-		test := test
-
 		t.Run(test.name, func(t *testing.T) {
-			t.Parallel()
-
 			req := require.New(t)
 
 			a, err := test.db.GetVaultAnnotations()
diff --git a/pkg/apis/databases/v1alpha4/vault_connection_test.go b/pkg/apis/databases/v1alpha4/vault_connection_test.go
deleted file mode 100644
index 47e9ef5c..00000000
--- a/pkg/apis/databases/v1alpha4/vault_connection_test.go
+++ /dev/null
@@ -1,254 +0,0 @@
-package v1alpha4
-
-import (
-	"context"
-	"fmt"
-	"net/http"
-	"net/http/httptest"
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-	v1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"k8s.io/client-go/kubernetes/fake"
-)
-
-func TestGetConnectionURIFromTemplate(t *testing.T) {
-	tests := []struct {
-		name             string
-		driver           string
-		tmpUser          string
-		tmpPassword      string
-		valueOrValueFrom ValueOrValueFrom
-	}{
-		{
-			name:        "uses_specified_template",
-			driver:      "mysql",
-			tmpUser:     "someuser",
-			tmpPassword: "p@ssw0rd",
-			valueOrValueFrom: ValueOrValueFrom{
-				ValueFrom: &ValueFrom{
-					Vault: &Vault{
-						ConnectionTemplate: "postgresql://{{ .username }}:{{ .password }}@postgresql:5432/schema",
-						Secret:             "secret",
-					},
-				},
-			},
-		},
-	}
-
-	sc := &v1.Secret{}
-	sa := &v1.ServiceAccount{
-		Secrets: []v1.ObjectReference{
-			{
-				Namespace: "",
-			},
-		},
-	}
-
-	for _, test := range tests {
-		test := test
-		t.Run(test.name, func(t *testing.T) {
-			t.Parallel()
-
-			srv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
-				switch r.URL.Path {
-				case "/v1/auth/kubernetes/login":
-					rw.Write([]byte(`{
-  "auth": {
-    "client_token": "blah"
-  }
-}`))
-				case "/v1/database/creds/secret":
-					rw.Write([]byte(`{
-  "lease_duration": 86400,
-  "data": {
-    "username": "someuser",
-    "password": "p@ssw0rd"
-  }
-}`))
-				default:
-					rw.WriteHeader(http.StatusNotFound)
-					rw.Write([]byte(fmt.Sprintf("Unknown path: %s", r.URL.Path)))
-				}
-			}))
-			defer srv.Close()
-
-			test.valueOrValueFrom.ValueFrom.Vault.Endpoint = srv.URL
-
-			d := &Database{}
-			_, uri, err := d.getVaultConnection(context.TODO(), fake.NewSimpleClientset(sa, sc), test.driver, test.valueOrValueFrom)
-			assert.NoError(t, err)
-
-			assert.Equal(t, fmt.Sprintf("postgresql://%s:%s@postgresql:5432/schema", test.tmpUser, test.tmpPassword), uri)
-		})
-	}
-}
-
-func TestGetConnectionURIFromVault(t *testing.T) {
-	tests := []struct {
-		name             string
-		driver           string
-		tmpUser          string
-		tmpPassword      string
-		valueOrValueFrom ValueOrValueFrom
-	}{
-		{
-			name:        "uses_template_from_vault",
-			driver:      "mysql",
-			tmpUser:     "someuser",
-			tmpPassword: "p@ssw0rd",
-			valueOrValueFrom: ValueOrValueFrom{
-				ValueFrom: &ValueFrom{
-					Vault: &Vault{
-						Secret: "secret",
-					},
-				},
-			},
-		},
-	}
-
-	sc := &v1.Secret{}
-	sa := &v1.ServiceAccount{
-		Secrets: []v1.ObjectReference{
-			{
-				Namespace: "",
-			},
-		},
-	}
-
-	for _, test := range tests {
-		test := test
-
-		t.Run(test.name, func(t *testing.T) {
-			t.Parallel()
-
-			d := &Database{
-				ObjectMeta: metav1.ObjectMeta{
-					Name: "db_name",
-				},
-			}
-			s := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
-				switch r.URL.Path {
-				case "/v1/auth/kubernetes/login":
-					rw.Write([]byte(`{
-  "auth": {
-    "client_token": "blah"
-  }
-}`))
-				case "/v1/database/creds/secret":
-					rw.Write([]byte(`{
-  "lease_duration": 86400,
-  "data": {
-    "username": "someuser",
-    "password": "p@ssw0rd"
-  }
-}`))
-				case "/v1/database/config/db_name":
-					rw.Write([]byte(`{
-  "data": {
-    "connection_details": {
-	  "connection_url": "postgresql://{{ .username }}:{{ .password }}@postgresql:5432/schema"
-	}
-  }
-}`))
-				default:
-					rw.WriteHeader(http.StatusNotFound)
-					rw.Write([]byte(fmt.Sprintf("Unknown path: %s", r.URL.Path)))
-				}
-			}))
-			defer s.Close()
-
-			test.valueOrValueFrom.ValueFrom.Vault.Endpoint = s.URL
-
-			_, uri, err := d.getVaultConnection(context.TODO(), fake.NewSimpleClientset(sa, sc), test.driver, test.valueOrValueFrom)
-			assert.NoError(t, err)
-
-			assert.Equal(t, fmt.Sprintf("postgresql://%s:%s@postgresql:5432/schema", test.tmpUser, test.tmpPassword), uri)
-		})
-	}
-}
-
-func TestKubernetesAuthEndpoint(t *testing.T) {
-	tests := []struct {
-		name                     string
-		kubernetesAuthEndpoint   string
-		expectedKubeAuthEndpoint string
-		valueOrValueFrom         ValueOrValueFrom
-	}{
-		{
-			name:                     "uses_default_endpoint",
-			expectedKubeAuthEndpoint: "/v1/auth/kubernetes/login",
-			valueOrValueFrom: ValueOrValueFrom{
-				ValueFrom: &ValueFrom{
-					Vault: &Vault{
-						ConnectionTemplate: "postgresql://{{ .username }}:{{ .password }}@postgresql:5432/schema",
-						Secret:             "secret",
-					},
-				},
-			},
-		},
-		{
-			name:                     "uses_specified_endpoint",
-			expectedKubeAuthEndpoint: "/v1/auth/kubernetes_custom/login",
-			valueOrValueFrom: ValueOrValueFrom{
-				ValueFrom: &ValueFrom{
-					Vault: &Vault{
-						ConnectionTemplate:     "postgresql://{{ .username }}:{{ .password }}@postgresql:5432/schema",
-						Secret:                 "secret",
-						KubernetesAuthEndpoint: "/v1/auth/kubernetes_custom/login",
-					},
-				},
-			},
-		},
-	}
-
-	for _, test := range tests {
-		test := test
-
-		t.Run(test.name, func(t *testing.T) {
-			t.Parallel()
-
-			endpointReached := false
-			var actualEndpoint string
-			srv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
-				switch path := r.URL.Path; {
-				case path == test.expectedKubeAuthEndpoint:
-					endpointReached = true
-					rw.Write([]byte(`{
-  "auth": {
-    "client_token": "blah"
-  }
-}`))
-				case path == "/v1/database/creds/secret":
-					rw.Write([]byte(`{
-  "lease_duration": 86400,
-  "data": {
-    "username": "someuser",
-    "password": "p@ssw0rd"
-  }
-}`))
-				default:
-					actualEndpoint = path
-				}
-			}))
-
-			test.valueOrValueFrom.ValueFrom.Vault.Endpoint = srv.URL
-
-			d := &Database{}
-			sc := &v1.Secret{}
-			sa := &v1.ServiceAccount{
-				Secrets: []v1.ObjectReference{
-					{
-						Namespace: "",
-					},
-				},
-			}
-
-			_, _, err := d.getVaultConnection(context.TODO(), fake.NewSimpleClientset(sa, sc), "postgresql", test.valueOrValueFrom)
-
-			assert.NoError(t, err)
-			assert.True(t, endpointReached, "Expected endpoint %s to be hit, but instead we called %s", test.expectedKubeAuthEndpoint, actualEndpoint)
-		})
-	}
-}