File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ func (c *createApp) WithDir(dir string) *createApp {
8686
8787func (c * createApp ) Run (ctx context.Context , cfg * CreateConfig ) error {
8888 at := AppTemplate {}
89- at .WithAppCfg (cfg ).WithDeployment (cfg ).WithService (cfg ).WithChartMetadata (cfg )
89+ at .WithAppCfg (cfg ).WithDeployment (cfg ).WithService (cfg ).WithChartMetadata (cfg ). WithOwner ( cfg )
9090 if cfg .Traefik {
9191 at .WithTraefik (cfg )
9292 }
@@ -107,6 +107,10 @@ type AppTemplate struct {
107107 service * corev1.Service
108108 chartMetadata * chart.Metadata
109109 traefik * Traefik
110+ owner * Owner
111+ }
112+
113+ type Owner struct {
110114}
111115
112116type Traefik struct {
@@ -515,6 +519,11 @@ func (at *AppTemplate) WithChartMetadata(cfg *CreateConfig) *AppTemplate {
515519 return at
516520}
517521
522+ func (at * AppTemplate ) WithOwner (cfg * CreateConfig ) * AppTemplate {
523+ at .owner = & Owner {}
524+ return at
525+ }
526+
518527func (at * AppTemplate ) WithTraefik (cfg * CreateConfig ) * AppTemplate {
519528 sa := & corev1.ServiceAccount {
520529 TypeMeta : metav1.TypeMeta {
@@ -915,6 +924,13 @@ func (at *AppTemplate) WriteFile(cfg *CreateConfig, baseDir string) (err error)
915924 return err
916925 }
917926 }
927+
928+ if at .owner != nil {
929+ err = ioutil .WriteFile (filepath .Join (path , "owners" ), []byte {}, 0644 )
930+ if err != nil {
931+ return err
932+ }
933+ }
918934 var yml []byte
919935 if at .deployment != nil {
920936 yml , err = ToYaml (at .deployment )
You can’t perform that action at this time.
0 commit comments