Skip to content

Commit 4a9c63f

Browse files
author
runzexia
committed
mv auth proxy resource to project package
1 parent 93a8b9b commit 4a9c63f

File tree

4 files changed

+6
-18
lines changed

4 files changed

+6
-18
lines changed

cmd/init_project.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ func (o *projectOptions) runInit() {
146146
&project.KustomizeImagePatch{},
147147
&project.KustomizePrometheusMetricsPatch{},
148148
&project.KustomizeAuthProxyPatch{},
149-
&resource.AuthProxyService{},
150-
&resource.AuthProxyRole{},
151-
&resource.AuthProxyRoleBinding{})
149+
&project.AuthProxyService{},
150+
&project.AuthProxyRole{},
151+
&project.AuthProxyRoleBinding{})
152152
if err != nil {
153153
log.Fatal(err)
154154
}

pkg/scaffold/resource/authproxyrole.go renamed to pkg/scaffold/project/authproxyrole.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package resource
17+
package project
1818

1919
import (
2020
"path/filepath"
@@ -27,9 +27,6 @@ var _ input.File = &AuthProxyRole{}
2727
// AuthProxyRole scaffolds the config/rbac/auth_proxy_role.yaml file
2828
type AuthProxyRole struct {
2929
input.Input
30-
31-
// Resource is a resource in the API group
32-
Resource *Resource
3330
}
3431

3532
// GetInput implements input.File
@@ -41,7 +38,6 @@ func (r *AuthProxyRole) GetInput() (input.Input, error) {
4138
return r.Input, nil
4239
}
4340

44-
4541
var proxyRoleTemplate = `apiVersion: rbac.authorization.k8s.io/v1
4642
kind: ClusterRole
4743
metadata:

pkg/scaffold/resource/authproxyrolebinding.go renamed to pkg/scaffold/project/authproxyrolebinding.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package resource
17+
package project
1818

1919
import (
2020
"path/filepath"
@@ -27,9 +27,6 @@ var _ input.File = &AuthProxyRoleBinding{}
2727
// AuthProxyRoleBinding scaffolds the config/rbac/auth_proxy_role_binding_rbac.yaml file
2828
type AuthProxyRoleBinding struct {
2929
input.Input
30-
31-
// Resource is a resource in the API group
32-
Resource *Resource
3330
}
3431

3532
// GetInput implements input.File
@@ -41,7 +38,6 @@ func (r *AuthProxyRoleBinding) GetInput() (input.Input, error) {
4138
return r.Input, nil
4239
}
4340

44-
4541
var proxyRoleBindinggTemplate = `apiVersion: rbac.authorization.k8s.io/v1
4642
kind: ClusterRoleBinding
4743
metadata:

pkg/scaffold/resource/authproxyservice.go renamed to pkg/scaffold/project/authproxyservice.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package resource
17+
package project
1818

1919
import (
2020
"path/filepath"
@@ -27,9 +27,6 @@ var _ input.File = &AuthProxyService{}
2727
// AuthProxyService scaffolds the config/rbac/auth_proxy_role.yaml file
2828
type AuthProxyService struct {
2929
input.Input
30-
31-
// Resource is a resource in the API group
32-
Resource *Resource
3330
}
3431

3532
// GetInput implements input.File
@@ -41,7 +38,6 @@ func (r *AuthProxyService) GetInput() (input.Input, error) {
4138
return r.Input, nil
4239
}
4340

44-
4541
var AuthProxyServiceTemplate = `apiVersion: v1
4642
kind: Service
4743
metadata:

0 commit comments

Comments
 (0)