@@ -22,12 +22,10 @@ import (
22
22
)
23
23
24
24
const (
25
- crdTmplName = "deploy/crd.yaml"
26
- operatorTmplName = "deploy/operator.yaml"
27
- rbacTmplName = "deploy/rbac.yaml"
28
- crTmplName = "deploy/cr.yaml"
29
- serviceTmplName = "deploy/service.yaml"
30
- serviceMonitorTmplName = "deploy/serviceMonitor.yaml"
25
+ crdTmplName = "deploy/crd.yaml"
26
+ operatorTmplName = "deploy/operator.yaml"
27
+ rbacTmplName = "deploy/rbac.yaml"
28
+ crTmplName = "deploy/cr.yaml"
31
29
)
32
30
33
31
// CRDYaml contains data needed to generate deploy/crd.yaml
@@ -79,47 +77,6 @@ func renderOperatorYaml(w io.Writer, projectName, image string) error {
79
77
return t .Execute (w , o )
80
78
}
81
79
82
- // ServiceYaml contains all the customized data needed to generate deploy/service.yaml for a new operator
83
- // This service will be monitor by prometheus
84
- // when pairing with serviceYamlTmpl template.
85
- type ServiceYaml struct {
86
- ProjectName string
87
- }
88
-
89
- // renderServiceYaml generates deploy/service.yaml.
90
- func renderServiceYaml (w io.Writer , projectName string ) error {
91
- t := template .New (serviceTmplName )
92
- t , err := t .Parse (serviceYamlTmpl )
93
- if err != nil {
94
- return fmt .Errorf ("Failed to parse service yaml template: %v" , err )
95
- }
96
-
97
- s := ServiceYaml {
98
- ProjectName : projectName ,
99
- }
100
- return t .Execute (w , s )
101
- }
102
-
103
- // ServiceMonitorYaml contains all the customized data needed to generate deploy/serviceMonitor.yaml for a new operator
104
- // when pairing with serviceMonitorYamlTmpl template.
105
- type ServiceMonitorYaml struct {
106
- ProjectName string
107
- }
108
-
109
- // renderServiceYaml generates deploy/service.yaml.
110
- func renderServiceMonitorYaml (w io.Writer , projectName string ) error {
111
- t := template .New (serviceMonitorTmplName )
112
- t , err := t .Parse (serviceMonitorYamlTmpl )
113
- if err != nil {
114
- return fmt .Errorf ("Failed to parse serviceMonitor yaml template: %v" , err )
115
- }
116
-
117
- s := ServiceYaml {
118
- ProjectName : projectName ,
119
- }
120
- return t .Execute (w , s )
121
- }
122
-
123
80
// RBACYaml contains all the customized data needed to generate deploy/rbac.yaml for a new operator
124
81
// when pairing with rbacYamlTmpl template.
125
82
type RBACYaml struct {
0 commit comments