From bc573cf1dc473959c2c9d4d84ecb3eb6be83090b Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Fri, 28 Sep 2018 19:43:05 +0200 Subject: [PATCH 01/62] Update code --- template.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 template.go diff --git a/template.go b/template.go new file mode 100644 index 0000000..8aa67f0 --- /dev/null +++ b/template.go @@ -0,0 +1,31 @@ +package template + +import ( + "bytes" + "fmt" + log "github.com/sirupsen/logrus" + "go/types" + "text/template" +) + +var ( + templates = make(map[string]template.Template) +) + +const ( + BuilderPath = "java" + PvcName = "m2-data" +) + +// Parse the file's template using the Application struct +func ParseTemplate(tmpl string, cfg types.Object) bytes.Buffer { + // Create Template and parse it + var b bytes.Buffer + t := templates[tmpl] + err := t.Execute(&b, cfg) + if err != nil { + fmt.Println("There was an error:", err.Error()) + } + log.Debug("Generated :", b.String()) + return b +} From 740533ad1a3032b5f5ef89527cb399d160be9724 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 3 Oct 2018 17:43:49 +0200 Subject: [PATCH 02/62] Rename SpringBoot to Component --- template.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/template.go b/template.go index 8aa67f0..645914c 100644 --- a/template.go +++ b/template.go @@ -1,3 +1,20 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package template import ( From a29aec90369d34d1009a47075735d5e28f1bcf89 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 3 Oct 2018 22:26:15 +0200 Subject: [PATCH 03/62] add templates --- assets_vfsdata.go | 209 ++++++++++++++++++++++++++++++++++++++++++ innerloop/imagestream | 23 +++++ innerloop/route | 11 +++ innerloop/service | 15 +++ template.go | 67 ++++++++++++-- 5 files changed, 316 insertions(+), 9 deletions(-) create mode 100644 assets_vfsdata.go create mode 100644 innerloop/imagestream create mode 100644 innerloop/route create mode 100644 innerloop/service diff --git a/assets_vfsdata.go b/assets_vfsdata.go new file mode 100644 index 0000000..15fd1db --- /dev/null +++ b/assets_vfsdata.go @@ -0,0 +1,209 @@ +// Code generated by vfsgen; DO NOT EDIT. + +// +build !dev + +package template + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + pathpkg "path" + "time" +) + +// Assets statically implements the virtual filesystem provided to vfsgen. +var Assets = func() http.FileSystem { + fs := vfsgen۰FS{ + "/": &vfsgen۰DirInfo{ + name: "/", + modTime: time.Date(2018, 8, 16, 8, 21, 38, 253832101, time.UTC), + }, + "/java": &vfsgen۰DirInfo{ + name: "java", + modTime: time.Date(2018, 8, 14, 17, 14, 16, 827264523, time.UTC), + }, + "/java/imagestream": &vfsgen۰CompressedFileInfo{ + name: "imagestream", + modTime: time.Date(2018, 8, 14, 17, 14, 16, 826950269, time.UTC), + uncompressedSize: 508, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\xc1\x6a\x33\x31\x0c\x84\xef\xfb\x14\x22\xf7\xc4\xfc\xff\xd1\x39\x95\xf6\xd2\x4b\x29\x0d\xf4\xae\xd8\xda\xd4\x8d\x6d\x09\xcb\x1b\x08\x26\xef\x5e\xe2\xdd\x94\xb4\xf4\x66\x3e\x69\x34\xe3\x41\x09\xef\x54\x34\x70\xb6\x10\x12\x1e\x68\xc3\x42\x59\x3f\xc2\x58\x37\x81\xcd\xe9\xdf\x70\x0c\xd9\x5b\x78\xbe\xce\x76\xb5\x10\xa6\x21\x51\x45\x8f\x15\xed\x00\x10\x71\x4f\x51\xaf\x2f\x00\x14\xb1\xd0\xda\xe6\x05\x13\x5d\x2e\x03\x40\xc6\x44\x9d\x74\xf5\x8d\xab\x90\xeb\x52\xe6\xe3\x24\xaf\x1c\x83\x3b\xcf\x07\x22\x3b\x8c\x16\x46\x8c\x4a\x03\x40\x6b\x61\x84\x45\xfb\xc4\xee\x48\xa5\xbf\xfb\xe9\x8a\x87\xee\xba\xfe\xb1\xf5\x90\x33\x57\xac\x81\xf3\x63\xf2\xda\x17\x01\xf0\x1b\x2e\x39\x01\x5c\xf2\x6a\x61\x55\xa6\xbc\xfe\xc4\x13\x5a\x33\x69\x31\xdd\xdd\xe8\xff\x60\xca\x94\xb7\x8e\x93\x84\x48\x7f\xce\x51\x95\xd2\x3e\xd2\x76\x3f\x85\xe8\xad\xf1\x24\x91\xcf\x89\x72\x55\xd3\x11\x8a\xac\xba\x55\x6b\x94\xfd\x92\x63\x2c\x9c\x6e\x01\xe6\x52\xef\x3e\xb5\xf0\x5f\x8d\xbd\x91\xf0\xa2\x0e\x49\xb8\xd4\xa5\x2d\x68\x33\x9c\xd7\x23\x56\xd2\xda\x41\xa1\x91\x0a\x65\x47\xf7\xb5\x02\xd4\xb3\x90\x85\x1d\x4f\xc5\xcd\xc5\xf6\x54\x5f\x01\x00\x00\xff\xff\xf6\xbc\xc2\x10\xfc\x01\x00\x00"), + }, + "/java/route": &vfsgen۰CompressedFileInfo{ + name: "route", + modTime: time.Date(2018, 8, 14, 17, 14, 16, 827158760, time.UTC), + uncompressedSize: 172, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xcd\x31\x0e\xc2\x30\x0c\x85\xe1\x3d\xa7\xf0\x09\x82\x58\x73\x08\x06\x90\xd8\x4d\xfb\x10\x16\x4d\x6c\x25\xa6\x4b\xd5\xbb\xa3\x28\x13\xa2\xf3\xff\x3e\x3d\x36\xb9\xa3\x36\xd1\x92\xa8\xea\xc7\x11\xd5\x50\xda\x4b\x9e\x1e\x45\x4f\xeb\x39\xbc\xa5\xcc\x89\xae\xbd\x85\x0c\xe7\x99\x9d\x53\x20\x2a\x9c\x91\x68\xdb\xe2\x85\x33\xf6\x3d\x10\x2d\xfc\xc0\xd2\x7a\x23\x62\xb3\xdf\xf8\x0f\x9a\x61\xea\x63\xd7\x41\xc6\xd1\x0d\x75\x95\x09\x47\xe2\x1b\x00\x00\xff\xff\xdd\xc7\x7e\xf9\xac\x00\x00\x00"), + }, + "/java/service": &vfsgen۰CompressedFileInfo{ + name: "service", + modTime: time.Date(2018, 8, 14, 17, 14, 16, 827320403, time.UTC), + uncompressedSize: 247, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\xc1\xaa\xc2\x30\x10\x45\xf7\xf9\x8a\xf9\x81\xf7\xc0\x6d\xb6\xee\xa5\xa0\xb8\x1f\xd3\x6b\x09\x26\x99\x30\x19\x0a\x52\xfa\xef\xd2\xe0\x42\x29\xee\x86\x39\xe7\xc0\xe5\x1a\xaf\xd0\x16\xa5\x78\x9a\x0f\xee\x11\xcb\xe8\xe9\x0c\x9d\x63\x80\xcb\x30\x1e\xd9\xd8\x3b\xa2\xc2\x19\x9e\x96\xe5\xff\xc4\x19\xeb\xea\x88\x12\xdf\x90\xda\xc6\x88\xb8\xd6\x6f\xb8\x0f\x5a\x45\xd8\xe4\x2a\x6a\xbd\xfa\xeb\x67\x57\x06\x51\x7b\x67\x55\xc5\x24\x48\xf2\x74\x39\x0e\xfd\x63\xac\x13\x6c\xd8\xb9\x0d\x09\xc1\x44\x7f\x2e\x18\x51\x93\x3c\x33\x8a\x05\x29\xf7\x38\x7d\xf0\x57\x00\x00\x00\xff\xff\x73\x21\x02\x3d\xf7\x00\x00\x00"), + }, + } + fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/java"].(os.FileInfo), + } + fs["/java"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/java/imagestream"].(os.FileInfo), + fs["/java/route"].(os.FileInfo), + fs["/java/service"].(os.FileInfo), + } + + return fs +}() + +type vfsgen۰FS map[string]interface{} + +func (fs vfsgen۰FS) Open(path string) (http.File, error) { + path = pathpkg.Clean("/" + path) + f, ok := fs[path] + if !ok { + return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist} + } + + switch f := f.(type) { + case *vfsgen۰CompressedFileInfo: + gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent)) + if err != nil { + // This should never happen because we generate the gzip bytes such that they are always valid. + panic("unexpected error reading own gzip compressed bytes: " + err.Error()) + } + return &vfsgen۰CompressedFile{ + vfsgen۰CompressedFileInfo: f, + gr: gr, + }, nil + case *vfsgen۰DirInfo: + return &vfsgen۰Dir{ + vfsgen۰DirInfo: f, + }, nil + default: + // This should never happen because we generate only the above types. + panic(fmt.Sprintf("unexpected type %T", f)) + } +} + +// vfsgen۰CompressedFileInfo is a static definition of a gzip compressed file. +type vfsgen۰CompressedFileInfo struct { + name string + modTime time.Time + compressedContent []byte + uncompressedSize int64 +} + +func (f *vfsgen۰CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) { + return nil, fmt.Errorf("cannot Readdir from file %s", f.name) +} +func (f *vfsgen۰CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil } + +func (f *vfsgen۰CompressedFileInfo) GzipBytes() []byte { + return f.compressedContent +} + +func (f *vfsgen۰CompressedFileInfo) Name() string { return f.name } +func (f *vfsgen۰CompressedFileInfo) Size() int64 { return f.uncompressedSize } +func (f *vfsgen۰CompressedFileInfo) Mode() os.FileMode { return 0444 } +func (f *vfsgen۰CompressedFileInfo) ModTime() time.Time { return f.modTime } +func (f *vfsgen۰CompressedFileInfo) IsDir() bool { return false } +func (f *vfsgen۰CompressedFileInfo) Sys() interface{} { return nil } + +// vfsgen۰CompressedFile is an opened compressedFile instance. +type vfsgen۰CompressedFile struct { + *vfsgen۰CompressedFileInfo + gr *gzip.Reader + grPos int64 // Actual gr uncompressed position. + seekPos int64 // Seek uncompressed position. +} + +func (f *vfsgen۰CompressedFile) Read(p []byte) (n int, err error) { + if f.grPos > f.seekPos { + // Rewind to beginning. + err = f.gr.Reset(bytes.NewReader(f.compressedContent)) + if err != nil { + return 0, err + } + f.grPos = 0 + } + if f.grPos < f.seekPos { + // Fast-forward. + _, err = io.CopyN(ioutil.Discard, f.gr, f.seekPos-f.grPos) + if err != nil { + return 0, err + } + f.grPos = f.seekPos + } + n, err = f.gr.Read(p) + f.grPos += int64(n) + f.seekPos = f.grPos + return n, err +} +func (f *vfsgen۰CompressedFile) Seek(offset int64, whence int) (int64, error) { + switch whence { + case io.SeekStart: + f.seekPos = 0 + offset + case io.SeekCurrent: + f.seekPos += offset + case io.SeekEnd: + f.seekPos = f.uncompressedSize + offset + default: + panic(fmt.Errorf("invalid whence value: %v", whence)) + } + return f.seekPos, nil +} +func (f *vfsgen۰CompressedFile) Close() error { + return f.gr.Close() +} + +// vfsgen۰DirInfo is a static definition of a directory. +type vfsgen۰DirInfo struct { + name string + modTime time.Time + entries []os.FileInfo +} + +func (d *vfsgen۰DirInfo) Read([]byte) (int, error) { + return 0, fmt.Errorf("cannot Read from directory %s", d.name) +} +func (d *vfsgen۰DirInfo) Close() error { return nil } +func (d *vfsgen۰DirInfo) Stat() (os.FileInfo, error) { return d, nil } + +func (d *vfsgen۰DirInfo) Name() string { return d.name } +func (d *vfsgen۰DirInfo) Size() int64 { return 0 } +func (d *vfsgen۰DirInfo) Mode() os.FileMode { return 0755 | os.ModeDir } +func (d *vfsgen۰DirInfo) ModTime() time.Time { return d.modTime } +func (d *vfsgen۰DirInfo) IsDir() bool { return true } +func (d *vfsgen۰DirInfo) Sys() interface{} { return nil } + +// vfsgen۰Dir is an opened dir instance. +type vfsgen۰Dir struct { + *vfsgen۰DirInfo + pos int // Position within entries for Seek and Readdir. +} + +func (d *vfsgen۰Dir) Seek(offset int64, whence int) (int64, error) { + if offset == 0 && whence == io.SeekStart { + d.pos = 0 + return 0, nil + } + return 0, fmt.Errorf("unsupported Seek in directory %s", d.name) +} + +func (d *vfsgen۰Dir) Readdir(count int) ([]os.FileInfo, error) { + if d.pos >= len(d.entries) && count > 0 { + return nil, io.EOF + } + if count <= 0 || count > len(d.entries)-d.pos { + count = len(d.entries) - d.pos + } + e := d.entries[d.pos : d.pos+count] + d.pos += count + return e, nil +} diff --git a/innerloop/imagestream b/innerloop/imagestream new file mode 100644 index 0000000..6f672a0 --- /dev/null +++ b/innerloop/imagestream @@ -0,0 +1,23 @@ +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + labels: + app: {{.Name}} + name: {{.Image.Name}} +spec: + lookupPolicy: + local: false + {{if .Image.DockerImage}} + tags: + - {{if .Image.AnnotationCmds}} + annotations: + cmds: "run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" + {{end}} + from: + kind: DockerImage + name: {{.Image.Repo}} + importPolicy: {} + name: latest + referencePolicy: + type: Source + {{end}} \ No newline at end of file diff --git a/innerloop/route b/innerloop/route new file mode 100644 index 0000000..8da5970 --- /dev/null +++ b/innerloop/route @@ -0,0 +1,11 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: {{.Name}} + labels: + app: {{.Name}} + name: {{.Name}} +spec: + to: + kind: Service + name: {{.Name}} \ No newline at end of file diff --git a/innerloop/service b/innerloop/service new file mode 100644 index 0000000..6f3e6ed --- /dev/null +++ b/innerloop/service @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{.Name}} + labels: + app: {{.Name}} + name: {{.Name}} +spec: + ports: + - port: {{.Port}} + protocol: TCP + targetPort: {{.Port}} + selector: + app: {{.Name}} + deploymentconfig: {{.Name}} \ No newline at end of file diff --git a/template.go b/template.go index 645914c..c38fddb 100644 --- a/template.go +++ b/template.go @@ -20,29 +20,78 @@ package template import ( "bytes" "fmt" + "github.com/shurcooL/httpfs/vfsutil" + "github.com/snowdrop/component-operator/pkg/types" log "github.com/sirupsen/logrus" - "go/types" + "os" + "strings" "text/template" ) var ( - templates = make(map[string]template.Template) + TemplateAssets = Assets + TemplatePath = "java" + TemplateFiles []string + Templates = make(map[string]template.Template) ) -const ( - BuilderPath = "java" - PvcName = "m2-data" -) + +func init() { + walkFn := func(path string, fi os.FileInfo, err error) error { + if err != nil { + log.Printf("can't stat file %s: %v\n", path, err) + return nil + } + + if fi.IsDir() { + return nil + } + + log.Debugf("Path of the file to be added as template : %s" + path) + TemplateFiles = append(TemplateFiles, path) + return nil + } + + errW := vfsutil.Walk(TemplateAssets, TemplatePath, walkFn) + if errW != nil { + panic(errW) + } + + // Fill an array with the k8s/openshift yaml files + for i := range TemplateFiles { + log.Debugf(" File : %s", TemplateFiles[i]) + + // Create a new Template using the File name as key and add it to the array + t := template.New(TemplateFiles[i]) + + // Read Template's content + data, err := vfsutil.ReadFile(TemplateAssets, TemplateFiles[i]) + if err != nil { + log.Error(err) + } + t, err = t.Parse(bytes.NewBuffer(data).String()) + if err != nil { + log.Error(err) + } + Templates[TemplateFiles[i]] = *t + } +} + // Parse the file's template using the Application struct -func ParseTemplate(tmpl string, cfg types.Object) bytes.Buffer { +func ParseTemplate(tmpl string, obj types.Application) bytes.Buffer { // Create Template and parse it var b bytes.Buffer - t := templates[tmpl] - err := t.Execute(&b, cfg) + t := Templates[tmpl] + err := t.Execute(&b, obj) if err != nil { fmt.Println("There was an error:", err.Error()) } log.Debug("Generated :", b.String()) return b } + +// +func GetTemplateFullName(artifact string) string { + return strings.Join([]string{"java", artifact}, "/") +} From f9beb8767066384fa6e142b34feef58db0d2d796 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 09:11:30 +0200 Subject: [PATCH 04/62] Generate assets using vfsgen --- assets.go | 24 +++++++++++++++++ assets_vfsdata.go | 32 +++++++++++------------ doc.go | 20 ++++++++++++++ template.go | 14 ++++++---- {innerloop => tmpl/innerloop}/imagestream | 0 {innerloop => tmpl/innerloop}/route | 0 {innerloop => tmpl/innerloop}/service | 0 7 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 assets.go create mode 100644 doc.go rename {innerloop => tmpl/innerloop}/imagestream (100%) rename {innerloop => tmpl/innerloop}/route (100%) rename {innerloop => tmpl/innerloop}/service (100%) diff --git a/assets.go b/assets.go new file mode 100644 index 0000000..4974390 --- /dev/null +++ b/assets.go @@ -0,0 +1,24 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +build dev + +package template + +import "net/http" + +var Assets http.FileSystem = http.Dir("tmpl") diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 15fd1db..70bfb87 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -21,41 +21,41 @@ var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2018, 8, 16, 8, 21, 38, 253832101, time.UTC), + modTime: time.Date(2018, 10, 4, 7, 6, 8, 650799297, time.UTC), }, - "/java": &vfsgen۰DirInfo{ - name: "java", - modTime: time.Date(2018, 8, 14, 17, 14, 16, 827264523, time.UTC), + "/innerloop": &vfsgen۰DirInfo{ + name: "innerloop", + modTime: time.Date(2018, 10, 3, 20, 10, 15, 129547844, time.UTC), }, - "/java/imagestream": &vfsgen۰CompressedFileInfo{ + "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 8, 14, 17, 14, 16, 826950269, time.UTC), + modTime: time.Date(2018, 8, 14, 17, 14, 16, 0, time.UTC), uncompressedSize: 508, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\xc1\x6a\x33\x31\x0c\x84\xef\xfb\x14\x22\xf7\xc4\xfc\xff\xd1\x39\x95\xf6\xd2\x4b\x29\x0d\xf4\xae\xd8\xda\xd4\x8d\x6d\x09\xcb\x1b\x08\x26\xef\x5e\xe2\xdd\x94\xb4\xf4\x66\x3e\x69\x34\xe3\x41\x09\xef\x54\x34\x70\xb6\x10\x12\x1e\x68\xc3\x42\x59\x3f\xc2\x58\x37\x81\xcd\xe9\xdf\x70\x0c\xd9\x5b\x78\xbe\xce\x76\xb5\x10\xa6\x21\x51\x45\x8f\x15\xed\x00\x10\x71\x4f\x51\xaf\x2f\x00\x14\xb1\xd0\xda\xe6\x05\x13\x5d\x2e\x03\x40\xc6\x44\x9d\x74\xf5\x8d\xab\x90\xeb\x52\xe6\xe3\x24\xaf\x1c\x83\x3b\xcf\x07\x22\x3b\x8c\x16\x46\x8c\x4a\x03\x40\x6b\x61\x84\x45\xfb\xc4\xee\x48\xa5\xbf\xfb\xe9\x8a\x87\xee\xba\xfe\xb1\xf5\x90\x33\x57\xac\x81\xf3\x63\xf2\xda\x17\x01\xf0\x1b\x2e\x39\x01\x5c\xf2\x6a\x61\x55\xa6\xbc\xfe\xc4\x13\x5a\x33\x69\x31\xdd\xdd\xe8\xff\x60\xca\x94\xb7\x8e\x93\x84\x48\x7f\xce\x51\x95\xd2\x3e\xd2\x76\x3f\x85\xe8\xad\xf1\x24\x91\xcf\x89\x72\x55\xd3\x11\x8a\xac\xba\x55\x6b\x94\xfd\x92\x63\x2c\x9c\x6e\x01\xe6\x52\xef\x3e\xb5\xf0\x5f\x8d\xbd\x91\xf0\xa2\x0e\x49\xb8\xd4\xa5\x2d\x68\x33\x9c\xd7\x23\x56\xd2\xda\x41\xa1\x91\x0a\x65\x47\xf7\xb5\x02\xd4\xb3\x90\x85\x1d\x4f\xc5\xcd\xc5\xf6\x54\x5f\x01\x00\x00\xff\xff\xf6\xbc\xc2\x10\xfc\x01\x00\x00"), }, - "/java/route": &vfsgen۰CompressedFileInfo{ + "/innerloop/route": &vfsgen۰CompressedFileInfo{ name: "route", - modTime: time.Date(2018, 8, 14, 17, 14, 16, 827158760, time.UTC), + modTime: time.Date(2018, 8, 14, 17, 14, 16, 0, time.UTC), uncompressedSize: 172, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xcd\x31\x0e\xc2\x30\x0c\x85\xe1\x3d\xa7\xf0\x09\x82\x58\x73\x08\x06\x90\xd8\x4d\xfb\x10\x16\x4d\x6c\x25\xa6\x4b\xd5\xbb\xa3\x28\x13\xa2\xf3\xff\x3e\x3d\x36\xb9\xa3\x36\xd1\x92\xa8\xea\xc7\x11\xd5\x50\xda\x4b\x9e\x1e\x45\x4f\xeb\x39\xbc\xa5\xcc\x89\xae\xbd\x85\x0c\xe7\x99\x9d\x53\x20\x2a\x9c\x91\x68\xdb\xe2\x85\x33\xf6\x3d\x10\x2d\xfc\xc0\xd2\x7a\x23\x62\xb3\xdf\xf8\x0f\x9a\x61\xea\x63\xd7\x41\xc6\xd1\x0d\x75\x95\x09\x47\xe2\x1b\x00\x00\xff\xff\xdd\xc7\x7e\xf9\xac\x00\x00\x00"), }, - "/java/service": &vfsgen۰CompressedFileInfo{ + "/innerloop/service": &vfsgen۰CompressedFileInfo{ name: "service", - modTime: time.Date(2018, 8, 14, 17, 14, 16, 827320403, time.UTC), + modTime: time.Date(2018, 8, 14, 17, 14, 16, 0, time.UTC), uncompressedSize: 247, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\xc1\xaa\xc2\x30\x10\x45\xf7\xf9\x8a\xf9\x81\xf7\xc0\x6d\xb6\xee\xa5\xa0\xb8\x1f\xd3\x6b\x09\x26\x99\x30\x19\x0a\x52\xfa\xef\xd2\xe0\x42\x29\xee\x86\x39\xe7\xc0\xe5\x1a\xaf\xd0\x16\xa5\x78\x9a\x0f\xee\x11\xcb\xe8\xe9\x0c\x9d\x63\x80\xcb\x30\x1e\xd9\xd8\x3b\xa2\xc2\x19\x9e\x96\xe5\xff\xc4\x19\xeb\xea\x88\x12\xdf\x90\xda\xc6\x88\xb8\xd6\x6f\xb8\x0f\x5a\x45\xd8\xe4\x2a\x6a\xbd\xfa\xeb\x67\x57\x06\x51\x7b\x67\x55\xc5\x24\x48\xf2\x74\x39\x0e\xfd\x63\xac\x13\x6c\xd8\xb9\x0d\x09\xc1\x44\x7f\x2e\x18\x51\x93\x3c\x33\x8a\x05\x29\xf7\x38\x7d\xf0\x57\x00\x00\x00\xff\xff\x73\x21\x02\x3d\xf7\x00\x00\x00"), }, } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/java"].(os.FileInfo), + fs["/innerloop"].(os.FileInfo), } - fs["/java"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/java/imagestream"].(os.FileInfo), - fs["/java/route"].(os.FileInfo), - fs["/java/service"].(os.FileInfo), + fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/innerloop/imagestream"].(os.FileInfo), + fs["/innerloop/route"].(os.FileInfo), + fs["/innerloop/service"].(os.FileInfo), } return fs @@ -79,7 +79,7 @@ func (fs vfsgen۰FS) Open(path string) (http.File, error) { } return &vfsgen۰CompressedFile{ vfsgen۰CompressedFileInfo: f, - gr: gr, + gr: gr, }, nil case *vfsgen۰DirInfo: return &vfsgen۰Dir{ diff --git a/doc.go b/doc.go new file mode 100644 index 0000000..cec3d7d --- /dev/null +++ b/doc.go @@ -0,0 +1,20 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package template + +//go:generate vfsgendev -source="github.com/snowdrop/component-operator/pkg/util/template".Assets diff --git a/template.go b/template.go index c38fddb..ed49f50 100644 --- a/template.go +++ b/template.go @@ -21,7 +21,7 @@ import ( "bytes" "fmt" "github.com/shurcooL/httpfs/vfsutil" - "github.com/snowdrop/component-operator/pkg/types" + "github.com/snowdrop/component-operator/pkg/apis/component/v1alpha1" log "github.com/sirupsen/logrus" "os" "strings" @@ -30,7 +30,7 @@ import ( var ( TemplateAssets = Assets - TemplatePath = "java" + TemplatePath = "innerloop" TemplateFiles []string Templates = make(map[string]template.Template) ) @@ -78,11 +78,15 @@ func init() { } +// Parse the file's template using the Component and the path of the template asset to use +func ParseTemplate(tmpl string, obj v1alpha1.Component) bytes.Buffer { + t := Templates[tmpl] + return Parse(t, obj) +} + // Parse the file's template using the Application struct -func ParseTemplate(tmpl string, obj types.Application) bytes.Buffer { - // Create Template and parse it +func Parse(t template.Template, obj v1alpha1.Component) bytes.Buffer { var b bytes.Buffer - t := Templates[tmpl] err := t.Execute(&b, obj) if err != nil { fmt.Println("There was an error:", err.Error()) diff --git a/innerloop/imagestream b/tmpl/innerloop/imagestream similarity index 100% rename from innerloop/imagestream rename to tmpl/innerloop/imagestream diff --git a/innerloop/route b/tmpl/innerloop/route similarity index 100% rename from innerloop/route rename to tmpl/innerloop/route diff --git a/innerloop/service b/tmpl/innerloop/service similarity index 100% rename from innerloop/service rename to tmpl/innerloop/service From 2767568d201b1c4b062ed8c088537b1cbd3af683 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 09:18:55 +0200 Subject: [PATCH 05/62] Reformat code --- template.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/template.go b/template.go index ed49f50..c6aff2a 100644 --- a/template.go +++ b/template.go @@ -21,21 +21,20 @@ import ( "bytes" "fmt" "github.com/shurcooL/httpfs/vfsutil" - "github.com/snowdrop/component-operator/pkg/apis/component/v1alpha1" log "github.com/sirupsen/logrus" + "github.com/snowdrop/component-operator/pkg/apis/component/v1alpha1" "os" "strings" "text/template" ) var ( - TemplateAssets = Assets - TemplatePath = "innerloop" - TemplateFiles []string - Templates = make(map[string]template.Template) + TemplateAssets = Assets + TemplatePath = "innerloop" + TemplateFiles []string + Templates = make(map[string]template.Template) ) - func init() { walkFn := func(path string, fi os.FileInfo, err error) error { if err != nil { @@ -77,7 +76,6 @@ func init() { } } - // Parse the file's template using the Component and the path of the template asset to use func ParseTemplate(tmpl string, obj v1alpha1.Component) bytes.Buffer { t := Templates[tmpl] @@ -85,7 +83,7 @@ func ParseTemplate(tmpl string, obj v1alpha1.Component) bytes.Buffer { } // Parse the file's template using the Application struct -func Parse(t template.Template, obj v1alpha1.Component) bytes.Buffer { +func Parse(t template.Template, obj *v1alpha1.Component) bytes.Buffer { var b bytes.Buffer err := t.Execute(&b, obj) if err != nil { From 8e74a1fac0a55ca74fc264dc2947ebc7444df9d8 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 09:43:55 +0200 Subject: [PATCH 06/62] Add status --- assets.go | 4 ++-- assets_vfsdata.go | 14 +++++++------- template.go | 2 +- tmpl/innerloop/imagestream | 8 ++++---- tmpl/innerloop/service | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/assets.go b/assets.go index 4974390..293f9d1 100644 --- a/assets.go +++ b/assets.go @@ -1,3 +1,5 @@ +// +build dev + /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -15,8 +17,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +build dev - package template import "net/http" diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 70bfb87..88611b1 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 3, 20, 10, 15, 129547844, time.UTC), + modTime: time.Date(2018, 10, 4, 7, 33, 27, 671682645, time.UTC), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 8, 14, 17, 14, 16, 0, time.UTC), - uncompressedSize: 508, + modTime: time.Date(2018, 10, 4, 7, 33, 27, 671113904, time.UTC), + uncompressedSize: 528, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\xc1\x6a\x33\x31\x0c\x84\xef\xfb\x14\x22\xf7\xc4\xfc\xff\xd1\x39\x95\xf6\xd2\x4b\x29\x0d\xf4\xae\xd8\xda\xd4\x8d\x6d\x09\xcb\x1b\x08\x26\xef\x5e\xe2\xdd\x94\xb4\xf4\x66\x3e\x69\x34\xe3\x41\x09\xef\x54\x34\x70\xb6\x10\x12\x1e\x68\xc3\x42\x59\x3f\xc2\x58\x37\x81\xcd\xe9\xdf\x70\x0c\xd9\x5b\x78\xbe\xce\x76\xb5\x10\xa6\x21\x51\x45\x8f\x15\xed\x00\x10\x71\x4f\x51\xaf\x2f\x00\x14\xb1\xd0\xda\xe6\x05\x13\x5d\x2e\x03\x40\xc6\x44\x9d\x74\xf5\x8d\xab\x90\xeb\x52\xe6\xe3\x24\xaf\x1c\x83\x3b\xcf\x07\x22\x3b\x8c\x16\x46\x8c\x4a\x03\x40\x6b\x61\x84\x45\xfb\xc4\xee\x48\xa5\xbf\xfb\xe9\x8a\x87\xee\xba\xfe\xb1\xf5\x90\x33\x57\xac\x81\xf3\x63\xf2\xda\x17\x01\xf0\x1b\x2e\x39\x01\x5c\xf2\x6a\x61\x55\xa6\xbc\xfe\xc4\x13\x5a\x33\x69\x31\xdd\xdd\xe8\xff\x60\xca\x94\xb7\x8e\x93\x84\x48\x7f\xce\x51\x95\xd2\x3e\xd2\x76\x3f\x85\xe8\xad\xf1\x24\x91\xcf\x89\x72\x55\xd3\x11\x8a\xac\xba\x55\x6b\x94\xfd\x92\x63\x2c\x9c\x6e\x01\xe6\x52\xef\x3e\xb5\xf0\x5f\x8d\xbd\x91\xf0\xa2\x0e\x49\xb8\xd4\xa5\x2d\x68\x33\x9c\xd7\x23\x56\xd2\xda\x41\xa1\x91\x0a\x65\x47\xf7\xb5\x02\xd4\xb3\x90\x85\x1d\x4f\xc5\xcd\xc5\xf6\x54\x5f\x01\x00\x00\xff\xff\xf6\xbc\xc2\x10\xfc\x01\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x6b\x23\x31\x0c\x85\xef\xf3\x2b\x44\xee\x19\xb3\x7b\x74\x4e\xcb\xee\x65\x2f\xa5\x34\xd0\xbb\x62\x6b\x52\x37\xb6\x25\x2c\x4f\x20\x98\xfc\xf7\x12\xcf\xa4\x04\x9a\x9b\xf9\x24\xbd\xf7\xfc\x50\xc2\x3b\x15\x0d\x9c\x2d\x84\x84\x47\x1a\x59\x28\xeb\x47\x98\xea\x18\xd8\x9c\x7f\x0d\xa7\x90\xbd\x85\xff\xb7\xd9\xbe\x16\xc2\x34\x24\xaa\xe8\xb1\xa2\x1d\x00\x22\x1e\x28\xea\xed\x05\x80\x22\x16\x5a\x1b\x5f\x30\xd1\xf5\x3a\x00\x64\x4c\xd4\xc9\x5e\xc8\x8d\x5d\xe2\x3e\x54\x21\xd7\xef\x99\x4f\xb3\xbc\x72\x0c\xee\xb2\xa8\x44\x76\x18\x2d\x4c\x18\x95\x06\x80\xd6\xc2\x04\x8f\x02\xff\xd8\x9d\xa8\xf4\x77\x37\xa9\x78\xec\xfe\xdb\x9f\xab\x7f\x72\xe6\x8a\x35\x70\xfe\x9b\xbc\xf6\x6d\x00\xfc\x86\x6b\x6c\x00\x97\xbc\x5a\xd8\x94\x39\x6f\x3f\xf1\x8c\xd6\xcc\x5a\x4c\xcf\x61\xf4\x77\x30\x65\xce\x3b\xc7\x49\x42\xa4\xa7\x73\x54\xa5\x74\x88\xb4\x3b\xcc\x21\x7a\x6b\x3c\x49\xe4\x4b\xa2\x5c\xd5\x74\x84\x22\x9b\x6e\xd5\x1a\x65\xbf\xe6\x98\x0a\xa7\x7b\x80\xa5\xe3\x87\x9f\xad\xfc\x59\x81\x6f\x24\xbc\x4a\x84\x24\x5c\xea\x5a\x1e\xb4\x05\x2e\x37\x11\x2b\x69\xed\xa0\xd0\x44\x85\xb2\xa3\xc7\x96\x01\xea\x45\xc8\xc2\x9e\xe7\xe2\x96\x9e\x7b\xb4\xaf\x00\x00\x00\xff\xff\x95\xe4\x27\x08\x10\x02\x00\x00"), }, "/innerloop/route": &vfsgen۰CompressedFileInfo{ name: "route", @@ -43,10 +43,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/service": &vfsgen۰CompressedFileInfo{ name: "service", - modTime: time.Date(2018, 8, 14, 17, 14, 16, 0, time.UTC), - uncompressedSize: 247, + modTime: time.Date(2018, 10, 4, 7, 33, 27, 665611911, time.UTC), + uncompressedSize: 257, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\xc1\xaa\xc2\x30\x10\x45\xf7\xf9\x8a\xf9\x81\xf7\xc0\x6d\xb6\xee\xa5\xa0\xb8\x1f\xd3\x6b\x09\x26\x99\x30\x19\x0a\x52\xfa\xef\xd2\xe0\x42\x29\xee\x86\x39\xe7\xc0\xe5\x1a\xaf\xd0\x16\xa5\x78\x9a\x0f\xee\x11\xcb\xe8\xe9\x0c\x9d\x63\x80\xcb\x30\x1e\xd9\xd8\x3b\xa2\xc2\x19\x9e\x96\xe5\xff\xc4\x19\xeb\xea\x88\x12\xdf\x90\xda\xc6\x88\xb8\xd6\x6f\xb8\x0f\x5a\x45\xd8\xe4\x2a\x6a\xbd\xfa\xeb\x67\x57\x06\x51\x7b\x67\x55\xc5\x24\x48\xf2\x74\x39\x0e\xfd\x63\xac\x13\x6c\xd8\xb9\x0d\x09\xc1\x44\x7f\x2e\x18\x51\x93\x3c\x33\x8a\x05\x29\xf7\x38\x7d\xf0\x57\x00\x00\x00\xff\xff\x73\x21\x02\x3d\xf7\x00\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\x31\x8a\xc3\x30\x10\x45\x7b\x9d\x62\x2e\xb0\x86\x6d\xd5\x6e\xbf\x18\xbc\x6c\x3f\x91\x7f\x8c\x88\xa4\x19\xa4\xc1\x10\x8c\xef\x1e\x2c\x52\x24\x24\xe9\x86\x79\xef\xc1\x67\x8d\xff\xa8\x2d\x4a\xf1\xb4\x7e\xbb\x4b\x2c\xb3\xa7\x09\x75\x8d\x01\x2e\xc3\x78\x66\x63\xef\x88\x0a\x67\x78\xda\xb6\xe1\x97\x33\xf6\xdd\x11\x25\x3e\x21\xb5\x83\x11\xb1\xea\x33\x7c\x0d\x9a\x22\x1c\xb2\x4a\xb5\x5e\x7d\xf5\xb3\x2b\x93\x22\x0c\xa3\x54\xbb\xb7\x5a\xc5\x24\x48\xf2\xf4\xf7\x33\xf6\x8f\x71\x5d\x60\xe3\xfb\xa0\x21\x21\x98\xd4\x8f\x5b\x66\x68\x92\x6b\x46\xb1\x20\xe5\x1c\x97\x07\x7e\x0b\x00\x00\xff\xff\x7c\x58\xa5\x67\x01\x01\x00\x00"), }, } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ diff --git a/template.go b/template.go index c6aff2a..296608b 100644 --- a/template.go +++ b/template.go @@ -77,7 +77,7 @@ func init() { } // Parse the file's template using the Component and the path of the template asset to use -func ParseTemplate(tmpl string, obj v1alpha1.Component) bytes.Buffer { +func ParseTemplate(tmpl string, obj *v1alpha1.Component) bytes.Buffer { t := Templates[tmpl] return Parse(t, obj) } diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index 6f672a0..67d04ab 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -3,19 +3,19 @@ kind: ImageStream metadata: labels: app: {{.Name}} - name: {{.Image.Name}} + name: {{.Spec.Image.Name}} spec: lookupPolicy: local: false - {{if .Image.DockerImage}} + {{if .Spec.Image.DockerImage}} tags: - - {{if .Image.AnnotationCmds}} + - {{if .Spec.Image.AnnotationCmds}} annotations: cmds: "run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" {{end}} from: kind: DockerImage - name: {{.Image.Repo}} + name: {{.Spec.Image.Repo}} importPolicy: {} name: latest referencePolicy: diff --git a/tmpl/innerloop/service b/tmpl/innerloop/service index 6f3e6ed..0afe00f 100644 --- a/tmpl/innerloop/service +++ b/tmpl/innerloop/service @@ -7,9 +7,9 @@ metadata: name: {{.Name}} spec: ports: - - port: {{.Port}} + - port: {{.Spec.Port}} protocol: TCP - targetPort: {{.Port}} + targetPort: {{.Spec.Port}} selector: app: {{.Name}} deploymentconfig: {{.Name}} \ No newline at end of file From 62f2dbd2bd3b9dd4f36f39ed4d9735253d9208f2 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 11:23:26 +0200 Subject: [PATCH 07/62] Add pvc --- assets_vfsdata.go | 10 +++++++++- tmpl/innerloop/pvc | 13 +++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tmpl/innerloop/pvc diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 88611b1..8e2c9e4 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 4, 7, 33, 27, 671682645, time.UTC), + modTime: time.Date(2018, 10, 4, 9, 16, 23, 850554436, time.UTC), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", @@ -34,6 +34,13 @@ var Assets = func() http.FileSystem { compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x6b\x23\x31\x0c\x85\xef\xf3\x2b\x44\xee\x19\xb3\x7b\x74\x4e\xcb\xee\x65\x2f\xa5\x34\xd0\xbb\x62\x6b\x52\x37\xb6\x25\x2c\x4f\x20\x98\xfc\xf7\x12\xcf\xa4\x04\x9a\x9b\xf9\x24\xbd\xf7\xfc\x50\xc2\x3b\x15\x0d\x9c\x2d\x84\x84\x47\x1a\x59\x28\xeb\x47\x98\xea\x18\xd8\x9c\x7f\x0d\xa7\x90\xbd\x85\xff\xb7\xd9\xbe\x16\xc2\x34\x24\xaa\xe8\xb1\xa2\x1d\x00\x22\x1e\x28\xea\xed\x05\x80\x22\x16\x5a\x1b\x5f\x30\xd1\xf5\x3a\x00\x64\x4c\xd4\xc9\x5e\xc8\x8d\x5d\xe2\x3e\x54\x21\xd7\xef\x99\x4f\xb3\xbc\x72\x0c\xee\xb2\xa8\x44\x76\x18\x2d\x4c\x18\x95\x06\x80\xd6\xc2\x04\x8f\x02\xff\xd8\x9d\xa8\xf4\x77\x37\xa9\x78\xec\xfe\xdb\x9f\xab\x7f\x72\xe6\x8a\x35\x70\xfe\x9b\xbc\xf6\x6d\x00\xfc\x86\x6b\x6c\x00\x97\xbc\x5a\xd8\x94\x39\x6f\x3f\xf1\x8c\xd6\xcc\x5a\x4c\xcf\x61\xf4\x77\x30\x65\xce\x3b\xc7\x49\x42\xa4\xa7\x73\x54\xa5\x74\x88\xb4\x3b\xcc\x21\x7a\x6b\x3c\x49\xe4\x4b\xa2\x5c\xd5\x74\x84\x22\x9b\x6e\xd5\x1a\x65\xbf\xe6\x98\x0a\xa7\x7b\x80\xa5\xe3\x87\x9f\xad\xfc\x59\x81\x6f\x24\xbc\x4a\x84\x24\x5c\xea\x5a\x1e\xb4\x05\x2e\x37\x11\x2b\x69\xed\xa0\xd0\x44\x85\xb2\xa3\xc7\x96\x01\xea\x45\xc8\xc2\x9e\xe7\xe2\x96\x9e\x7b\xb4\xaf\x00\x00\x00\xff\xff\x95\xe4\x27\x08\x10\x02\x00\x00"), }, + "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ + name: "pvc", + modTime: time.Date(2018, 10, 4, 9, 16, 23, 850123135, time.UTC), + uncompressedSize: 250, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8e\xbd\x8a\xc3\x30\x10\x84\x7b\x3d\xc5\xbe\xc0\x19\xae\x55\xeb\xfa\x8e\x03\x83\xfb\x3d\x79\x08\x22\xfa\x8b\x76\x1d\x08\x46\xef\x1e\xe4\x98\x10\x70\xb9\x33\xdf\xec\x0c\x17\x3f\xa3\x8a\xcf\xc9\xd2\xfd\xdb\x5c\x7d\x5a\x2c\xfd\x75\x45\x14\x49\xe7\x1c\xd6\x88\x31\xb0\x8f\x26\x42\x79\x61\x65\x6b\x88\x12\x47\x58\xda\xb6\x61\x2a\x70\xc3\xa4\xb9\xf2\x05\xc3\x2f\x47\xb4\x66\x88\x02\xff\x23\x48\x07\x89\xb8\x94\x9d\x7c\x9b\x1f\xe9\x43\x93\x02\xd7\x61\x76\x0e\x22\x3f\x79\xc1\x9e\xfd\x3a\x15\x74\x6b\xff\x51\x21\x79\xad\x0e\x47\x47\xc5\x6d\x85\xe8\x71\x11\xc9\x8b\x3f\x2f\x1c\xb9\xb0\xf3\xfa\x68\xcd\x3c\x03\x00\x00\xff\xff\x76\xbd\xed\x76\xfa\x00\x00\x00"), + }, "/innerloop/route": &vfsgen۰CompressedFileInfo{ name: "route", modTime: time.Date(2018, 8, 14, 17, 14, 16, 0, time.UTC), @@ -54,6 +61,7 @@ var Assets = func() http.FileSystem { } fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/innerloop/imagestream"].(os.FileInfo), + fs["/innerloop/pvc"].(os.FileInfo), fs["/innerloop/route"].(os.FileInfo), fs["/innerloop/service"].(os.FileInfo), } diff --git a/tmpl/innerloop/pvc b/tmpl/innerloop/pvc new file mode 100644 index 0000000..ca5286f --- /dev/null +++ b/tmpl/innerloop/pvc @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{.Spec.Storage.Name}} + labels: + app: {{.Name}} + name: {{.Name}} +spec: + accessModes: + - {{.Spec.Storage.Mode}} + resources: + requests: + storage: {{.Spec.Storage.Capacity}} From 613916deb1f0626a51845d0a2dc9efc5b4b1aabc Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 12:36:20 +0200 Subject: [PATCH 08/62] Fix issue with dc template --- assets_vfsdata.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 8e2c9e4..caeb451 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 4, 9, 16, 23, 850554436, time.UTC), + modTime: time.Date(2018, 10, 4, 10, 33, 38, 502620971, time.UTC), + }, + "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ + name: "deploymentconfig", + modTime: time.Date(2018, 10, 4, 10, 33, 38, 501015106, time.UTC), + uncompressedSize: 2080, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xe3\x46\x0c\xbd\xfb\x57\x10\xb9\xcb\xda\x0d\xb0\x97\xc9\xc9\xb5\xdb\x22\x01\x92\x0a\x71\x9a\x6b\x40\x8f\x68\x99\xe9\x7c\x61\x66\xa4\xc2\x08\xf2\xdf\x8b\xb1\x1c\x79\x6c\xcb\x09\x5a\xa0\x3b\x27\x93\xf4\x23\x1f\xf9\x08\x0a\x1d\x3f\x93\x0f\x6c\x8d\x00\x74\x2e\x4c\xad\x23\x13\x36\xbc\x8e\x53\xb6\x65\xf7\x7d\xf2\x17\x9b\x5a\xc0\x82\x9c\xb2\x5b\x4d\x26\xce\xad\x59\x73\x33\xd1\x14\xb1\xc6\x88\x62\x02\xa0\x70\x45\x2a\xa4\x5f\x90\x72\x08\x78\x7b\x9b\x3e\xa0\xa6\xf7\xf7\x09\x80\x41\x4d\xb9\x27\x38\x92\xe9\xaf\x9e\x9c\x62\x89\x41\xc0\xf7\x09\x40\x20\x45\x32\x5a\x7f\x21\x09\x40\x3d\x10\x90\x3b\x02\xc7\xf1\x10\x3d\x46\x6a\xb6\x3d\x3c\x6e\x1d\x09\x78\xb4\x4a\xb1\x69\x26\x00\x91\xb4\x53\x18\xa9\x8f\xe6\xcc\xd3\xcb\xd9\x5f\x28\xfe\x35\x81\xf4\x4e\x3b\x4d\xbe\x8f\x6e\xd3\x93\xd6\x44\x64\x43\x7e\x28\x56\x00\xfa\x26\x2b\x5d\x40\x21\x33\xa3\xec\xd0\x97\x8a\x57\x65\x68\x1d\xf9\x8e\x83\xf5\x75\x99\xaa\x67\x8e\x69\xb2\x07\x8c\xb4\x5a\xa3\xa9\xc5\x57\x49\x56\x6c\x72\x7b\xf8\x3b\x99\x2e\xc7\xf6\x1d\xdd\xcd\x9e\x67\x2f\xb3\xaa\x7a\x59\xdc\x3e\x0e\x41\x80\x0e\x55\x4b\x02\xca\xc3\x60\xc2\x38\x74\xf1\xeb\x2f\x7f\xfe\x7e\x0e\xbc\x8a\xbe\xa5\xab\x4f\x20\x2f\xd5\x1f\x8f\x4f\x23\xb8\x1f\xdf\xbe\xfd\xb8\x80\x4b\x2c\xef\x66\x23\x2c\xd1\xb9\xe9\x2b\xfa\x21\xc0\x1a\x9b\x94\xab\xa6\xae\x08\xd7\x2c\xd2\x7a\x84\x78\x75\x1c\xaf\x5a\xa5\x2a\xab\x58\x6e\x05\xcc\xd4\xdf\xb8\x3d\x34\x38\xa6\x75\x7a\xce\xfa\x78\x24\xe8\x20\x7a\x65\x7d\xdc\x21\x96\x8e\xe4\x34\x59\x19\x0c\xc0\x79\x1b\xad\xb4\x4a\xc0\xd3\xbc\x1a\xfc\x9d\x55\xad\xa6\x7b\xdb\x9a\xe3\xac\x3a\x79\x2a\x8c\x1b\x31\xaa\x6f\x96\xb7\x27\x1a\x36\xe8\xa9\x2e\xd2\xda\x5f\xc8\x12\xb5\x2b\xd1\x47\x5e\xa3\xcc\x74\xfc\xc0\xeb\xeb\x1c\xcb\x86\xd3\x19\x38\x5b\xe6\xd1\xed\x99\xdf\x2f\x96\xe7\x7a\xf8\xd6\x14\xaf\xd8\xa1\x28\xdb\xe0\x4b\x65\x25\xaa\x32\x5c\x73\xe9\x5b\x73\x23\xad\x76\xac\x68\x34\x8e\x21\x90\x5e\x29\xba\x59\xb5\xac\x6a\x91\x2f\x5f\xb9\x73\xa1\x73\x67\x22\x7f\x0c\x7d\x79\x98\x50\x2f\xdb\x7f\x94\x5d\x5a\xb7\x2d\xc6\xc6\xed\x29\xd8\xd6\x4b\x0a\x02\xde\x0e\xe2\x46\xf2\x9a\x0d\x46\xb6\xe6\x9e\x42\x48\x15\xfa\x99\xd7\xd4\x95\x59\xb0\x50\xb6\xf9\x0c\xb4\xa7\xf4\x1b\x2b\xfa\x09\x0b\xd2\x67\xce\xd5\xd5\x2e\x6e\x17\xec\x8f\x7a\xbb\x84\x2e\x46\x17\x07\xc0\xa5\x6f\x4d\x88\x64\xe2\xf3\x2e\xff\x5c\x21\x6b\x91\xd1\x91\xc9\xf1\x70\x82\x8d\x9e\x9b\x66\xbf\x6a\xc5\xfe\xbc\xdf\x26\xa9\xe6\x1b\x34\x4d\x3f\x0d\x3e\xd8\x15\x7a\xd4\x03\x73\x6c\xa3\xd5\x18\x59\x0a\x48\x17\xe7\xf4\x18\xa7\x5a\x59\x97\x17\xb4\x5d\x7b\x9b\xd1\xec\xbf\x89\x3b\x06\xcb\xe8\x09\xf5\x13\x36\x5f\xec\xc8\x7e\xd5\xfe\xff\x06\x4e\x6f\xd2\xbf\x66\x7e\x7c\x12\xff\x09\x00\x00\xff\xff\xac\x2a\x5b\x5a\x20\x08\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", @@ -60,6 +67,7 @@ var Assets = func() http.FileSystem { fs["/innerloop"].(os.FileInfo), } fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/innerloop/deploymentconfig"].(os.FileInfo), fs["/innerloop/imagestream"].(os.FileInfo), fs["/innerloop/pvc"].(os.FileInfo), fs["/innerloop/route"].(os.FileInfo), From 2ebd543df7b4ef52378973e3c183d5b25914a7b5 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 12:36:58 +0200 Subject: [PATCH 09/62] Add dc template --- tmpl/innerloop/deploymentconfig | 82 +++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 tmpl/innerloop/deploymentconfig diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig new file mode 100644 index 0000000..3ea7772 --- /dev/null +++ b/tmpl/innerloop/deploymentconfig @@ -0,0 +1,82 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + labels: + app: {{.Name}} + name: {{.Name}} +spec: + replicas: 1 + selector: + app: {{.Name}} + deploymentconfig: {{.Name}} + strategy: + type: Rolling + template: + metadata: + labels: + app: {{.Name}} + deploymentconfig: {{.Name}} + name: {{.Name}} + spec: + containers: + - args: + - -c + - /var/lib/supervisord/conf/supervisor.conf + command: + - /var/lib/supervisord/bin/supervisord + env: + - name: JAVA_APP_DIR + value: /deployments + - name: JAVA_DEBUG + value: "true" + - name: JAVA_DEBUG_PORT + value: "5005" + - name: JAVA_APP_JAR + value: app.jar + image: "dev-s2i:latest" + imagePullPolicy: Always + name: {{.Name}} + ports: + - containerPort: {{.Spec.Port}} + protocol: TCP + volumeMounts: + - mountPath: /var/lib/supervisord + name: shared-data + - mountPath: /tmp/artifacts + name: m2-data + initContainers: + - env: + - name: CMDS + value: run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp + image: "{{.Spec.SupervisordName}}:latest" + imagePullPolicy: Always + name: copy-supervisord + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /var/lib/supervisord + name: shared-data + volumes: + - emptyDir: {} + name: shared-data + - name: m2-data + persistentVolumeClaim: + claimName: m2-data + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - copy-supervisord + from: + kind: ImageStreamTag + name: copy-supervisord:latest + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - {{.Name}} + from: + kind: ImageStreamTag + name: dev-s2i:latest \ No newline at end of file From 2a6a1e28ab2383c2b5b0279fea2252bb8976055f Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 13:22:54 +0200 Subject: [PATCH 10/62] Use rnage for the images --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/imagestream | 15 +++++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index caeb451..eeed615 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 4, 10, 33, 38, 502620971, time.UTC), + modTime: time.Date(2018, 10, 4, 11, 22, 2, 474466146, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", @@ -36,10 +36,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 10, 4, 7, 33, 27, 671113904, time.UTC), - uncompressedSize: 528, + modTime: time.Date(2018, 10, 4, 11, 22, 2, 473242068, time.UTC), + uncompressedSize: 542, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x6b\x23\x31\x0c\x85\xef\xf3\x2b\x44\xee\x19\xb3\x7b\x74\x4e\xcb\xee\x65\x2f\xa5\x34\xd0\xbb\x62\x6b\x52\x37\xb6\x25\x2c\x4f\x20\x98\xfc\xf7\x12\xcf\xa4\x04\x9a\x9b\xf9\x24\xbd\xf7\xfc\x50\xc2\x3b\x15\x0d\x9c\x2d\x84\x84\x47\x1a\x59\x28\xeb\x47\x98\xea\x18\xd8\x9c\x7f\x0d\xa7\x90\xbd\x85\xff\xb7\xd9\xbe\x16\xc2\x34\x24\xaa\xe8\xb1\xa2\x1d\x00\x22\x1e\x28\xea\xed\x05\x80\x22\x16\x5a\x1b\x5f\x30\xd1\xf5\x3a\x00\x64\x4c\xd4\xc9\x5e\xc8\x8d\x5d\xe2\x3e\x54\x21\xd7\xef\x99\x4f\xb3\xbc\x72\x0c\xee\xb2\xa8\x44\x76\x18\x2d\x4c\x18\x95\x06\x80\xd6\xc2\x04\x8f\x02\xff\xd8\x9d\xa8\xf4\x77\x37\xa9\x78\xec\xfe\xdb\x9f\xab\x7f\x72\xe6\x8a\x35\x70\xfe\x9b\xbc\xf6\x6d\x00\xfc\x86\x6b\x6c\x00\x97\xbc\x5a\xd8\x94\x39\x6f\x3f\xf1\x8c\xd6\xcc\x5a\x4c\xcf\x61\xf4\x77\x30\x65\xce\x3b\xc7\x49\x42\xa4\xa7\x73\x54\xa5\x74\x88\xb4\x3b\xcc\x21\x7a\x6b\x3c\x49\xe4\x4b\xa2\x5c\xd5\x74\x84\x22\x9b\x6e\xd5\x1a\x65\xbf\xe6\x98\x0a\xa7\x7b\x80\xa5\xe3\x87\x9f\xad\xfc\x59\x81\x6f\x24\xbc\x4a\x84\x24\x5c\xea\x5a\x1e\xb4\x05\x2e\x37\x11\x2b\x69\xed\xa0\xd0\x44\x85\xb2\xa3\xc7\x96\x01\xea\x45\xc8\xc2\x9e\xe7\xe2\x96\x9e\x7b\xb4\xaf\x00\x00\x00\xff\xff\x95\xe4\x27\x08\x10\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\xb1\x6e\xf3\x30\x0c\x84\x77\x3f\x05\x11\xfc\x6b\x6c\xfc\x1d\x15\x74\x08\xda\xa5\x4b\x51\x34\x40\x77\x46\xa2\x53\x35\x92\x48\x48\x72\x80\x40\xf0\xbb\x17\x96\xd5\x34\x43\x27\x13\x1f\x79\xbe\xd3\x95\xf2\x2f\xa0\xa7\xbd\x08\xa8\x47\xe8\x5f\xd1\x13\xcc\x73\x57\x0a\x44\x0c\x27\x82\xfe\x20\xa4\xfb\x17\x8f\xa7\xca\x51\xec\x07\xc5\x64\x39\x28\xb0\x0b\xec\x59\x28\xa4\x4f\x3b\xe6\xde\xf2\x70\xf9\xdf\x9d\x6d\x30\x0a\xaa\xe0\x90\x23\xa1\xef\x3c\x65\x34\x98\x51\x75\x00\x0e\x8f\xe4\xd2\x32\x01\xa0\x88\x82\x5f\xff\x79\xee\x00\x96\x79\x81\x35\xc8\x3c\x77\x49\x48\x57\x1d\xf3\x79\x92\x37\x76\x56\x5f\x57\xb5\x63\x8d\x4e\xc1\x88\x2e\x51\x07\x50\x8a\x1d\xa1\x7f\x66\x7d\xa6\x58\xcd\xeb\xef\x32\x9e\xaa\xd9\xb6\xed\xf7\x21\x70\xc6\x6c\x39\x3c\x79\x93\xea\x09\x00\xde\x60\x0b\x06\xa0\xbd\x49\x0a\x36\x71\x0a\xdb\x2f\xbc\xa0\x1a\xa6\x14\x87\xea\x38\xa4\x07\x3b\xc4\x29\xec\x34\x7b\xb1\x8e\xfe\xdc\x63\x4a\xe4\x8f\x8e\x76\xc7\xc9\x3a\xa3\x06\x43\xe2\xf8\xea\x29\xe4\x34\x54\x84\x22\x9b\x6a\x55\x0a\x05\xd3\x72\x8c\x91\xfd\x4f\x80\xb5\xc5\xbb\xe7\x34\x7e\xeb\xe7\x9d\x84\x9b\xce\x7a\xe1\x98\x5b\x37\x50\x56\xb8\x1e\x3a\xcc\x94\x72\x05\x91\x46\x8a\x14\x34\xdd\x97\x08\x90\xaf\x42\x0a\x0e\x3c\x45\xbd\xd6\xb8\xe6\x69\xdf\xef\x00\x00\x00\xff\xff\x43\x98\x2a\xa6\x1e\x02\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index 67d04ab..d32a734 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -1,23 +1,26 @@ +{{$nameApp := .Name }} +{{ range .Spec.Image }} apiVersion: image.openshift.io/v1 kind: ImageStream metadata: labels: - app: {{.Name}} - name: {{.Spec.Image.Name}} + app: {{$nameApp}} + name: {{.Name}} spec: lookupPolicy: local: false - {{if .Spec.Image.DockerImage}} + {{if .DockerImage}} tags: - - {{if .Spec.Image.AnnotationCmds}} + - {{if .AnnotationCmds}} annotations: cmds: "run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" {{end}} from: kind: DockerImage - name: {{.Spec.Image.Repo}} + name: {{.Repo}} importPolicy: {} name: latest referencePolicy: type: Source - {{end}} \ No newline at end of file + {{end}} +{{end}} \ No newline at end of file From e59b6540b3de2fe7e79a0ccec48bd7edf6b9455d Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 14:40:09 +0200 Subject: [PATCH 11/62] Use a list --- assets_vfsdata.go | 8 +++--- tmpl/innerloop/imagestream | 50 ++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index eeed615..5c388a8 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 4, 11, 22, 2, 474466146, time.UTC), + modTime: time.Date(2018, 10, 4, 12, 39, 35, 98225518, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", @@ -36,10 +36,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 10, 4, 11, 22, 2, 473242068, time.UTC), - uncompressedSize: 542, + modTime: time.Date(2018, 10, 4, 12, 39, 35, 97690399, time.UTC), + uncompressedSize: 622, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\xb1\x6e\xf3\x30\x0c\x84\x77\x3f\x05\x11\xfc\x6b\x6c\xfc\x1d\x15\x74\x08\xda\xa5\x4b\x51\x34\x40\x77\x46\xa2\x53\x35\x92\x48\x48\x72\x80\x40\xf0\xbb\x17\x96\xd5\x34\x43\x27\x13\x1f\x79\xbe\xd3\x95\xf2\x2f\xa0\xa7\xbd\x08\xa8\x47\xe8\x5f\xd1\x13\xcc\x73\x57\x0a\x44\x0c\x27\x82\xfe\x20\xa4\xfb\x17\x8f\xa7\xca\x51\xec\x07\xc5\x64\x39\x28\xb0\x0b\xec\x59\x28\xa4\x4f\x3b\xe6\xde\xf2\x70\xf9\xdf\x9d\x6d\x30\x0a\xaa\xe0\x90\x23\xa1\xef\x3c\x65\x34\x98\x51\x75\x00\x0e\x8f\xe4\xd2\x32\x01\xa0\x88\x82\x5f\xff\x79\xee\x00\x96\x79\x81\x35\xc8\x3c\x77\x49\x48\x57\x1d\xf3\x79\x92\x37\x76\x56\x5f\x57\xb5\x63\x8d\x4e\xc1\x88\x2e\x51\x07\x50\x8a\x1d\xa1\x7f\x66\x7d\xa6\x58\xcd\xeb\xef\x32\x9e\xaa\xd9\xb6\xed\xf7\x21\x70\xc6\x6c\x39\x3c\x79\x93\xea\x09\x00\xde\x60\x0b\x06\xa0\xbd\x49\x0a\x36\x71\x0a\xdb\x2f\xbc\xa0\x1a\xa6\x14\x87\xea\x38\xa4\x07\x3b\xc4\x29\xec\x34\x7b\xb1\x8e\xfe\xdc\x63\x4a\xe4\x8f\x8e\x76\xc7\xc9\x3a\xa3\x06\x43\xe2\xf8\xea\x29\xe4\x34\x54\x84\x22\x9b\x6a\x55\x0a\x05\xd3\x72\x8c\x91\xfd\x4f\x80\xb5\xc5\xbb\xe7\x34\x7e\xeb\xe7\x9d\x84\x9b\xce\x7a\xe1\x98\x5b\x37\x50\x56\xb8\x1e\x3a\xcc\x94\x72\x05\x91\x46\x8a\x14\x34\xdd\x97\x08\x90\xaf\x42\x0a\x0e\x3c\x45\xbd\xd6\xb8\xe6\x69\xdf\xef\x00\x00\x00\xff\xff\x43\x98\x2a\xa6\x1e\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\xc1\xab\xdb\x30\x0c\xc6\xef\xf9\x2b\x44\xd9\xb5\x09\xdd\xd1\x65\x87\xb2\x5d\x06\x63\x8c\x15\x76\x57\x1d\xa5\xf3\xab\x6d\x09\xdb\x29\x14\x93\xff\xfd\x11\xc7\x49\xfb\xe0\xdd\xe4\x9f\xf4\x49\x9f\xbf\x9c\xbf\x78\x74\x74\x12\x01\xf5\x0d\xda\xdf\xe8\x08\xa6\xa9\x41\x31\xff\x28\x44\xc3\x5e\xc1\xfd\xd0\xdc\x8c\xef\x15\xfc\x32\x31\x35\x26\x91\x8b\xaa\xd9\x43\xce\x10\xd0\x5f\x09\xda\xb3\x90\x6e\x7f\x3a\xbc\xce\xd2\x57\xa5\x99\x59\xcb\x42\x3e\xfe\x37\x43\x6a\x0d\x77\xf7\x43\x03\xb0\xac\x2b\x8a\x73\x0a\x84\xae\x01\x70\x94\xb0\xc7\x84\xaa\x01\x00\xb0\x78\x21\x1b\x97\x1a\x00\x45\x14\x3c\x9d\x4e\x53\xe1\xf3\x6b\xc6\xc5\x74\x61\x51\x48\x57\x3d\xf3\x6d\x94\x3f\x6c\x8d\x7e\xac\x5b\x2c\x6b\xb4\x0a\x06\xb4\x91\x0a\xca\xd9\x0c\xd0\xfe\x60\x7d\xa3\x50\xcc\xd4\xc5\x09\xaf\xf5\xf4\xbe\xce\x9c\xbc\xe7\x84\xc9\xb0\xff\xee\xfa\x58\xc7\x00\x70\xc3\x9b\x55\x00\xed\xfa\xa8\x60\x17\x46\xbf\x7f\xc3\x3b\xaa\x6e\x8c\xa1\x2b\xb7\xbb\xf8\xd5\x74\x61\xf4\x47\xcd\x4e\x8c\xa5\x4f\xfb\x18\x23\xb9\x8b\xa5\xe3\x65\x34\xb6\x57\x5d\x4f\x62\xf9\xe1\xc8\xa7\xd8\x15\x84\x22\xbb\x7a\x2c\x67\xf2\xfd\xe6\x66\x08\xec\x9e\x36\x96\x8c\x5f\x3e\xb7\x75\xb6\xdc\xfe\x92\xf0\xa6\x36\x4e\x38\xa4\x9a\x18\xe4\x15\x2f\xc3\x16\x13\xc5\x54\x51\xa0\x81\x02\x79\x4d\x1f\xe3\x05\x48\x0f\x21\x05\x67\x1e\x83\x5e\x03\x5e\xfd\xd5\xea\x3d\x00\x00\xff\xff\x5e\xd8\xc6\x63\x6e\x02\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index d32a734..88b10a1 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -1,26 +1,28 @@ {{$nameApp := .Name }} -{{ range .Spec.Image }} -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - labels: - app: {{$nameApp}} - name: {{.Name}} -spec: - lookupPolicy: - local: false - {{if .DockerImage}} - tags: - - {{if .AnnotationCmds}} - annotations: - cmds: "run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" +apiVersion: v1 +kind: List +items: +- {{ range .Spec.Image }}apiVersion: image.openshift.io/v1 + kind: ImageStream + metadata: + labels: + app: {{$nameApp}} + name: {{.Name}} + spec: + lookupPolicy: + local: false + {{if .DockerImage}} + tags: + - {{if .AnnotationCmds}} + annotations: + cmds: "run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" + {{end}} + from: + kind: DockerImage + name: {{.Repo}} + importPolicy: {} + name: latest + referencePolicy: + type: Source {{end}} - from: - kind: DockerImage - name: {{.Repo}} - importPolicy: {} - name: latest - referencePolicy: - type: Source - {{end}} -{{end}} \ No newline at end of file + {{end}} \ No newline at end of file From fcb02c28ac3f9d013b9655625f2cce61dc9b4a3b Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 14:53:54 +0200 Subject: [PATCH 12/62] Fix list template issue --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/imagestream | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 5c388a8..a2bb13b 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 4, 12, 39, 35, 98225518, time.UTC), + modTime: time.Date(2018, 10, 4, 12, 51, 50, 688451296, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", @@ -36,10 +36,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 10, 4, 12, 39, 35, 97690399, time.UTC), - uncompressedSize: 622, + modTime: time.Date(2018, 10, 4, 12, 51, 50, 687207413, time.UTC), + uncompressedSize: 619, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\xc1\xab\xdb\x30\x0c\xc6\xef\xf9\x2b\x44\xd9\xb5\x09\xdd\xd1\x65\x87\xb2\x5d\x06\x63\x8c\x15\x76\x57\x1d\xa5\xf3\xab\x6d\x09\xdb\x29\x14\x93\xff\xfd\x11\xc7\x49\xfb\xe0\xdd\xe4\x9f\xf4\x49\x9f\xbf\x9c\xbf\x78\x74\x74\x12\x01\xf5\x0d\xda\xdf\xe8\x08\xa6\xa9\x41\x31\xff\x28\x44\xc3\x5e\xc1\xfd\xd0\xdc\x8c\xef\x15\xfc\x32\x31\x35\x26\x91\x8b\xaa\xd9\x43\xce\x10\xd0\x5f\x09\xda\xb3\x90\x6e\x7f\x3a\xbc\xce\xd2\x57\xa5\x99\x59\xcb\x42\x3e\xfe\x37\x43\x6a\x0d\x77\xf7\x43\x03\xb0\xac\x2b\x8a\x73\x0a\x84\xae\x01\x70\x94\xb0\xc7\x84\xaa\x01\x00\xb0\x78\x21\x1b\x97\x1a\x00\x45\x14\x3c\x9d\x4e\x53\xe1\xf3\x6b\xc6\xc5\x74\x61\x51\x48\x57\x3d\xf3\x6d\x94\x3f\x6c\x8d\x7e\xac\x5b\x2c\x6b\xb4\x0a\x06\xb4\x91\x0a\xca\xd9\x0c\xd0\xfe\x60\x7d\xa3\x50\xcc\xd4\xc5\x09\xaf\xf5\xf4\xbe\xce\x9c\xbc\xe7\x84\xc9\xb0\xff\xee\xfa\x58\xc7\x00\x70\xc3\x9b\x55\x00\xed\xfa\xa8\x60\x17\x46\xbf\x7f\xc3\x3b\xaa\x6e\x8c\xa1\x2b\xb7\xbb\xf8\xd5\x74\x61\xf4\x47\xcd\x4e\x8c\xa5\x4f\xfb\x18\x23\xb9\x8b\xa5\xe3\x65\x34\xb6\x57\x5d\x4f\x62\xf9\xe1\xc8\xa7\xd8\x15\x84\x22\xbb\x7a\x2c\x67\xf2\xfd\xe6\x66\x08\xec\x9e\x36\x96\x8c\x5f\x3e\xb7\x75\xb6\xdc\xfe\x92\xf0\xa6\x36\x4e\x38\xa4\x9a\x18\xe4\x15\x2f\xc3\x16\x13\xc5\x54\x51\xa0\x81\x02\x79\x4d\x1f\xe3\x05\x48\x0f\x21\x05\x67\x1e\x83\x5e\x03\x5e\xfd\xd5\xea\x3d\x00\x00\xff\xff\x5e\xd8\xc6\x63\x6e\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x8b\xe3\x30\x0c\x85\xef\xf9\x15\xa2\xec\xb5\x09\xdd\xa3\xcb\x1e\xca\xee\x65\x61\x59\x86\x29\xcc\x5d\x75\x94\x8e\xa7\xb6\x25\x6c\xa7\x50\x4c\xfe\xfb\x10\xc7\x4d\x3b\x30\x27\xdb\x9f\xf4\xa4\xe7\x97\xf3\x0f\x8f\x8e\x0e\x22\xa0\x7e\x41\xfb\x1f\x1d\xc1\x34\xa1\x98\x37\x0a\xd1\xb0\x57\x70\xdd\x35\x17\xe3\x7b\x05\xff\x4c\x4c\x8d\x49\xe4\xa2\x6a\x72\x86\x80\xfe\x4c\xd0\x1e\x85\x74\xfb\xd7\xe1\x79\xd6\x35\x5b\x78\x96\x9a\x19\xb7\x2c\xe4\xe3\xbb\x19\x52\x6b\xb8\xbb\xee\x1a\x80\x65\x5e\x11\x1d\x53\x20\x74\x0d\x80\xa3\x84\x3d\x26\x54\x0d\x00\x80\xc5\x13\xd9\xb8\xdc\x01\x50\x44\xc1\xc3\xe9\x34\x15\x3e\xbf\x66\x5c\x4c\x17\x16\x85\x74\xd5\x33\x5f\x46\x79\x61\x6b\xf4\xed\x3e\xc5\xb2\x46\xab\x60\x40\x1b\xa9\xa0\x9c\xcd\x00\xed\x1f\xd6\x17\x0a\xc5\x4c\x1d\x9c\xf0\x5c\x57\x6f\x6b\xcf\xc1\x7b\x4e\x98\x0c\xfb\xdf\xae\x8f\xb5\x0d\x00\x57\xbc\x5a\x05\xd0\xae\x8f\x0a\x36\x61\xf4\xdb\x0f\xbc\xa2\xea\xc6\x18\xba\xb2\xbb\x8b\x3f\x4d\x17\x46\xbf\xd7\xec\xc4\x58\xfa\xb6\x8e\x31\x92\x3b\x59\xda\x9f\x46\x63\x7b\xd5\xf5\x24\x96\x6f\x8e\x7c\x8a\x5d\x41\x28\xb2\xa9\xcb\x72\x26\xdf\xaf\x6e\x86\xc0\xee\x61\x63\xc9\xf8\xe9\x73\x6b\x65\xcd\xed\x95\x84\x57\xb5\x71\xc2\x21\xd5\xc4\x20\xdf\xf1\xd2\x6c\x31\x51\x4c\x15\x05\x1a\x28\x90\xd7\xf4\x35\x5e\x80\x74\x13\x52\x70\xe4\x31\xe8\x7b\xc0\xc5\x5f\x3d\x3e\x03\x00\x00\xff\xff\x34\x69\x5c\xfa\x6b\x02\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index 88b10a1..57297fb 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -1,8 +1,8 @@ -{{$nameApp := .Name }} -apiVersion: v1 +{{$nameApp := .Name }}apiVersion: v1 kind: List items: -- {{ range .Spec.Image }}apiVersion: image.openshift.io/v1 +{{ range .Spec.Image }} +- apiVersion: image.openshift.io/v1 kind: ImageStream metadata: labels: @@ -24,5 +24,4 @@ items: name: latest referencePolicy: type: Source - {{end}} - {{end}} \ No newline at end of file + {{end}}{{end}} \ No newline at end of file From 711cb6d7233691d5ff37f0ad1129a0b133df6d7e Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 4 Oct 2018 18:26:07 +0200 Subject: [PATCH 13/62] Add list --- assets_vfsdata.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index a2bb13b..798f4da 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 4, 12, 51, 50, 688451296, time.UTC), + modTime: time.Date(2018, 10, 4, 14, 32, 14, 410087417, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", @@ -36,10 +36,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 10, 4, 12, 51, 50, 687207413, time.UTC), - uncompressedSize: 619, + modTime: time.Date(2018, 10, 4, 14, 32, 14, 408825608, time.UTC), + uncompressedSize: 679, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x8b\xe3\x30\x0c\x85\xef\xf9\x15\xa2\xec\xb5\x09\xdd\xa3\xcb\x1e\xca\xee\x65\x61\x59\x86\x29\xcc\x5d\x75\x94\x8e\xa7\xb6\x25\x6c\xa7\x50\x4c\xfe\xfb\x10\xc7\x4d\x3b\x30\x27\xdb\x9f\xf4\xa4\xe7\x97\xf3\x0f\x8f\x8e\x0e\x22\xa0\x7e\x41\xfb\x1f\x1d\xc1\x34\xa1\x98\x37\x0a\xd1\xb0\x57\x70\xdd\x35\x17\xe3\x7b\x05\xff\x4c\x4c\x8d\x49\xe4\xa2\x6a\x72\x86\x80\xfe\x4c\xd0\x1e\x85\x74\xfb\xd7\xe1\x79\xd6\x35\x5b\x78\x96\x9a\x19\xb7\x2c\xe4\xe3\xbb\x19\x52\x6b\xb8\xbb\xee\x1a\x80\x65\x5e\x11\x1d\x53\x20\x74\x0d\x80\xa3\x84\x3d\x26\x54\x0d\x00\x80\xc5\x13\xd9\xb8\xdc\x01\x50\x44\xc1\xc3\xe9\x34\x15\x3e\xbf\x66\x5c\x4c\x17\x16\x85\x74\xd5\x33\x5f\x46\x79\x61\x6b\xf4\xed\x3e\xc5\xb2\x46\xab\x60\x40\x1b\xa9\xa0\x9c\xcd\x00\xed\x1f\xd6\x17\x0a\xc5\x4c\x1d\x9c\xf0\x5c\x57\x6f\x6b\xcf\xc1\x7b\x4e\x98\x0c\xfb\xdf\xae\x8f\xb5\x0d\x00\x57\xbc\x5a\x05\xd0\xae\x8f\x0a\x36\x61\xf4\xdb\x0f\xbc\xa2\xea\xc6\x18\xba\xb2\xbb\x8b\x3f\x4d\x17\x46\xbf\xd7\xec\xc4\x58\xfa\xb6\x8e\x31\x92\x3b\x59\xda\x9f\x46\x63\x7b\xd5\xf5\x24\x96\x6f\x8e\x7c\x8a\x5d\x41\x28\xb2\xa9\xcb\x72\x26\xdf\xaf\x6e\x86\xc0\xee\x61\x63\xc9\xf8\xe9\x73\x6b\x65\xcd\xed\x95\x84\x57\xb5\x71\xc2\x21\xd5\xc4\x20\xdf\xf1\xd2\x6c\x31\x51\x4c\x15\x05\x1a\x28\x90\xd7\xf4\x35\x5e\x80\x74\x13\x52\x70\xe4\x31\xe8\x7b\xc0\xc5\x5f\x3d\x3e\x03\x00\x00\xff\xff\x34\x69\x5c\xfa\x6b\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x4f\x8b\xdb\x30\x10\xc5\xef\xfa\x14\x8f\xa5\xd7\xd8\x6c\x8f\x5a\x7a\x58\xda\x4b\xa1\x94\xd2\x40\xef\x13\x79\x9c\xaa\xd1\x9f\x41\x92\x03\x41\xf8\xbb\x17\x3b\x8a\x37\xcb\xe6\x64\xf1\x66\xe6\xbd\x9f\x5f\xad\x9f\x02\x79\x7e\x15\x81\xfe\x82\xee\x27\x79\xc6\x3c\x93\xd8\x3f\x9c\xb2\x8d\x41\xe3\xfc\xac\x4e\x36\x0c\x1a\x3f\x6c\x2e\xca\x73\xa1\x81\x0a\x69\x05\x38\x3a\xb0\xcb\xcb\x0b\x20\x11\x8d\x37\xb3\x79\x56\xc0\xf2\x5e\xc4\xd5\x75\x9e\x95\x2d\xec\xb3\x56\xb5\x22\x51\x38\x32\xba\xbd\xb0\xe9\xbe\x7b\x3a\x2e\x99\x6a\x87\xfb\x58\xbb\xc8\x5d\x14\x0e\xf9\xaf\x1d\x4b\x67\x63\x7f\x7e\x56\xc0\x95\x65\x3d\xda\x97\xc4\xe4\x15\x70\x0f\xf5\x1e\xeb\x31\xd8\x47\x34\x20\x0b\x9b\x76\x1f\xe3\x69\x92\x5f\xd1\x59\x73\xb9\xb9\xb8\x68\xc8\x69\x8c\xe4\x32\xaf\x52\xad\x76\x44\xf7\x2d\x9a\x13\xa7\x15\xa6\x19\x17\x3a\xb6\xe8\x5d\xdb\x79\x0d\x21\x16\x2a\x36\x86\xaf\x7e\xc8\x6d\x0d\xa0\x4d\xde\x50\x01\xe3\x87\xac\xf1\x94\xa6\xb0\xfb\x47\x67\xd2\xfd\x94\x53\xbf\x66\xf7\xf9\xb3\xed\xd3\x14\x5e\x4c\xf4\x62\x1d\x3f\x9c\x53\xce\xec\x0f\x8e\x5f\x0e\x93\x75\x83\xee\x07\x16\x17\x2f\x9e\x43\xc9\xfd\x2a\x91\xc8\x53\x0b\xab\x95\xc3\xb0\xd1\x8c\x29\xfa\x37\x8c\x6b\xc7\x77\x3f\xb7\x4d\xb6\xde\x7e\xb3\xc4\xed\xda\x7a\x89\xa9\xb4\xc6\x50\x6f\xf2\x75\xd9\x51\xe1\x5c\x9a\x94\x78\xe4\xc4\xc1\xf0\xfb\x7a\x81\x72\x11\xd6\xd8\xc7\x29\x99\x5b\xc1\x2b\x5f\xfb\xfc\x0f\x00\x00\xff\xff\x5c\x1e\x56\x09\xa7\x02\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", From 27f11989c899620fbcb5d86978190e4e8c869fa3 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Mon, 8 Oct 2018 12:16:36 +0200 Subject: [PATCH 14/62] Add service type to let to register parameters of the service selected. Use plural form for array such env, images, ... --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/imagestream | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 798f4da..9001cdc 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 4, 14, 32, 14, 410087417, time.UTC), + modTime: time.Date(2018, 10, 8, 10, 12, 58, 129657907, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", @@ -36,10 +36,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 10, 4, 14, 32, 14, 408825608, time.UTC), - uncompressedSize: 679, + modTime: time.Date(2018, 10, 8, 10, 12, 58, 129088114, time.UTC), + uncompressedSize: 620, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x4f\x8b\xdb\x30\x10\xc5\xef\xfa\x14\x8f\xa5\xd7\xd8\x6c\x8f\x5a\x7a\x58\xda\x4b\xa1\x94\xd2\x40\xef\x13\x79\x9c\xaa\xd1\x9f\x41\x92\x03\x41\xf8\xbb\x17\x3b\x8a\x37\xcb\xe6\x64\xf1\x66\xe6\xbd\x9f\x5f\xad\x9f\x02\x79\x7e\x15\x81\xfe\x82\xee\x27\x79\xc6\x3c\x93\xd8\x3f\x9c\xb2\x8d\x41\xe3\xfc\xac\x4e\x36\x0c\x1a\x3f\x6c\x2e\xca\x73\xa1\x81\x0a\x69\x05\x38\x3a\xb0\xcb\xcb\x0b\x20\x11\x8d\x37\xb3\x79\x56\xc0\xf2\x5e\xc4\xd5\x75\x9e\x95\x2d\xec\xb3\x56\xb5\x22\x51\x38\x32\xba\xbd\xb0\xe9\xbe\x7b\x3a\x2e\x99\x6a\x87\xfb\x58\xbb\xc8\x5d\x14\x0e\xf9\xaf\x1d\x4b\x67\x63\x7f\x7e\x56\xc0\x95\x65\x3d\xda\x97\xc4\xe4\x15\x70\x0f\xf5\x1e\xeb\x31\xd8\x47\x34\x20\x0b\x9b\x76\x1f\xe3\x69\x92\x5f\xd1\x59\x73\xb9\xb9\xb8\x68\xc8\x69\x8c\xe4\x32\xaf\x52\xad\x76\x44\xf7\x2d\x9a\x13\xa7\x15\xa6\x19\x17\x3a\xb6\xe8\x5d\xdb\x79\x0d\x21\x16\x2a\x36\x86\xaf\x7e\xc8\x6d\x0d\xa0\x4d\xde\x50\x01\xe3\x87\xac\xf1\x94\xa6\xb0\xfb\x47\x67\xd2\xfd\x94\x53\xbf\x66\xf7\xf9\xb3\xed\xd3\x14\x5e\x4c\xf4\x62\x1d\x3f\x9c\x53\xce\xec\x0f\x8e\x5f\x0e\x93\x75\x83\xee\x07\x16\x17\x2f\x9e\x43\xc9\xfd\x2a\x91\xc8\x53\x0b\xab\x95\xc3\xb0\xd1\x8c\x29\xfa\x37\x8c\x6b\xc7\x77\x3f\xb7\x4d\xb6\xde\x7e\xb3\xc4\xed\xda\x7a\x89\xa9\xb4\xc6\x50\x6f\xf2\x75\xd9\x51\xe1\x5c\x9a\x94\x78\xe4\xc4\xc1\xf0\xfb\x7a\x81\x72\x11\xd6\xd8\xc7\x29\x99\x5b\xc1\x2b\x5f\xfb\xfc\x0f\x00\x00\xff\xff\x5c\x1e\x56\x09\xa7\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\xeb\xdb\x30\x0c\xc5\xef\xf9\x14\xe2\xcf\xae\x4d\xf8\xef\xe8\xb2\x43\xd9\x2e\x83\x31\xc6\x0a\xbb\xab\x8e\xd2\x79\xb5\x2d\x61\x39\x85\x62\xf2\xdd\x47\x1d\x37\xed\x60\x27\xdb\x3f\xe9\x49\xcf\xaf\x94\x0f\x11\x03\x1d\x44\xc0\x7c\x82\xfe\x3b\x06\x82\x65\x41\x71\xbf\x28\xa9\xe3\x68\xe0\xfa\xde\x5d\x5c\x1c\x0d\x7c\x73\x9a\x3b\x97\x29\xa8\xe9\x4a\x81\x84\xf1\x4c\xd0\x1f\x85\x6c\xff\x35\xe0\x99\x14\x96\xa5\xdb\xc1\xab\xd6\xdd\x79\xcf\x42\x51\x7f\xbb\x29\xf7\x8e\x87\xeb\x7b\x07\xb0\x0e\xac\xaa\x63\x4e\x84\xa1\x03\x08\x94\x71\xc4\x8c\xa6\x03\x00\xf0\x78\x22\xaf\xeb\x1d\x00\x45\x0c\x3c\xad\x2e\x4b\xe5\xf7\xd7\x1d\x57\xd7\x95\xa9\x90\x6d\x7a\xe6\xcb\x2c\x3f\xd8\x3b\x7b\x7b\x4c\xf1\x6c\xd1\x1b\x98\xd0\x2b\x55\x54\x8a\x9b\xa0\xff\xc2\xf6\x42\xa9\x9a\x69\x83\x33\x9e\xdb\xea\x5d\xeb\x39\xc4\xc8\x19\xb3\xe3\xf8\x39\x8c\xda\xda\x00\x70\xc3\x9b\x55\x00\x1b\x46\x35\xf0\x96\xe6\xb8\xfb\x83\x57\x34\xc3\xac\x69\xa8\xbb\x07\xfd\xe8\x86\x34\xc7\xbd\xe5\x20\xce\xd3\x7f\xeb\xa8\x4a\xe1\xe4\x69\x7f\x9a\x9d\x1f\xcd\x30\x92\x78\xbe\x05\x8a\x59\x87\x8a\x50\xe4\xad\x2d\x2b\x85\xe2\xb8\xb9\x99\x12\x87\xa7\x8d\x35\xe3\x97\xcf\x6d\x95\x2d\xb7\x9f\x24\xbc\xa9\x5d\x10\x4e\xb9\x25\x06\xe5\x81\xd7\x66\x8f\x99\x34\x37\x94\x68\xa2\x44\xd1\xd2\xbf\xf1\x02\xe4\x9b\x90\x81\x23\xcf\xc9\x3e\x02\xae\xfe\xda\xf1\x37\x00\x00\xff\xff\xec\x98\x21\x83\x6c\x02\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index 57297fb..a34badb 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -1,7 +1,7 @@ {{$nameApp := .Name }}apiVersion: v1 kind: List items: -{{ range .Spec.Image }} +{{ range .Spec.Images }} - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: From f202e3c77ea50a8cfa64dc0bd1ea7cf04f8064f4 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 11 Oct 2018 10:28:32 +0200 Subject: [PATCH 15/62] Add examples --- assets_vfsdata.go | 33 ++++++++++++++++++++++++++++- template.go | 10 +++++---- tmpl/servicecatalog/secret | 7 ++++++ tmpl/servicecatalog/servicebinding | 13 ++++++++++++ tmpl/servicecatalog/serviceinstance | 13 ++++++++++++ 5 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 tmpl/servicecatalog/secret create mode 100644 tmpl/servicecatalog/servicebinding create mode 100644 tmpl/servicecatalog/serviceinstance diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 9001cdc..014b39d 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -21,7 +21,7 @@ var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2018, 10, 4, 7, 6, 8, 650799297, time.UTC), + modTime: time.Date(2018, 10, 11, 6, 48, 37, 615852643, time.UTC), }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", @@ -62,9 +62,35 @@ var Assets = func() http.FileSystem { compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\x31\x8a\xc3\x30\x10\x45\x7b\x9d\x62\x2e\xb0\x86\x6d\xd5\x6e\xbf\x18\xbc\x6c\x3f\x91\x7f\x8c\x88\xa4\x19\xa4\xc1\x10\x8c\xef\x1e\x2c\x52\x24\x24\xe9\x86\x79\xef\xc1\x67\x8d\xff\xa8\x2d\x4a\xf1\xb4\x7e\xbb\x4b\x2c\xb3\xa7\x09\x75\x8d\x01\x2e\xc3\x78\x66\x63\xef\x88\x0a\x67\x78\xda\xb6\xe1\x97\x33\xf6\xdd\x11\x25\x3e\x21\xb5\x83\x11\xb1\xea\x33\x7c\x0d\x9a\x22\x1c\xb2\x4a\xb5\x5e\x7d\xf5\xb3\x2b\x93\x22\x0c\xa3\x54\xbb\xb7\x5a\xc5\x24\x48\xf2\xf4\xf7\x33\xf6\x8f\x71\x5d\x60\xe3\xfb\xa0\x21\x21\x98\xd4\x8f\x5b\x66\x68\x92\x6b\x46\xb1\x20\xe5\x1c\x97\x07\x7e\x0b\x00\x00\xff\xff\x7c\x58\xa5\x67\x01\x01\x00\x00"), }, + "/servicecatalog": &vfsgen۰DirInfo{ + name: "servicecatalog", + modTime: time.Date(2018, 10, 11, 8, 28, 15, 617345141, time.UTC), + }, + "/servicecatalog/secret": &vfsgen۰CompressedFileInfo{ + name: "secret", + modTime: time.Date(2018, 10, 11, 6, 56, 33, 471112219, time.UTC), + uncompressedSize: 273, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xcf\x41\x6a\x84\x30\x14\x80\xe1\xbd\xa7\xc8\x05\x84\x69\x2c\x05\xb3\x15\x14\x43\x51\xe8\xd0\x31\x66\xf7\x34\xaf\xf5\xb5\x51\x33\x26\x53\x1b\x4f\x5f\xba\x28\x85\xd2\xfd\xcf\x0f\x1f\x38\xba\xe0\xe6\x69\x5d\x04\xfb\xb8\x4b\x0c\x04\x10\x09\x63\x0e\x36\x98\x31\xe0\xe6\x05\xc3\x28\xf7\x21\x6b\x4e\x3a\x93\x76\xcc\x4a\xaf\xf8\xd3\x64\xaa\x92\x7a\xd5\xd8\xfa\x6d\xa5\x41\xd9\x17\x5d\x95\xa7\xbe\x93\xd3\xc8\x9f\xe9\xb1\xf8\xd3\x67\x97\x43\xab\x9a\x5a\x92\xde\x74\xc1\xd6\xb4\xd3\x58\xe5\x87\xa9\x4c\xd4\xaa\xf9\x1c\xca\x9c\x6b\x25\x0f\xe8\xf2\xdb\xf7\xaf\x3d\xdf\xf3\x7f\x9a\xbd\x57\xcd\x61\x78\x1e\x75\x51\x3f\xd4\x4b\x63\xfb\x4c\x5a\x53\xc8\x3c\x79\xa7\xc5\x08\x76\xc6\x71\xc3\x90\xcc\x18\xe0\x47\xb1\xc0\x8c\x82\x99\x29\x75\xab\x0f\xaf\x1b\xfa\xab\x4d\xc1\x0d\xe9\xaf\x2e\xee\x3b\x5f\x92\x10\x1d\x0a\xd6\x3a\xb8\xde\xf0\x2b\x00\x00\xff\xff\x43\xe7\x96\x2b\x11\x01\x00\x00"), + }, + "/servicecatalog/servicebinding": &vfsgen۰CompressedFileInfo{ + name: "servicebinding", + modTime: time.Date(2018, 10, 11, 6, 59, 27, 179078437, time.UTC), + uncompressedSize: 348, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8f\xb1\x4e\xc3\x30\x14\x45\x77\x7f\xc5\xfb\x01\x97\x38\x8d\x94\xc6\x23\x62\x61\xe9\x00\x12\xfb\x8b\x7d\x9b\x5a\x75\x1c\xe3\x67\x05\x50\xd5\x7f\x47\xa5\x48\xb0\xc0\x7a\x74\x74\x74\x2f\xe7\xf0\x82\x22\x61\x49\x96\x04\x65\x0d\x0e\x8e\x2b\xc7\x65\xda\x9c\x76\xb2\x09\xcb\xdd\x6a\x46\x54\x36\xea\x14\x92\xb7\xf4\x7c\x73\xee\x43\xf2\x21\x4d\x6a\x46\x65\xcf\x95\xad\x22\x4a\x3c\xc3\x92\x3f\xea\xbc\x48\x9d\x0a\xe4\x35\x6a\xce\xa3\x4e\x87\xb7\x7a\xd4\xc5\xb9\xbe\x7e\x5b\x92\xd9\xc1\xd2\xfc\xa1\x25\x97\x90\x26\xcd\x39\x2b\xa2\xc8\x23\xa2\x5c\x53\x44\x9c\xb3\xa5\xf3\x79\xb3\xe7\x19\x97\xcb\x17\xba\xf5\x7f\x98\x64\xb8\xab\x8c\xf7\x8a\x92\x38\x3e\x3e\x58\xea\xfb\x01\x5b\xee\x06\xed\x7c\xdb\x6a\x63\xb0\xd3\x8c\xc6\xe8\xa6\xed\x5a\x76\xc6\x34\x4d\xd3\x29\xa2\x90\xa4\x72\x72\x78\xc2\xc1\xfe\x6a\xff\xb1\x5d\x11\x09\x5c\x41\xdd\xff\xfb\xd0\x15\x78\xa4\x1a\x38\x8a\x9e\xb7\xc3\x5a\x3e\x03\x00\x00\xff\xff\x8d\x60\x2a\x98\x5c\x01\x00\x00"), + }, + "/servicecatalog/serviceinstance": &vfsgen۰CompressedFileInfo{ + name: "serviceinstance", + modTime: time.Date(2018, 10, 11, 8, 28, 15, 616027971, time.UTC), + uncompressedSize: 331, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x90\xbd\x6a\x04\x21\x14\x85\xfb\x79\x8a\x5b\xa4\x36\x6c\x17\x84\x14\x21\xa4\xd8\x14\x4b\x60\x20\xfd\x59\xe7\x32\xc8\xea\x1d\xf1\x9a\x25\x20\xbe\x7b\xd0\xcd\xe6\x87\x2d\x3d\xe7\x3b\x7e\x62\xad\x77\x82\xc8\x4f\x29\x91\x7d\x24\x73\x40\x64\x6a\x6d\xaa\x95\x32\x64\x65\x32\x73\x62\x67\xf6\x11\x2b\x2b\xb5\x86\xe4\xdf\x39\xab\xdf\xc4\x92\x72\x3e\x7b\xc7\x0e\x05\x61\x5b\xcd\xe9\x41\x8d\xdf\xee\xcf\xbb\x23\x17\xec\xa6\x93\x97\xc5\xd2\x7c\x61\xf6\xa2\x05\xe2\x78\x8a\x5c\xb0\xa0\xc0\x4e\x44\xdd\x6b\xa9\xd6\x21\x6d\x6d\x22\x0a\x38\x72\xd0\xde\x11\x21\xa5\x5e\x5e\x5f\x37\xfa\xdf\xcd\x9f\x58\x13\xbb\x3e\x71\xe1\x43\x0b\xe7\x6f\xe3\x73\x80\xea\xcb\x67\xe1\x2c\x08\x87\xab\x69\xa4\xe3\xaa\xff\xf4\x5b\x80\xdc\xc0\x3d\x1c\x6c\x42\x46\xe4\xc2\x59\x2f\xf9\xcf\xf1\x75\xde\x64\x7c\x16\xcb\xd2\xda\x57\x00\x00\x00\xff\xff\x31\x74\x0a\xa7\x4b\x01\x00\x00"), + }, } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/innerloop"].(os.FileInfo), + fs["/servicecatalog"].(os.FileInfo), } fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/innerloop/deploymentconfig"].(os.FileInfo), @@ -73,6 +99,11 @@ var Assets = func() http.FileSystem { fs["/innerloop/route"].(os.FileInfo), fs["/innerloop/service"].(os.FileInfo), } + fs["/servicecatalog"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/servicecatalog/secret"].(os.FileInfo), + fs["/servicecatalog/servicebinding"].(os.FileInfo), + fs["/servicecatalog/serviceinstance"].(os.FileInfo), + } return fs }() diff --git a/template.go b/template.go index 296608b..bbc4484 100644 --- a/template.go +++ b/template.go @@ -30,7 +30,7 @@ import ( var ( TemplateAssets = Assets - TemplatePath = "innerloop" + TemplatePath = []string{"innerloop", "servicecatalog"} TemplateFiles []string Templates = make(map[string]template.Template) ) @@ -51,9 +51,11 @@ func init() { return nil } - errW := vfsutil.Walk(TemplateAssets, TemplatePath, walkFn) - if errW != nil { - panic(errW) + for _, p := range TemplatePath { + err := vfsutil.Walk(TemplateAssets, p, walkFn) + if err != nil{ + log.Error(err.Error()) + } } // Fill an array with the k8s/openshift yaml files diff --git a/tmpl/servicecatalog/secret b/tmpl/servicecatalog/secret new file mode 100644 index 0000000..771bbd0 --- /dev/null +++ b/tmpl/servicecatalog/secret @@ -0,0 +1,7 @@ +apiVersion: v1 +data: + parameters: eyJwb3N0Z3Jlc3FsX2RhdGFiYXNlIjoibXlfZGF0YWJhc2UiLCJwb3N0Z3Jlc3FsX3VzZXIiOiJsdWtlIiwicG9zdGdyZXNxbF92ZXJzaW9uIjoiOS42IiwicG9zdGdyZXNxbF9wYXNzd29yZCI6InNlY3JldCJ9 +kind: Secret +metadata: + name: dh-postgresql-apb-parametersyww2n +type: Opaque \ No newline at end of file diff --git a/tmpl/servicecatalog/servicebinding b/tmpl/servicecatalog/servicebinding new file mode 100644 index 0000000..c9c7cf7 --- /dev/null +++ b/tmpl/servicecatalog/servicebinding @@ -0,0 +1,13 @@ +apiVersion: servicecatalog.k8s.io/v1beta1 +kind: ServiceBinding +metadata: + name: dh-postgresql-apb-nfwth-rcc7t + namespace: my-spring-app + labels: + app: {{.Name}} + name: {{.Name}} +spec: + externalID: 779e3a49-cd22-11e8-ae01-0242ac110004 + instanceRef: + name: dh-postgresql-apb-nfwth + secretName: dh-postgresql-apb-nfwth-credentials-m39vr \ No newline at end of file diff --git a/tmpl/servicecatalog/serviceinstance b/tmpl/servicecatalog/serviceinstance new file mode 100644 index 0000000..f63d21d --- /dev/null +++ b/tmpl/servicecatalog/serviceinstance @@ -0,0 +1,13 @@ +{{$nameApp := .Name }} +{{ range .Spec.Images }}apiVersion: servicecatalog.k8s.io/v1beta1 +kind: ServiceInstance +metadata: + name: {{.Name}} + labels: + app: {{$nameApp}} + name: {{$nameApp}} +spec: + clusterServiceClassExternalName: {{.Class}} + clusterServicePlanExternalName: {{.Plan}} + parameters: {{.ParametersJSon}} +{{end}} \ No newline at end of file From 77e7eb3fabc6cab7b039731488bf9da0780c7677 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 11 Oct 2018 11:02:07 +0200 Subject: [PATCH 16/62] Add env vars --- assets_vfsdata.go | 34 +++++++++++------------------ tmpl/servicebinding | 11 ++++++++++ tmpl/servicecatalog/secret | 7 ------ tmpl/servicecatalog/servicebinding | 13 ----------- tmpl/servicecatalog/serviceinstance | 2 +- 5 files changed, 25 insertions(+), 42 deletions(-) create mode 100644 tmpl/servicebinding delete mode 100644 tmpl/servicecatalog/secret delete mode 100644 tmpl/servicecatalog/servicebinding diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 014b39d..d89f564 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -21,7 +21,7 @@ var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2018, 10, 11, 6, 48, 37, 615852643, time.UTC), + modTime: time.Date(2018, 10, 11, 8, 40, 15, 195209172, time.UTC), }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", @@ -62,34 +62,28 @@ var Assets = func() http.FileSystem { compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\x31\x8a\xc3\x30\x10\x45\x7b\x9d\x62\x2e\xb0\x86\x6d\xd5\x6e\xbf\x18\xbc\x6c\x3f\x91\x7f\x8c\x88\xa4\x19\xa4\xc1\x10\x8c\xef\x1e\x2c\x52\x24\x24\xe9\x86\x79\xef\xc1\x67\x8d\xff\xa8\x2d\x4a\xf1\xb4\x7e\xbb\x4b\x2c\xb3\xa7\x09\x75\x8d\x01\x2e\xc3\x78\x66\x63\xef\x88\x0a\x67\x78\xda\xb6\xe1\x97\x33\xf6\xdd\x11\x25\x3e\x21\xb5\x83\x11\xb1\xea\x33\x7c\x0d\x9a\x22\x1c\xb2\x4a\xb5\x5e\x7d\xf5\xb3\x2b\x93\x22\x0c\xa3\x54\xbb\xb7\x5a\xc5\x24\x48\xf2\xf4\xf7\x33\xf6\x8f\x71\x5d\x60\xe3\xfb\xa0\x21\x21\x98\xd4\x8f\x5b\x66\x68\x92\x6b\x46\xb1\x20\xe5\x1c\x97\x07\x7e\x0b\x00\x00\xff\xff\x7c\x58\xa5\x67\x01\x01\x00\x00"), }, - "/servicecatalog": &vfsgen۰DirInfo{ - name: "servicecatalog", - modTime: time.Date(2018, 10, 11, 8, 28, 15, 617345141, time.UTC), - }, - "/servicecatalog/secret": &vfsgen۰CompressedFileInfo{ - name: "secret", - modTime: time.Date(2018, 10, 11, 6, 56, 33, 471112219, time.UTC), - uncompressedSize: 273, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xcf\x41\x6a\x84\x30\x14\x80\xe1\xbd\xa7\xc8\x05\x84\x69\x2c\x05\xb3\x15\x14\x43\x51\xe8\xd0\x31\x66\xf7\x34\xaf\xf5\xb5\x51\x33\x26\x53\x1b\x4f\x5f\xba\x28\x85\xd2\xfd\xcf\x0f\x1f\x38\xba\xe0\xe6\x69\x5d\x04\xfb\xb8\x4b\x0c\x04\x10\x09\x63\x0e\x36\x98\x31\xe0\xe6\x05\xc3\x28\xf7\x21\x6b\x4e\x3a\x93\x76\xcc\x4a\xaf\xf8\xd3\x64\xaa\x92\x7a\xd5\xd8\xfa\x6d\xa5\x41\xd9\x17\x5d\x95\xa7\xbe\x93\xd3\xc8\x9f\xe9\xb1\xf8\xd3\x67\x97\x43\xab\x9a\x5a\x92\xde\x74\xc1\xd6\xb4\xd3\x58\xe5\x87\xa9\x4c\xd4\xaa\xf9\x1c\xca\x9c\x6b\x25\x0f\xe8\xf2\xdb\xf7\xaf\x3d\xdf\xf3\x7f\x9a\xbd\x57\xcd\x61\x78\x1e\x75\x51\x3f\xd4\x4b\x63\xfb\x4c\x5a\x53\xc8\x3c\x79\xa7\xc5\x08\x76\xc6\x71\xc3\x90\xcc\x18\xe0\x47\xb1\xc0\x8c\x82\x99\x29\x75\xab\x0f\xaf\x1b\xfa\xab\x4d\xc1\x0d\xe9\xaf\x2e\xee\x3b\x5f\x92\x10\x1d\x0a\xd6\x3a\xb8\xde\xf0\x2b\x00\x00\xff\xff\x43\xe7\x96\x2b\x11\x01\x00\x00"), - }, - "/servicecatalog/servicebinding": &vfsgen۰CompressedFileInfo{ + "/servicebinding": &vfsgen۰CompressedFileInfo{ name: "servicebinding", - modTime: time.Date(2018, 10, 11, 6, 59, 27, 179078437, time.UTC), - uncompressedSize: 348, + modTime: time.Date(2018, 10, 11, 8, 34, 22, 172540726, time.UTC), + uncompressedSize: 204, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8f\xb1\x4e\xc3\x30\x14\x45\x77\x7f\xc5\xfb\x01\x97\x38\x8d\x94\xc6\x23\x62\x61\xe9\x00\x12\xfb\x8b\x7d\x9b\x5a\x75\x1c\xe3\x67\x05\x50\xd5\x7f\x47\xa5\x48\xb0\xc0\x7a\x74\x74\x74\x2f\xe7\xf0\x82\x22\x61\x49\x96\x04\x65\x0d\x0e\x8e\x2b\xc7\x65\xda\x9c\x76\xb2\x09\xcb\xdd\x6a\x46\x54\x36\xea\x14\x92\xb7\xf4\x7c\x73\xee\x43\xf2\x21\x4d\x6a\x46\x65\xcf\x95\xad\x22\x4a\x3c\xc3\x92\x3f\xea\xbc\x48\x9d\x0a\xe4\x35\x6a\xce\xa3\x4e\x87\xb7\x7a\xd4\xc5\xb9\xbe\x7e\x5b\x92\xd9\xc1\xd2\xfc\xa1\x25\x97\x90\x26\xcd\x39\x2b\xa2\xc8\x23\xa2\x5c\x53\x44\x9c\xb3\xa5\xf3\x79\xb3\xe7\x19\x97\xcb\x17\xba\xf5\x7f\x98\x64\xb8\xab\x8c\xf7\x8a\x92\x38\x3e\x3e\x58\xea\xfb\x01\x5b\xee\x06\xed\x7c\xdb\x6a\x63\xb0\xd3\x8c\xc6\xe8\xa6\xed\x5a\x76\xc6\x34\x4d\xd3\x29\xa2\x90\xa4\x72\x72\x78\xc2\xc1\xfe\x6a\xff\xb1\x5d\x11\x09\x5c\x41\xdd\xff\xfb\xd0\x15\x78\xa4\x1a\x38\x8a\x9e\xb7\xc3\x5a\x3e\x03\x00\x00\xff\xff\x8d\x60\x2a\x98\x5c\x01\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xcb\x31\xae\x83\x30\x10\x84\xe1\xde\xa7\xd8\x13\xf0\x44\xf7\xe4\x32\x07\xa0\x48\xa4\xf4\x83\x99\xa0\x15\xb0\x58\x5e\x8b\x06\x71\xf7\x08\xa5\x42\x49\x3b\xff\x37\xc8\xfa\x64\x71\x5d\x2d\x8a\xb3\x6c\x9a\x98\x50\x31\xaf\x63\x33\xfd\x7b\xa3\xeb\xdf\xd6\xf6\xac\x68\xc3\xa4\x36\x44\x79\x7c\xcc\x4d\x6d\x50\x1b\xc3\xc2\x8a\x01\x15\x31\x88\x18\x16\x46\xd9\xf7\xa6\xc3\xc2\xe3\x08\x22\x33\x7a\xce\x7e\x36\x11\xe4\x7c\x8d\xdf\x07\xcf\x4c\x27\x56\xf3\x0a\x4b\xbc\xf3\x15\x7f\x42\x11\x67\x2a\xac\xdd\x75\x7f\x07\x00\x00\xff\xff\x1a\x0a\x9e\xde\xcc\x00\x00\x00"), + }, + "/servicecatalog": &vfsgen۰DirInfo{ + name: "servicecatalog", + modTime: time.Date(2018, 10, 11, 8, 47, 22, 758807521, time.UTC), }, "/servicecatalog/serviceinstance": &vfsgen۰CompressedFileInfo{ name: "serviceinstance", - modTime: time.Date(2018, 10, 11, 8, 28, 15, 616027971, time.UTC), - uncompressedSize: 331, + modTime: time.Date(2018, 10, 11, 8, 47, 22, 758236171, time.UTC), + uncompressedSize: 333, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x90\xbd\x6a\x04\x21\x14\x85\xfb\x79\x8a\x5b\xa4\x36\x6c\x17\x84\x14\x21\xa4\xd8\x14\x4b\x60\x20\xfd\x59\xe7\x32\xc8\xea\x1d\xf1\x9a\x25\x20\xbe\x7b\xd0\xcd\xe6\x87\x2d\x3d\xe7\x3b\x7e\x62\xad\x77\x82\xc8\x4f\x29\x91\x7d\x24\x73\x40\x64\x6a\x6d\xaa\x95\x32\x64\x65\x32\x73\x62\x67\xf6\x11\x2b\x2b\xb5\x86\xe4\xdf\x39\xab\xdf\xc4\x92\x72\x3e\x7b\xc7\x0e\x05\x61\x5b\xcd\xe9\x41\x8d\xdf\xee\xcf\xbb\x23\x17\xec\xa6\x93\x97\xc5\xd2\x7c\x61\xf6\xa2\x05\xe2\x78\x8a\x5c\xb0\xa0\xc0\x4e\x44\xdd\x6b\xa9\xd6\x21\x6d\x6d\x22\x0a\x38\x72\xd0\xde\x11\x21\xa5\x5e\x5e\x5f\x37\xfa\xdf\xcd\x9f\x58\x13\xbb\x3e\x71\xe1\x43\x0b\xe7\x6f\xe3\x73\x80\xea\xcb\x67\xe1\x2c\x08\x87\xab\x69\xa4\xe3\xaa\xff\xf4\x5b\x80\xdc\xc0\x3d\x1c\x6c\x42\x46\xe4\xc2\x59\x2f\xf9\xcf\xf1\x75\xde\x64\x7c\x16\xcb\xd2\xda\x57\x00\x00\x00\xff\xff\x31\x74\x0a\xa7\x4b\x01\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x90\xbd\x6a\x04\x21\x14\x85\x7b\x9f\xe2\x16\xa9\x0d\xdb\x05\x21\x45\x08\x29\x92\x62\x09\x0c\xa4\x3f\xeb\x5c\x16\x59\xe7\x8e\x78\xcd\x12\x10\xdf\x3d\xe8\xee\xe4\x87\x2d\xfd\xce\x39\x7e\x62\xad\x77\x82\x85\x9f\x52\x22\xf7\x48\x76\x8f\x85\xa9\x35\x53\x2b\x65\xc8\x91\xc9\x4e\x89\xbd\x9d\x38\x9f\x83\x67\xa5\xd6\x90\xc2\x07\x67\x0d\xab\x38\xd2\x0b\xf6\x28\x88\xeb\xd1\x9e\x1e\xd4\x86\xf5\xfe\xbc\x3b\x70\xc1\xce\x9c\x82\xcc\x8e\xae\xd3\x57\xd1\x02\xf1\x6c\x16\x2e\x98\x51\xe0\x0c\x51\x37\x3b\xaa\x75\x68\x5b\x33\x44\x11\x07\x8e\xda\x33\x22\xa4\xd4\xc3\xed\x7d\x23\xff\xdd\xfc\xc1\x9a\xd8\xf7\x89\x8f\x9f\x5a\x38\x5f\x8d\xcf\x11\xaa\x2f\x5f\x85\xb3\x20\xee\x37\xd3\xa0\xe3\xaa\xff\xed\xf7\x08\xb9\x29\x77\x38\xba\x09\x19\x0b\x17\xce\x7a\xe1\x3f\xc7\xb7\x69\x95\xf1\x5d\x2c\x73\x6b\xdf\x01\x00\x00\xff\xff\xdd\xed\x80\x29\x4d\x01\x00\x00"), }, } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/innerloop"].(os.FileInfo), + fs["/servicebinding"].(os.FileInfo), fs["/servicecatalog"].(os.FileInfo), } fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ @@ -100,8 +94,6 @@ var Assets = func() http.FileSystem { fs["/innerloop/service"].(os.FileInfo), } fs["/servicecatalog"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/servicecatalog/secret"].(os.FileInfo), - fs["/servicecatalog/servicebinding"].(os.FileInfo), fs["/servicecatalog/serviceinstance"].(os.FileInfo), } diff --git a/tmpl/servicebinding b/tmpl/servicebinding new file mode 100644 index 0000000..036784d --- /dev/null +++ b/tmpl/servicebinding @@ -0,0 +1,11 @@ +apiVersion: servicecatalog.k8s.io/v1beta1 +kind: ServiceBinding +metadata: + name: {{.Name}} + labels: + app: {{.Name}} + name: {{.Name}} +spec: + instanceRef: + name: {{.Name}} + secretName: {{.Name}} \ No newline at end of file diff --git a/tmpl/servicecatalog/secret b/tmpl/servicecatalog/secret deleted file mode 100644 index 771bbd0..0000000 --- a/tmpl/servicecatalog/secret +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -data: - parameters: eyJwb3N0Z3Jlc3FsX2RhdGFiYXNlIjoibXlfZGF0YWJhc2UiLCJwb3N0Z3Jlc3FsX3VzZXIiOiJsdWtlIiwicG9zdGdyZXNxbF92ZXJzaW9uIjoiOS42IiwicG9zdGdyZXNxbF9wYXNzd29yZCI6InNlY3JldCJ9 -kind: Secret -metadata: - name: dh-postgresql-apb-parametersyww2n -type: Opaque \ No newline at end of file diff --git a/tmpl/servicecatalog/servicebinding b/tmpl/servicecatalog/servicebinding deleted file mode 100644 index c9c7cf7..0000000 --- a/tmpl/servicecatalog/servicebinding +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: servicecatalog.k8s.io/v1beta1 -kind: ServiceBinding -metadata: - name: dh-postgresql-apb-nfwth-rcc7t - namespace: my-spring-app - labels: - app: {{.Name}} - name: {{.Name}} -spec: - externalID: 779e3a49-cd22-11e8-ae01-0242ac110004 - instanceRef: - name: dh-postgresql-apb-nfwth - secretName: dh-postgresql-apb-nfwth-credentials-m39vr \ No newline at end of file diff --git a/tmpl/servicecatalog/serviceinstance b/tmpl/servicecatalog/serviceinstance index f63d21d..0c914c7 100644 --- a/tmpl/servicecatalog/serviceinstance +++ b/tmpl/servicecatalog/serviceinstance @@ -1,5 +1,5 @@ {{$nameApp := .Name }} -{{ range .Spec.Images }}apiVersion: servicecatalog.k8s.io/v1beta1 +{{ range .Spec.Services }}apiVersion: servicecatalog.k8s.io/v1beta1 kind: ServiceInstance metadata: name: {{.Name}} From 645070ebec9dc2a81b6f1f4f9f5bc50f3f9ee057 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 11 Oct 2018 11:09:30 +0200 Subject: [PATCH 17/62] Add env var range and loop --- tmpl/innerloop/deploymentconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 3ea7772..9b0d7fc 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -33,6 +33,10 @@ spec: value: "5005" - name: JAVA_APP_JAR value: app.jar + {{ range .Spec.Envs }} + - name: {{.Name}} + value: {{.Value}} + {{end}} image: "dev-s2i:latest" imagePullPolicy: Always name: {{.Name}} From 91aa3b15f7403b524d874078532de552e9c68d6b Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 11 Oct 2018 11:09:56 +0200 Subject: [PATCH 18/62] Regenereate the assets --- assets_vfsdata.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index d89f564..610387a 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 8, 10, 12, 58, 129657907, time.UTC), + modTime: time.Date(2018, 10, 11, 9, 9, 14, 352956734, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 10, 4, 10, 33, 38, 501015106, time.UTC), - uncompressedSize: 2080, + modTime: time.Date(2018, 10, 11, 9, 9, 14, 351417908, time.UTC), + uncompressedSize: 2181, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xe3\x46\x0c\xbd\xfb\x57\x10\xb9\xcb\xda\x0d\xb0\x97\xc9\xc9\xb5\xdb\x22\x01\x92\x0a\x71\x9a\x6b\x40\x8f\x68\x99\xe9\x7c\x61\x66\xa4\xc2\x08\xf2\xdf\x8b\xb1\x1c\x79\x6c\xcb\x09\x5a\xa0\x3b\x27\x93\xf4\x23\x1f\xf9\x08\x0a\x1d\x3f\x93\x0f\x6c\x8d\x00\x74\x2e\x4c\xad\x23\x13\x36\xbc\x8e\x53\xb6\x65\xf7\x7d\xf2\x17\x9b\x5a\xc0\x82\x9c\xb2\x5b\x4d\x26\xce\xad\x59\x73\x33\xd1\x14\xb1\xc6\x88\x62\x02\xa0\x70\x45\x2a\xa4\x5f\x90\x72\x08\x78\x7b\x9b\x3e\xa0\xa6\xf7\xf7\x09\x80\x41\x4d\xb9\x27\x38\x92\xe9\xaf\x9e\x9c\x62\x89\x41\xc0\xf7\x09\x40\x20\x45\x32\x5a\x7f\x21\x09\x40\x3d\x10\x90\x3b\x02\xc7\xf1\x10\x3d\x46\x6a\xb6\x3d\x3c\x6e\x1d\x09\x78\xb4\x4a\xb1\x69\x26\x00\x91\xb4\x53\x18\xa9\x8f\xe6\xcc\xd3\xcb\xd9\x5f\x28\xfe\x35\x81\xf4\x4e\x3b\x4d\xbe\x8f\x6e\xd3\x93\xd6\x44\x64\x43\x7e\x28\x56\x00\xfa\x26\x2b\x5d\x40\x21\x33\xa3\xec\xd0\x97\x8a\x57\x65\x68\x1d\xf9\x8e\x83\xf5\x75\x99\xaa\x67\x8e\x69\xb2\x07\x8c\xb4\x5a\xa3\xa9\xc5\x57\x49\x56\x6c\x72\x7b\xf8\x3b\x99\x2e\xc7\xf6\x1d\xdd\xcd\x9e\x67\x2f\xb3\xaa\x7a\x59\xdc\x3e\x0e\x41\x80\x0e\x55\x4b\x02\xca\xc3\x60\xc2\x38\x74\xf1\xeb\x2f\x7f\xfe\x7e\x0e\xbc\x8a\xbe\xa5\xab\x4f\x20\x2f\xd5\x1f\x8f\x4f\x23\xb8\x1f\xdf\xbe\xfd\xb8\x80\x4b\x2c\xef\x66\x23\x2c\xd1\xb9\xe9\x2b\xfa\x21\xc0\x1a\x9b\x94\xab\xa6\xae\x08\xd7\x2c\xd2\x7a\x84\x78\x75\x1c\xaf\x5a\xa5\x2a\xab\x58\x6e\x05\xcc\xd4\xdf\xb8\x3d\x34\x38\xa6\x75\x7a\xce\xfa\x78\x24\xe8\x20\x7a\x65\x7d\xdc\x21\x96\x8e\xe4\x34\x59\x19\x0c\xc0\x79\x1b\xad\xb4\x4a\xc0\xd3\xbc\x1a\xfc\x9d\x55\xad\xa6\x7b\xdb\x9a\xe3\xac\x3a\x79\x2a\x8c\x1b\x31\xaa\x6f\x96\xb7\x27\x1a\x36\xe8\xa9\x2e\xd2\xda\x5f\xc8\x12\xb5\x2b\xd1\x47\x5e\xa3\xcc\x74\xfc\xc0\xeb\xeb\x1c\xcb\x86\xd3\x19\x38\x5b\xe6\xd1\xed\x99\xdf\x2f\x96\xe7\x7a\xf8\xd6\x14\xaf\xd8\xa1\x28\xdb\xe0\x4b\x65\x25\xaa\x32\x5c\x73\xe9\x5b\x73\x23\xad\x76\xac\x68\x34\x8e\x21\x90\x5e\x29\xba\x59\xb5\xac\x6a\x91\x2f\x5f\xb9\x73\xa1\x73\x67\x22\x7f\x0c\x7d\x79\x98\x50\x2f\xdb\x7f\x94\x5d\x5a\xb7\x2d\xc6\xc6\xed\x29\xd8\xd6\x4b\x0a\x02\xde\x0e\xe2\x46\xf2\x9a\x0d\x46\xb6\xe6\x9e\x42\x48\x15\xfa\x99\xd7\xd4\x95\x59\xb0\x50\xb6\xf9\x0c\xb4\xa7\xf4\x1b\x2b\xfa\x09\x0b\xd2\x67\xce\xd5\xd5\x2e\x6e\x17\xec\x8f\x7a\xbb\x84\x2e\x46\x17\x07\xc0\xa5\x6f\x4d\x88\x64\xe2\xf3\x2e\xff\x5c\x21\x6b\x91\xd1\x91\xc9\xf1\x70\x82\x8d\x9e\x9b\x66\xbf\x6a\xc5\xfe\xbc\xdf\x26\xa9\xe6\x1b\x34\x4d\x3f\x0d\x3e\xd8\x15\x7a\xd4\x03\x73\x6c\xa3\xd5\x18\x59\x0a\x48\x17\xe7\xf4\x18\xa7\x5a\x59\x97\x17\xb4\x5d\x7b\x9b\xd1\xec\xbf\x89\x3b\x06\xcb\xe8\x09\xf5\x13\x36\x5f\xec\xc8\x7e\xd5\xfe\xff\x06\x4e\x6f\xd2\xbf\x66\x7e\x7c\x12\xff\x09\x00\x00\xff\xff\xac\x2a\x5b\x5a\x20\x08\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcf\x6f\xeb\x36\x0c\xbe\xe7\xaf\x20\x7a\xb7\xfd\x5e\x81\x77\xd1\x3b\x65\x49\x37\xb4\x40\x3b\xa3\xe9\x72\x2d\x18\x99\x71\xd4\xe9\x17\x24\xd9\x43\x60\xf4\x7f\x1f\x14\xa7\x8e\x9c\x38\x2d\x36\x60\xf3\xc9\x22\xfd\x91\x1f\xc9\xcf\x14\x5a\xb1\x26\xe7\x85\xd1\x0c\xd0\x5a\x9f\x1b\x4b\xda\xef\xc4\x36\xe4\xc2\x14\xed\xf7\xd9\x9f\x42\x57\x0c\x96\x64\xa5\xd9\x2b\xd2\x61\x61\xf4\x56\xd4\x33\x45\x01\x2b\x0c\xc8\x66\x00\x12\x37\x24\x7d\x7c\x83\x18\x83\x41\xd7\xe5\x4f\xa8\xe8\xfd\x7d\x06\xa0\x51\x51\x6a\xf1\x96\x78\xfc\xd4\x91\x95\x82\xa3\x67\xf0\x7d\x06\xe0\x49\x12\x0f\xc6\x5d\x09\x02\x50\x0d\x04\xf8\x81\xc0\xd8\xef\x83\xc3\x40\xf5\xbe\x87\x87\xbd\x25\x06\xcf\x46\x4a\xa1\xeb\x19\x40\x20\x65\x25\x06\xea\xbd\x29\xf3\xf8\xa4\xec\xaf\x24\xff\x9a\x40\x7c\xce\x2b\x8d\xb6\x8f\x6a\xe3\xc3\x8d\x0e\x28\x34\xb9\x21\x59\x06\xe8\xea\x24\x75\x06\x19\x4f\x0e\x45\x8b\xae\x90\x62\x53\xf8\xc6\x92\x6b\x85\x37\xae\x2a\x62\xf6\xc4\x90\xc7\xf3\x80\xe1\x46\x29\xd4\x15\xfb\x2a\xc8\x46\xe8\xf4\x3c\x7c\x4e\xba\x4d\xb1\x7d\x45\x0f\xf3\xf5\xfc\x75\x5e\x96\xaf\xcb\xfb\xe7\xc1\x09\xd0\xa2\x6c\x88\x41\x71\x6a\x8c\x9f\x86\x2e\xef\x7e\xf9\xe3\xb7\x4b\xe0\x4d\x70\x0d\xdd\x7c\x02\x79\x2d\x7f\x7f\x7e\x99\xc0\xfd\xf8\xf6\xed\xc7\x15\x5c\x64\xf9\x30\x9f\x60\x89\xd6\xe6\x6f\xe8\x06\x47\xd7\x81\x43\x5d\x13\xe4\x2b\x4b\x3c\xbf\xd3\xad\x87\x64\xd8\xd9\xe4\x30\x47\x11\xbb\x2e\x5f\xc7\xb7\xc4\xd7\x75\xa4\xab\xe4\x2c\x14\xd6\x91\x70\x45\x6d\xe6\x6f\x05\x8b\x1a\xf4\xe1\x66\xec\x2f\x1b\x29\x4b\x23\x05\xdf\x33\x98\xcb\xbf\x70\x7f\xea\xe2\x35\x0e\xd6\xb8\x30\x52\xcd\xa0\xac\xd2\xb8\x70\x40\x1c\xaa\x8a\xa7\x11\x75\xeb\x4c\x30\xdc\x48\x06\x2f\x8b\x72\xb0\xb7\x46\x36\x8a\x1e\x4d\xa3\xc7\x51\x55\xb4\x94\x18\x76\x6c\x52\x44\x49\xdc\x9e\xa8\xdf\xa1\xa3\x2a\x8b\xff\xd6\x95\x28\x41\xd9\x02\x5d\x10\x5b\xe4\x89\x58\x3e\xf0\xea\x36\xc5\x0a\x2d\xe2\xae\xb9\xf8\x63\x26\x25\xba\x78\x5c\xae\x2e\x47\xe4\x1a\x9d\xbd\x61\x8b\xac\x68\xbc\x2b\xa4\xe1\x28\x0b\x7f\x2b\x0a\xd7\xe8\x9f\xdc\x28\x2b\x24\x4d\xfa\xd1\x7b\x52\x1b\x49\x3f\x37\x8d\x90\x15\x4b\x15\x5e\x1c\x4c\x68\xed\xc5\x90\x3f\x9a\xbe\x3a\x75\xa8\x1f\xdb\xbf\x1c\x3b\x37\x76\x9f\x4d\xb5\xdb\x91\x37\x8d\xe3\xe4\x19\x74\xa7\xe1\x06\x72\x4a\x68\x0c\xc2\xe8\x47\xf2\x3e\x66\xe8\x7b\x5e\x51\x5b\x24\xce\x4c\x9a\xfa\x33\xd0\x91\xd2\xaf\x42\xd2\xff\x20\x90\x3e\x72\x3a\x5d\x65\xc3\x7e\x29\xdc\xa8\xb6\x6b\xe8\x6c\x52\x38\x00\x36\x5e\x68\x3e\x90\x0e\xeb\x43\xfc\x85\x44\xa1\x58\x42\x87\x47\xc3\xd3\x19\x36\x38\x51\xd7\x47\xa9\x65\xc7\x3b\xe4\x3e\x8e\x6a\xb1\x8b\x9b\x62\x36\x8c\xae\x3f\x97\xe8\x50\x0d\xcc\xb1\x09\x46\x61\x10\x9c\x41\x5c\x6b\xe7\x1b\x3f\xe6\x4a\xaa\xbc\x32\xdb\xad\x33\x09\xcd\xfe\xe2\x3d\x30\x58\x05\x47\xa8\x5e\xb0\xfe\x42\x23\x47\xa9\xfd\xf7\x05\x9c\xef\xa4\x7f\xcc\x7c\xbc\x12\xff\x0e\x00\x00\xff\xff\x10\xdf\x2e\xb7\x85\x08\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", From df7f70c386845c0b3dccc81f46e625cce23ba019 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 11 Oct 2018 11:34:15 +0200 Subject: [PATCH 19/62] Review binding --- assets_vfsdata.go | 20 ++++++++++---------- tmpl/servicebinding | 11 ----------- tmpl/servicecatalog/servicebinding | 13 +++++++++++++ 3 files changed, 23 insertions(+), 21 deletions(-) delete mode 100644 tmpl/servicebinding create mode 100644 tmpl/servicecatalog/servicebinding diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 610387a..2dcf5ba 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -21,7 +21,7 @@ var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2018, 10, 11, 8, 40, 15, 195209172, time.UTC), + modTime: time.Date(2018, 10, 11, 9, 22, 1, 958566131, time.UTC), }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", @@ -62,16 +62,16 @@ var Assets = func() http.FileSystem { compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\x31\x8a\xc3\x30\x10\x45\x7b\x9d\x62\x2e\xb0\x86\x6d\xd5\x6e\xbf\x18\xbc\x6c\x3f\x91\x7f\x8c\x88\xa4\x19\xa4\xc1\x10\x8c\xef\x1e\x2c\x52\x24\x24\xe9\x86\x79\xef\xc1\x67\x8d\xff\xa8\x2d\x4a\xf1\xb4\x7e\xbb\x4b\x2c\xb3\xa7\x09\x75\x8d\x01\x2e\xc3\x78\x66\x63\xef\x88\x0a\x67\x78\xda\xb6\xe1\x97\x33\xf6\xdd\x11\x25\x3e\x21\xb5\x83\x11\xb1\xea\x33\x7c\x0d\x9a\x22\x1c\xb2\x4a\xb5\x5e\x7d\xf5\xb3\x2b\x93\x22\x0c\xa3\x54\xbb\xb7\x5a\xc5\x24\x48\xf2\xf4\xf7\x33\xf6\x8f\x71\x5d\x60\xe3\xfb\xa0\x21\x21\x98\xd4\x8f\x5b\x66\x68\x92\x6b\x46\xb1\x20\xe5\x1c\x97\x07\x7e\x0b\x00\x00\xff\xff\x7c\x58\xa5\x67\x01\x01\x00\x00"), }, - "/servicebinding": &vfsgen۰CompressedFileInfo{ - name: "servicebinding", - modTime: time.Date(2018, 10, 11, 8, 34, 22, 172540726, time.UTC), - uncompressedSize: 204, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xcb\x31\xae\x83\x30\x10\x84\xe1\xde\xa7\xd8\x13\xf0\x44\xf7\xe4\x32\x07\xa0\x48\xa4\xf4\x83\x99\xa0\x15\xb0\x58\x5e\x8b\x06\x71\xf7\x08\xa5\x42\x49\x3b\xff\x37\xc8\xfa\x64\x71\x5d\x2d\x8a\xb3\x6c\x9a\x98\x50\x31\xaf\x63\x33\xfd\x7b\xa3\xeb\xdf\xd6\xf6\xac\x68\xc3\xa4\x36\x44\x79\x7c\xcc\x4d\x6d\x50\x1b\xc3\xc2\x8a\x01\x15\x31\x88\x18\x16\x46\xd9\xf7\xa6\xc3\xc2\xe3\x08\x22\x33\x7a\xce\x7e\x36\x11\xe4\x7c\x8d\xdf\x07\xcf\x4c\x27\x56\xf3\x0a\x4b\xbc\xf3\x15\x7f\x42\x11\x67\x2a\xac\xdd\x75\x7f\x07\x00\x00\xff\xff\x1a\x0a\x9e\xde\xcc\x00\x00\x00"), - }, "/servicecatalog": &vfsgen۰DirInfo{ name: "servicecatalog", - modTime: time.Date(2018, 10, 11, 8, 47, 22, 758807521, time.UTC), + modTime: time.Date(2018, 10, 11, 9, 25, 12, 784142577, time.UTC), + }, + "/servicecatalog/servicebinding": &vfsgen۰CompressedFileInfo{ + name: "servicebinding", + modTime: time.Date(2018, 10, 11, 9, 25, 12, 782687771, time.UTC), + uncompressedSize: 273, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8f\x31\x6e\xc3\x30\x0c\x45\x77\x9d\x82\x43\x67\x15\xd9\x0a\x01\x1d\xda\x03\x64\xa8\x81\xee\x8c\xfc\x6b\x10\xb1\x69\xc1\x14\xb2\x08\xbc\x7b\x21\xb7\xa9\x9b\x51\xff\xe9\xf1\x93\xad\x3d\x29\x2f\x78\x2b\x85\xd2\x2b\xc5\x33\x2f\x20\xf7\xd0\x1a\x6d\xac\x13\x28\x0e\x05\x39\x0e\xd8\x6e\x92\x61\xe4\xce\x45\x3e\xb1\x99\xac\x9a\xc8\x7e\xe2\xcc\x95\xe7\x75\x8a\xd7\x17\x8b\xb2\x3e\xdf\x4e\x17\x54\x3e\x85\xab\xe8\x98\xe8\x57\x7d\x17\x1d\x45\xa7\xb0\xa0\xf2\xc8\x95\x53\x20\xea\xc5\x89\x5a\xdb\x5b\xdd\x03\xd1\xcc\x17\xcc\xd6\x19\x11\x97\xd2\xe1\x7d\xbd\x9d\x1f\xce\xbf\xd8\x0a\x72\x57\x44\xad\xb2\x66\x7c\xe0\x2b\x3d\xfc\x3d\xe6\x1b\xf2\x86\x7a\xbe\xe7\xc3\xdf\x73\x3f\x19\x3a\xba\x7f\x07\x00\x00\xff\xff\x85\x6f\x46\xd9\x11\x01\x00\x00"), }, "/servicecatalog/serviceinstance": &vfsgen۰CompressedFileInfo{ name: "serviceinstance", @@ -83,7 +83,6 @@ var Assets = func() http.FileSystem { } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/innerloop"].(os.FileInfo), - fs["/servicebinding"].(os.FileInfo), fs["/servicecatalog"].(os.FileInfo), } fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ @@ -94,6 +93,7 @@ var Assets = func() http.FileSystem { fs["/innerloop/service"].(os.FileInfo), } fs["/servicecatalog"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/servicecatalog/servicebinding"].(os.FileInfo), fs["/servicecatalog/serviceinstance"].(os.FileInfo), } diff --git a/tmpl/servicebinding b/tmpl/servicebinding deleted file mode 100644 index 036784d..0000000 --- a/tmpl/servicebinding +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: servicecatalog.k8s.io/v1beta1 -kind: ServiceBinding -metadata: - name: {{.Name}} - labels: - app: {{.Name}} - name: {{.Name}} -spec: - instanceRef: - name: {{.Name}} - secretName: {{.Name}} \ No newline at end of file diff --git a/tmpl/servicecatalog/servicebinding b/tmpl/servicecatalog/servicebinding new file mode 100644 index 0000000..bba1ac0 --- /dev/null +++ b/tmpl/servicecatalog/servicebinding @@ -0,0 +1,13 @@ +{{$nameApp := .Name }} +{{ range .Spec.Services }}apiVersion: servicecatalog.k8s.io/v1beta1 +kind: ServiceBinding +metadata: + name: {{.Name}} + labels: + app: {{$nameApp}} + name: {{$nameApp}} +spec: + instanceRef: + name: {{.Name}} + secretName: {{.SecretName}} +{{end}} \ No newline at end of file From 804fe5dde6ef91e8603a527936053e6504fe179d Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 11 Oct 2018 17:54:14 +0200 Subject: [PATCH 20/62] Format code --- template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template.go b/template.go index bbc4484..2ad88d2 100644 --- a/template.go +++ b/template.go @@ -53,8 +53,8 @@ func init() { for _, p := range TemplatePath { err := vfsutil.Walk(TemplateAssets, p, walkFn) - if err != nil{ - log.Error(err.Error()) + if err != nil { + log.Error(err.Error()) } } From d473a04da660b18cb8e661dac30a90e64ff8c5a9 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 24 Oct 2018 19:16:15 +0200 Subject: [PATCH 21/62] Rename s2i to runtime --- tmpl/innerloop/deploymentconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 9b0d7fc..46daf58 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -37,7 +37,7 @@ spec: - name: {{.Name}} value: {{.Value}} {{end}} - image: "dev-s2i:latest" + image: "dev-runtime:latest" imagePullPolicy: Always name: {{.Name}} ports: @@ -83,4 +83,4 @@ spec: - {{.Name}} from: kind: ImageStreamTag - name: dev-s2i:latest \ No newline at end of file + name: dev-runtime:latest \ No newline at end of file From 3300a45b17361c750caec3e6db169363244a583d Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 24 Oct 2018 19:21:37 +0200 Subject: [PATCH 22/62] Reformat and regenerate the assets --- assets_vfsdata.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 2dcf5ba..3af5e34 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 11, 9, 9, 14, 352956734, time.UTC), + modTime: time.Date(2018, 10, 24, 15, 24, 12, 328765067, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 10, 11, 9, 9, 14, 351417908, time.UTC), - uncompressedSize: 2181, + modTime: time.Date(2018, 10, 24, 15, 24, 12, 328235236, time.UTC), + uncompressedSize: 2189, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcf\x6f\xeb\x36\x0c\xbe\xe7\xaf\x20\x7a\xb7\xfd\x5e\x81\x77\xd1\x3b\x65\x49\x37\xb4\x40\x3b\xa3\xe9\x72\x2d\x18\x99\x71\xd4\xe9\x17\x24\xd9\x43\x60\xf4\x7f\x1f\x14\xa7\x8e\x9c\x38\x2d\x36\x60\xf3\xc9\x22\xfd\x91\x1f\xc9\xcf\x14\x5a\xb1\x26\xe7\x85\xd1\x0c\xd0\x5a\x9f\x1b\x4b\xda\xef\xc4\x36\xe4\xc2\x14\xed\xf7\xd9\x9f\x42\x57\x0c\x96\x64\xa5\xd9\x2b\xd2\x61\x61\xf4\x56\xd4\x33\x45\x01\x2b\x0c\xc8\x66\x00\x12\x37\x24\x7d\x7c\x83\x18\x83\x41\xd7\xe5\x4f\xa8\xe8\xfd\x7d\x06\xa0\x51\x51\x6a\xf1\x96\x78\xfc\xd4\x91\x95\x82\xa3\x67\xf0\x7d\x06\xe0\x49\x12\x0f\xc6\x5d\x09\x02\x50\x0d\x04\xf8\x81\xc0\xd8\xef\x83\xc3\x40\xf5\xbe\x87\x87\xbd\x25\x06\xcf\x46\x4a\xa1\xeb\x19\x40\x20\x65\x25\x06\xea\xbd\x29\xf3\xf8\xa4\xec\xaf\x24\xff\x9a\x40\x7c\xce\x2b\x8d\xb6\x8f\x6a\xe3\xc3\x8d\x0e\x28\x34\xb9\x21\x59\x06\xe8\xea\x24\x75\x06\x19\x4f\x0e\x45\x8b\xae\x90\x62\x53\xf8\xc6\x92\x6b\x85\x37\xae\x2a\x62\xf6\xc4\x90\xc7\xf3\x80\xe1\x46\x29\xd4\x15\xfb\x2a\xc8\x46\xe8\xf4\x3c\x7c\x4e\xba\x4d\xb1\x7d\x45\x0f\xf3\xf5\xfc\x75\x5e\x96\xaf\xcb\xfb\xe7\xc1\x09\xd0\xa2\x6c\x88\x41\x71\x6a\x8c\x9f\x86\x2e\xef\x7e\xf9\xe3\xb7\x4b\xe0\x4d\x70\x0d\xdd\x7c\x02\x79\x2d\x7f\x7f\x7e\x99\xc0\xfd\xf8\xf6\xed\xc7\x15\x5c\x64\xf9\x30\x9f\x60\x89\xd6\xe6\x6f\xe8\x06\x47\xd7\x81\x43\x5d\x13\xe4\x2b\x4b\x3c\xbf\xd3\xad\x87\x64\xd8\xd9\xe4\x30\x47\x11\xbb\x2e\x5f\xc7\xb7\xc4\xd7\x75\xa4\xab\xe4\x2c\x14\xd6\x91\x70\x45\x6d\xe6\x6f\x05\x8b\x1a\xf4\xe1\x66\xec\x2f\x1b\x29\x4b\x23\x05\xdf\x33\x98\xcb\xbf\x70\x7f\xea\xe2\x35\x0e\xd6\xb8\x30\x52\xcd\xa0\xac\xd2\xb8\x70\x40\x1c\xaa\x8a\xa7\x11\x75\xeb\x4c\x30\xdc\x48\x06\x2f\x8b\x72\xb0\xb7\x46\x36\x8a\x1e\x4d\xa3\xc7\x51\x55\xb4\x94\x18\x76\x6c\x52\x44\x49\xdc\x9e\xa8\xdf\xa1\xa3\x2a\x8b\xff\xd6\x95\x28\x41\xd9\x02\x5d\x10\x5b\xe4\x89\x58\x3e\xf0\xea\x36\xc5\x0a\x2d\xe2\xae\xb9\xf8\x63\x26\x25\xba\x78\x5c\xae\x2e\x47\xe4\x1a\x9d\xbd\x61\x8b\xac\x68\xbc\x2b\xa4\xe1\x28\x0b\x7f\x2b\x0a\xd7\xe8\x9f\xdc\x28\x2b\x24\x4d\xfa\xd1\x7b\x52\x1b\x49\x3f\x37\x8d\x90\x15\x4b\x15\x5e\x1c\x4c\x68\xed\xc5\x90\x3f\x9a\xbe\x3a\x75\xa8\x1f\xdb\xbf\x1c\x3b\x37\x76\x9f\x4d\xb5\xdb\x91\x37\x8d\xe3\xe4\x19\x74\xa7\xe1\x06\x72\x4a\x68\x0c\xc2\xe8\x47\xf2\x3e\x66\xe8\x7b\x5e\x51\x5b\x24\xce\x4c\x9a\xfa\x33\xd0\x91\xd2\xaf\x42\xd2\xff\x20\x90\x3e\x72\x3a\x5d\x65\xc3\x7e\x29\xdc\xa8\xb6\x6b\xe8\x6c\x52\x38\x00\x36\x5e\x68\x3e\x90\x0e\xeb\x43\xfc\x85\x44\xa1\x58\x42\x87\x47\xc3\xd3\x19\x36\x38\x51\xd7\x47\xa9\x65\xc7\x3b\xe4\x3e\x8e\x6a\xb1\x8b\x9b\x62\x36\x8c\xae\x3f\x97\xe8\x50\x0d\xcc\xb1\x09\x46\x61\x10\x9c\x41\x5c\x6b\xe7\x1b\x3f\xe6\x4a\xaa\xbc\x32\xdb\xad\x33\x09\xcd\xfe\xe2\x3d\x30\x58\x05\x47\xa8\x5e\xb0\xfe\x42\x23\x47\xa9\xfd\xf7\x05\x9c\xef\xa4\x7f\xcc\x7c\xbc\x12\xff\x0e\x00\x00\xff\xff\x10\xdf\x2e\xb7\x85\x08\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xc3\x36\x0c\xbd\xe7\x57\x10\xbd\xdb\x6e\x0b\xf4\xa2\x9e\xb2\xa4\x1b\x5a\xa0\x9d\xd1\x74\xb9\x16\x8c\xcc\x38\xea\xf4\x05\x49\xf6\x10\x18\xfd\xef\x83\xe2\xd4\x51\x12\xa7\xc5\x06\x6c\x3e\x59\xa4\x1f\xf9\x48\x3e\x53\x68\xc5\x92\x9c\x17\x46\x33\x40\x6b\x7d\x6e\x2c\x69\xbf\x11\xeb\x90\x0b\x53\xb4\x37\x93\x3f\x85\xae\x18\xcc\xc9\x4a\xb3\x55\xa4\xc3\xcc\xe8\xb5\xa8\x27\x8a\x02\x56\x18\x90\x4d\x00\x24\xae\x48\xfa\xf8\x06\x31\x06\x83\xae\xcb\x5f\x50\xd1\xe7\xe7\x04\x40\xa3\xa2\xd4\xe2\x2d\xf1\xf8\xa9\x23\x2b\x05\x47\xcf\xe0\x66\x02\xe0\x49\x12\x0f\xc6\x5d\x08\x02\x50\x0d\x04\xf8\x8e\xc0\xb1\xdf\x07\x87\x81\xea\x6d\x0f\x0f\x5b\x4b\x0c\x5e\x8d\x94\x42\xd7\x13\x80\x40\xca\x4a\x0c\xd4\x7b\x53\xe6\xf1\x49\xd9\x5f\x48\xfe\x33\x81\xf8\x9c\x56\x1a\x6d\x5f\xd5\xc6\x87\x1b\x1d\x50\x68\x72\x43\xb2\x0c\xd0\xd5\x49\xea\x0c\x32\x9e\x1c\x8a\x16\x5d\x21\xc5\xaa\xf0\x8d\x25\xd7\x0a\x6f\x5c\x55\xc4\xec\x89\x21\x8f\xe7\x01\xc3\x8d\x52\xa8\x2b\xf6\x53\x90\x95\xd0\xe9\x79\xf8\x9c\x74\x9b\x62\xfb\x8a\x9e\xa6\xcb\xe9\xfb\xb4\x2c\xdf\xe7\x8f\xaf\x83\x13\xa0\x45\xd9\x10\x83\xe2\xd0\x18\x3f\x0e\x9d\x3f\xfc\xf2\xc7\x6f\xe7\xc0\xab\xe0\x1a\xba\xfa\x06\xf2\x5e\xfe\xfe\xfa\x36\x82\xbb\xbb\xbe\xbe\xbb\x80\x8b\x2c\x9f\xa6\x23\x2c\xd1\xda\xfc\x03\xdd\xe0\xe8\x3a\x70\xa8\x6b\x82\x7c\x61\x89\xe7\x0f\xba\xf5\x90\x0c\x3b\x1b\x1d\xe6\x51\xc4\xae\xcb\x97\xf1\x2d\xf1\x75\x1d\xe9\x2a\x39\x0b\x85\x75\x24\x5c\x51\x9b\xb9\x46\x07\xa1\x88\x45\x1d\xfa\x70\x75\xfc\x4d\xd9\x48\x59\x1a\x29\xf8\x96\xc1\x54\xfe\x85\xdb\x43\x27\x2f\xf1\xb0\xc6\x85\x23\xe5\x0c\xea\x2a\x8d\x0b\x3b\xc4\xae\xb2\x78\x3a\xa2\x6f\x9d\x09\x86\x1b\xc9\xe0\x6d\x56\x0e\xf6\xd6\xc8\x46\xd1\xb3\x69\xf4\x71\x54\x15\x2d\x25\x86\x0d\x1b\x15\x52\x12\xb7\x27\xea\x37\xe8\xa8\xca\xe2\xff\x75\x21\x4a\x50\xb6\x40\x17\xc4\x1a\x79\x22\x98\x2f\xbc\xba\x4d\xb1\x42\x8b\xb8\x6f\xce\xfe\x9a\x51\x99\xce\x9e\xe7\x8b\xf3\x31\xb9\x46\x67\x1f\xd8\x22\x2b\x1a\xef\x0a\x69\x38\xca\xc2\xdf\x8a\xc2\x35\xfa\x9e\x1b\x65\x85\xa4\x51\x3f\x7a\x4f\x6a\x25\xe9\x7e\xd5\x08\x59\xb1\x54\xe5\xc5\xce\x84\xd6\x9e\x0d\xfa\xab\xe9\x8b\x43\x87\xfa\xb1\xfd\xcb\xb1\x73\x63\xb7\xd9\x58\xbb\x1d\x79\xd3\x38\x4e\x9e\x41\x77\x18\x6e\x20\xa7\x84\xc6\x20\x8c\x7e\x26\xef\x63\x86\xbe\xe7\x15\xb5\x45\xe2\xcc\xa4\xa9\xbf\x03\xed\x29\xfd\x2a\x24\xfd\x0f\x02\xe9\x23\xa7\xd3\x55\x36\x6c\xe7\xc2\x1d\xd5\x76\x09\x9d\x8d\x0a\x07\xc0\xc6\x4b\xcd\x07\xd2\x61\xb9\x8b\x3f\x93\x28\x14\x4b\xe8\xf0\x68\x78\x39\xc1\x06\x27\xea\x7a\x2f\xb5\x6c\x7f\x8f\x3c\xc6\x51\xcd\x36\x71\x5b\x4c\x86\xd1\xf5\xe7\x12\x1d\xaa\x81\x39\x36\xc1\x28\x0c\x82\x33\x88\xab\xed\x74\xeb\xc7\x5c\x49\x95\x17\x66\xbb\x76\x26\xa1\xd9\x5f\xbe\x3b\x06\x8b\xe0\x08\xd5\x1b\xd6\x3f\x68\x64\x2f\xb5\xff\xbe\x80\xd3\x9d\xf4\x8f\x99\x9f\xaf\xc5\xbf\x03\x00\x00\xff\xff\x8b\xdf\xfb\xac\x8d\x08\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", From 854152847e7cb28cf5a14210f2c2cdedc6de9b47 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Thu, 25 Oct 2018 13:03:48 +0200 Subject: [PATCH 23/62] Remove code not longer used. Externalize EnvVars with default value creation --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/deploymentconfig | 8 -------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 3af5e34..8e1526b 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 24, 15, 24, 12, 328765067, time.UTC), + modTime: time.Date(2018, 10, 25, 10, 19, 7, 400743052, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 10, 24, 15, 24, 12, 328235236, time.UTC), - uncompressedSize: 2189, + modTime: time.Date(2018, 10, 25, 10, 19, 7, 400110771, time.UTC), + uncompressedSize: 1969, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xc3\x36\x0c\xbd\xe7\x57\x10\xbd\xdb\x6e\x0b\xf4\xa2\x9e\xb2\xa4\x1b\x5a\xa0\x9d\xd1\x74\xb9\x16\x8c\xcc\x38\xea\xf4\x05\x49\xf6\x10\x18\xfd\xef\x83\xe2\xd4\x51\x12\xa7\xc5\x06\x6c\x3e\x59\xa4\x1f\xf9\x48\x3e\x53\x68\xc5\x92\x9c\x17\x46\x33\x40\x6b\x7d\x6e\x2c\x69\xbf\x11\xeb\x90\x0b\x53\xb4\x37\x93\x3f\x85\xae\x18\xcc\xc9\x4a\xb3\x55\xa4\xc3\xcc\xe8\xb5\xa8\x27\x8a\x02\x56\x18\x90\x4d\x00\x24\xae\x48\xfa\xf8\x06\x31\x06\x83\xae\xcb\x5f\x50\xd1\xe7\xe7\x04\x40\xa3\xa2\xd4\xe2\x2d\xf1\xf8\xa9\x23\x2b\x05\x47\xcf\xe0\x66\x02\xe0\x49\x12\x0f\xc6\x5d\x08\x02\x50\x0d\x04\xf8\x8e\xc0\xb1\xdf\x07\x87\x81\xea\x6d\x0f\x0f\x5b\x4b\x0c\x5e\x8d\x94\x42\xd7\x13\x80\x40\xca\x4a\x0c\xd4\x7b\x53\xe6\xf1\x49\xd9\x5f\x48\xfe\x33\x81\xf8\x9c\x56\x1a\x6d\x5f\xd5\xc6\x87\x1b\x1d\x50\x68\x72\x43\xb2\x0c\xd0\xd5\x49\xea\x0c\x32\x9e\x1c\x8a\x16\x5d\x21\xc5\xaa\xf0\x8d\x25\xd7\x0a\x6f\x5c\x55\xc4\xec\x89\x21\x8f\xe7\x01\xc3\x8d\x52\xa8\x2b\xf6\x53\x90\x95\xd0\xe9\x79\xf8\x9c\x74\x9b\x62\xfb\x8a\x9e\xa6\xcb\xe9\xfb\xb4\x2c\xdf\xe7\x8f\xaf\x83\x13\xa0\x45\xd9\x10\x83\xe2\xd0\x18\x3f\x0e\x9d\x3f\xfc\xf2\xc7\x6f\xe7\xc0\xab\xe0\x1a\xba\xfa\x06\xf2\x5e\xfe\xfe\xfa\x36\x82\xbb\xbb\xbe\xbe\xbb\x80\x8b\x2c\x9f\xa6\x23\x2c\xd1\xda\xfc\x03\xdd\xe0\xe8\x3a\x70\xa8\x6b\x82\x7c\x61\x89\xe7\x0f\xba\xf5\x90\x0c\x3b\x1b\x1d\xe6\x51\xc4\xae\xcb\x97\xf1\x2d\xf1\x75\x1d\xe9\x2a\x39\x0b\x85\x75\x24\x5c\x51\x9b\xb9\x46\x07\xa1\x88\x45\x1d\xfa\x70\x75\xfc\x4d\xd9\x48\x59\x1a\x29\xf8\x96\xc1\x54\xfe\x85\xdb\x43\x27\x2f\xf1\xb0\xc6\x85\x23\xe5\x0c\xea\x2a\x8d\x0b\x3b\xc4\xae\xb2\x78\x3a\xa2\x6f\x9d\x09\x86\x1b\xc9\xe0\x6d\x56\x0e\xf6\xd6\xc8\x46\xd1\xb3\x69\xf4\x71\x54\x15\x2d\x25\x86\x0d\x1b\x15\x52\x12\xb7\x27\xea\x37\xe8\xa8\xca\xe2\xff\x75\x21\x4a\x50\xb6\x40\x17\xc4\x1a\x79\x22\x98\x2f\xbc\xba\x4d\xb1\x42\x8b\xb8\x6f\xce\xfe\x9a\x51\x99\xce\x9e\xe7\x8b\xf3\x31\xb9\x46\x67\x1f\xd8\x22\x2b\x1a\xef\x0a\x69\x38\xca\xc2\xdf\x8a\xc2\x35\xfa\x9e\x1b\x65\x85\xa4\x51\x3f\x7a\x4f\x6a\x25\xe9\x7e\xd5\x08\x59\xb1\x54\xe5\xc5\xce\x84\xd6\x9e\x0d\xfa\xab\xe9\x8b\x43\x87\xfa\xb1\xfd\xcb\xb1\x73\x63\xb7\xd9\x58\xbb\x1d\x79\xd3\x38\x4e\x9e\x41\x77\x18\x6e\x20\xa7\x84\xc6\x20\x8c\x7e\x26\xef\x63\x86\xbe\xe7\x15\xb5\x45\xe2\xcc\xa4\xa9\xbf\x03\xed\x29\xfd\x2a\x24\xfd\x0f\x02\xe9\x23\xa7\xd3\x55\x36\x6c\xe7\xc2\x1d\xd5\x76\x09\x9d\x8d\x0a\x07\xc0\xc6\x4b\xcd\x07\xd2\x61\xb9\x8b\x3f\x93\x28\x14\x4b\xe8\xf0\x68\x78\x39\xc1\x06\x27\xea\x7a\x2f\xb5\x6c\x7f\x8f\x3c\xc6\x51\xcd\x36\x71\x5b\x4c\x86\xd1\xf5\xe7\x12\x1d\xaa\x81\x39\x36\xc1\x28\x0c\x82\x33\x88\xab\xed\x74\xeb\xc7\x5c\x49\x95\x17\x66\xbb\x76\x26\xa1\xd9\x5f\xbe\x3b\x06\x8b\xe0\x08\xd5\x1b\xd6\x3f\x68\x64\x2f\xb5\xff\xbe\x80\xd3\x9d\xf4\x8f\x99\x9f\xaf\xc5\xbf\x03\x00\x00\xff\xff\x8b\xdf\xfb\xac\x8d\x08\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4f\x6f\xdb\x3a\x0c\xbf\xe7\x53\x08\xbd\x3b\x46\x7b\x54\x4f\x0f\xe9\x7b\xc0\x3b\xb4\x08\x96\xa2\x77\x46\x66\x1c\x6e\xfa\x07\x8a\xf6\x10\x04\xfd\xee\x83\xe2\xd4\x91\xf3\x67\xc5\x06\x6c\x3a\x99\xa4\x48\xfe\xc8\x1f\x45\x43\xa4\x37\xe4\x44\xc1\x6b\x05\x31\xa6\x79\x88\xe8\xd3\x96\x36\x32\xa7\x50\xf7\xf7\xb3\x6f\xe4\x1b\xad\x9e\x30\xda\xb0\x73\xe8\x65\x11\xfc\x86\xda\x99\x43\x81\x06\x04\xf4\x4c\x29\x0b\x6b\xb4\x29\x7f\xa9\x1c\x43\xab\xfd\x7e\xfe\x02\x0e\xdf\xdf\x67\x4a\x79\x70\x58\x6a\x52\x44\x93\xaf\x32\x46\x4b\x06\x92\x56\xf7\x33\xa5\x12\x5a\x34\x12\xf8\x46\x10\xa5\x9a\x11\x80\x39\x00\x98\xda\x93\x30\x08\xb6\xbb\xc1\x5d\x76\x11\xb5\xfa\x12\xac\x25\xdf\xce\x94\x12\x74\xd1\x82\xe0\x60\x2d\x91\xe7\x53\xa2\xbf\x91\xfc\x73\x00\xf9\x9c\x57\x9a\x75\x1f\xd5\xe6\x63\x82\x17\x20\x8f\x3c\x26\xab\x14\x70\x5b\xa4\xae\x54\x65\x0a\xa1\xee\x81\x6b\x4b\xeb\x3a\x75\x11\xb9\xa7\x14\xb8\xa9\x73\xf6\x42\x31\xcf\xf2\xe8\x63\x82\x73\xe0\x1b\xfd\x59\x90\x35\xf9\x52\x1e\xaf\xa3\xef\x4f\xbe\xfb\xbd\x62\xf0\x2d\xaa\xf9\x2a\xa2\x99\xff\xeb\xfb\xa4\x8a\x86\x54\x57\x0b\x1e\x4e\x0f\xb6\x1b\x4c\x6f\xf9\xab\xb0\xed\xf7\xe8\x9b\x42\x26\x07\x2d\x6a\x75\xd7\x60\x5f\x71\xe7\x85\x1c\xea\xcc\x55\x92\xbb\xe9\x9d\x65\x67\xed\x32\x58\x32\x3b\xad\xfe\xb1\xdf\x61\x97\x46\xfb\x2d\x1c\x31\xb0\x4c\xba\x3b\x32\xb0\x0c\x2c\x07\x8f\x43\x65\x59\x9a\xc0\x8f\x1c\x24\x98\x60\xb5\x7a\x5d\x2c\x47\x7d\x1f\x6c\xe7\xf0\x39\x74\x7e\x1a\xd5\x65\xcd\x12\x64\xab\xaf\x36\xbb\x88\x3b\x00\x4d\x5b\x60\x6c\xaa\x3c\x83\x37\xa2\x88\x8b\x35\xb0\xd0\x06\x8c\xa4\x0b\x7f\xf7\x50\xfa\x92\xa7\xfc\x26\x2f\x26\x6b\x42\xe5\x07\x57\x8b\xe7\xa7\xd5\x25\x4d\xdc\xf9\xea\x2b\xf4\xa0\xeb\x2e\x71\x6d\x83\x01\x5b\xa7\x07\xaa\xb9\xf3\x8f\x26\xb8\x48\x16\xaf\xda\x21\x25\x74\x6b\x8b\x8f\xeb\x8e\x6c\xa3\xeb\xd3\x13\x49\xf5\x41\x05\x31\x5e\x10\xfd\xd1\xf4\xd5\xa9\x43\x03\x6d\xbf\x49\xbb\x09\x71\x57\x5d\x6b\x37\x63\x0a\x1d\x1b\x4c\x5a\xed\x4f\xe4\x0a\xb2\x23\x0f\x42\xc1\x3f\x63\x4a\x39\xc3\xd0\xf3\x06\xfb\xba\x30\x56\x36\xb4\x3f\x73\x3a\x42\xfa\x8f\x2c\xfe\x85\x01\x19\x22\x97\xec\xba\x28\xbb\x27\xe2\x49\x6d\xb7\xbc\xab\xab\x83\xa3\x54\xcc\x8b\x3f\x09\x7a\x79\x3b\xc4\x5f\x58\x20\xa7\x0b\x38\x26\x2b\x5e\xce\x7c\x85\xa9\x6d\x8f\xa3\x56\x1d\x77\xed\xff\x99\xaa\xc5\x36\x6f\x8b\xd9\x48\xdd\x20\x2f\x81\xc1\x8d\xc8\xa1\x93\xe0\x40\xc8\x68\x25\xdc\xe1\xf9\x66\xcc\xb9\x8a\x2a\x6f\x70\xbb\xe1\x50\xc0\x1c\x7e\x50\x07\x04\x2b\x61\x04\xf7\x0a\xed\x27\x33\x72\x1c\xb5\x3f\x5f\xc0\xf9\x4e\xfa\x65\xe4\x97\x6b\xf1\x47\x00\x00\x00\xff\xff\x72\xed\x96\x09\xb1\x07\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 46daf58..f20902f 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -25,14 +25,6 @@ spec: command: - /var/lib/supervisord/bin/supervisord env: - - name: JAVA_APP_DIR - value: /deployments - - name: JAVA_DEBUG - value: "true" - - name: JAVA_DEBUG_PORT - value: "5005" - - name: JAVA_APP_JAR - value: app.jar {{ range .Spec.Envs }} - name: {{.Name}} value: {{.Value}} From 8dee01032258cf5a0516d006f01234cffc5b604e Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Fri, 16 Nov 2018 19:36:44 +0100 Subject: [PATCH 24/62] add userInfo extra to fix the permission issue --- tmpl/servicecatalog/serviceinstance | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tmpl/servicecatalog/serviceinstance b/tmpl/servicecatalog/serviceinstance index 0c914c7..4fbfa77 100644 --- a/tmpl/servicecatalog/serviceinstance +++ b/tmpl/servicecatalog/serviceinstance @@ -10,4 +10,8 @@ spec: clusterServiceClassExternalName: {{.Class}} clusterServicePlanExternalName: {{.Plan}} parameters: {{.ParametersJSon}} + userInfo: + extra: + scopes.authorization.openshift.io: + - 'user:full' {{end}} \ No newline at end of file From 15c53a64461b2e25619abb7e9cd9ba3e7be3b092 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Mon, 19 Nov 2018 09:36:50 +0100 Subject: [PATCH 25/62] Remove non needed userInfo section fron serviceinstance. See github.com/openshift/ansible-service-broker/issues/1135 --- tmpl/servicecatalog/serviceinstance | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tmpl/servicecatalog/serviceinstance b/tmpl/servicecatalog/serviceinstance index 4fbfa77..0c914c7 100644 --- a/tmpl/servicecatalog/serviceinstance +++ b/tmpl/servicecatalog/serviceinstance @@ -10,8 +10,4 @@ spec: clusterServiceClassExternalName: {{.Class}} clusterServicePlanExternalName: {{.Plan}} parameters: {{.ParametersJSon}} - userInfo: - extra: - scopes.authorization.openshift.io: - - 'user:full' {{end}} \ No newline at end of file From 6ad4f760367430c6dfbc969ac5df355e3bc44530 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Mon, 19 Nov 2018 10:20:50 +0100 Subject: [PATCH 26/62] Execute gofmt on the code to reformnat it --- assets_vfsdata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 8e1526b..91581cd 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -118,7 +118,7 @@ func (fs vfsgen۰FS) Open(path string) (http.File, error) { } return &vfsgen۰CompressedFile{ vfsgen۰CompressedFileInfo: f, - gr: gr, + gr: gr, }, nil case *vfsgen۰DirInfo: return &vfsgen۰Dir{ From b9ba90d564f46d2ab7996339403e724dc5069516 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 20 Nov 2018 20:22:41 +0100 Subject: [PATCH 27/62] Add command to start nodejs --- tmpl/innerloop/imagestream | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index a34badb..a13ca03 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -15,7 +15,7 @@ items: tags: - {{if .AnnotationCmds}} annotations: - cmds: "run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" + cmds: "run-java:/usr/local/s2i/run;run-node:/usr/libexec/s2i;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" {{end}} from: kind: DockerImage From 9ac9c4c311cb9480d451293f99fea36dac4d411a Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 20 Nov 2018 20:24:01 +0100 Subject: [PATCH 28/62] Regenerate assets for imagestream template --- assets_vfsdata.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 91581cd..3ffb217 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 10, 25, 10, 19, 7, 400743052, time.UTC), + modTime: time.Date(2018, 11, 20, 19, 22, 4, 197188479, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", @@ -36,10 +36,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 10, 8, 10, 12, 58, 129088114, time.UTC), - uncompressedSize: 620, + modTime: time.Date(2018, 11, 20, 19, 22, 4, 196654178, time.UTC), + uncompressedSize: 646, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\xeb\xdb\x30\x0c\xc5\xef\xf9\x14\xe2\xcf\xae\x4d\xf8\xef\xe8\xb2\x43\xd9\x2e\x83\x31\xc6\x0a\xbb\xab\x8e\xd2\x79\xb5\x2d\x61\x39\x85\x62\xf2\xdd\x47\x1d\x37\xed\x60\x27\xdb\x3f\xe9\x49\xcf\xaf\x94\x0f\x11\x03\x1d\x44\xc0\x7c\x82\xfe\x3b\x06\x82\x65\x41\x71\xbf\x28\xa9\xe3\x68\xe0\xfa\xde\x5d\x5c\x1c\x0d\x7c\x73\x9a\x3b\x97\x29\xa8\xe9\x4a\x81\x84\xf1\x4c\xd0\x1f\x85\x6c\xff\x35\xe0\x99\x14\x96\xa5\xdb\xc1\xab\xd6\xdd\x79\xcf\x42\x51\x7f\xbb\x29\xf7\x8e\x87\xeb\x7b\x07\xb0\x0e\xac\xaa\x63\x4e\x84\xa1\x03\x08\x94\x71\xc4\x8c\xa6\x03\x00\xf0\x78\x22\xaf\xeb\x1d\x00\x45\x0c\x3c\xad\x2e\x4b\xe5\xf7\xd7\x1d\x57\xd7\x95\xa9\x90\x6d\x7a\xe6\xcb\x2c\x3f\xd8\x3b\x7b\x7b\x4c\xf1\x6c\xd1\x1b\x98\xd0\x2b\x55\x54\x8a\x9b\xa0\xff\xc2\xf6\x42\xa9\x9a\x69\x83\x33\x9e\xdb\xea\x5d\xeb\x39\xc4\xc8\x19\xb3\xe3\xf8\x39\x8c\xda\xda\x00\x70\xc3\x9b\x55\x00\x1b\x46\x35\xf0\x96\xe6\xb8\xfb\x83\x57\x34\xc3\xac\x69\xa8\xbb\x07\xfd\xe8\x86\x34\xc7\xbd\xe5\x20\xce\xd3\x7f\xeb\xa8\x4a\xe1\xe4\x69\x7f\x9a\x9d\x1f\xcd\x30\x92\x78\xbe\x05\x8a\x59\x87\x8a\x50\xe4\xad\x2d\x2b\x85\xe2\xb8\xb9\x99\x12\x87\xa7\x8d\x35\xe3\x97\xcf\x6d\x95\x2d\xb7\x9f\x24\xbc\xa9\x5d\x10\x4e\xb9\x25\x06\xe5\x81\xd7\x66\x8f\x99\x34\x37\x94\x68\xa2\x44\xd1\xd2\xbf\xf1\x02\xe4\x9b\x90\x81\x23\xcf\xc9\x3e\x02\xae\xfe\xda\xf1\x37\x00\x00\xff\xff\xec\x98\x21\x83\x6c\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x8b\xdb\x30\x10\x85\xef\xfe\x15\xc3\xd2\x6b\x6c\xb6\x47\x85\x1e\x96\xf6\x52\x28\xa5\x34\xd0\xfb\x44\x1e\xa7\x6a\x24\xcd\xa0\x91\x43\x83\xf0\x7f\x2f\x96\x15\xef\x16\xf6\x64\xfb\x7b\xf3\x66\x9e\x5f\x29\x1f\x22\x06\x7a\x11\x01\xf3\x09\xfa\xef\x18\x08\x96\x05\xc5\xfd\xa2\xa4\x8e\xa3\x81\xdb\x73\x77\x75\x71\x34\xf0\xcd\x69\xee\x5c\xa6\xa0\xa6\x2b\x05\x12\xc6\x0b\x41\x7f\x12\xb2\xfd\xd7\x80\x17\x52\x58\x96\xee\x00\x6f\xbd\x6e\xe5\x3d\x0b\x45\xfd\xed\xa6\xdc\x3b\x1e\x6e\xcf\x1d\xc0\xb6\xb0\xba\x4e\x39\x11\x86\x0e\x20\x50\xc6\x11\x33\x9a\x0e\x00\xc0\xe3\x99\xbc\x6e\xef\x00\x28\x62\xe0\x35\xea\xb2\x54\xbe\x7e\xad\xb8\xa6\xae\x4c\x85\x6c\xf3\x33\x5f\x67\xf9\xc1\xde\xd9\xfb\x63\x8b\x67\x8b\xde\xc0\x84\x5e\xa9\xa2\x52\xdc\x04\xfd\x17\xb6\x57\x4a\x35\x4c\x5b\x9c\xf1\xd2\x4e\x1f\xda\xcc\x4b\x8c\x9c\x31\x3b\x8e\x9f\xc3\xa8\x6d\x0c\x00\x77\xbc\x47\x05\xb0\x61\x54\x03\x4f\x69\x8e\x87\x3f\x78\x43\x33\xcc\x9a\x86\x7a\x7b\xd0\x8f\x6e\x48\x73\x3c\xae\x5a\xe4\x91\x9a\xe6\xce\xf4\x97\xec\xaa\x1e\x2d\x07\x71\x9e\xde\x75\xa2\x2a\x85\xb3\xa7\xe3\x79\x76\x7e\x34\xc3\x48\xe2\xf9\x1e\x28\x66\x1d\x2a\x42\x91\xa7\x16\xa3\x14\x8a\xe3\x9e\x73\x4a\x1c\x5e\x03\x6e\xed\xbf\xf9\xed\x5d\xd9\x1b\xfd\x49\xc2\xbb\xdb\x05\xe1\x94\x5b\x97\x50\x1e\x78\x1b\xf6\x98\x49\x73\x43\x89\x26\x4a\x14\x2d\xfd\x5f\x3c\x40\xbe\x0b\x19\x38\xf1\x9c\xec\xa3\xfa\x9a\xaf\x3d\xfe\x05\x00\x00\xff\xff\x5d\x16\x95\x07\x86\x02\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", @@ -64,7 +64,7 @@ var Assets = func() http.FileSystem { }, "/servicecatalog": &vfsgen۰DirInfo{ name: "servicecatalog", - modTime: time.Date(2018, 10, 11, 9, 25, 12, 784142577, time.UTC), + modTime: time.Date(2018, 11, 19, 8, 35, 54, 754265971, time.UTC), }, "/servicecatalog/servicebinding": &vfsgen۰CompressedFileInfo{ name: "servicebinding", @@ -75,7 +75,7 @@ var Assets = func() http.FileSystem { }, "/servicecatalog/serviceinstance": &vfsgen۰CompressedFileInfo{ name: "serviceinstance", - modTime: time.Date(2018, 10, 11, 8, 47, 22, 758236171, time.UTC), + modTime: time.Date(2018, 11, 19, 8, 35, 54, 753585081, time.UTC), uncompressedSize: 333, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x90\xbd\x6a\x04\x21\x14\x85\x7b\x9f\xe2\x16\xa9\x0d\xdb\x05\x21\x45\x08\x29\x92\x62\x09\x0c\xa4\x3f\xeb\x5c\x16\x59\xe7\x8e\x78\xcd\x12\x10\xdf\x3d\xe8\xee\xe4\x87\x2d\xfd\xce\x39\x7e\x62\xad\x77\x82\x85\x9f\x52\x22\xf7\x48\x76\x8f\x85\xa9\x35\x53\x2b\x65\xc8\x91\xc9\x4e\x89\xbd\x9d\x38\x9f\x83\x67\xa5\xd6\x90\xc2\x07\x67\x0d\xab\x38\xd2\x0b\xf6\x28\x88\xeb\xd1\x9e\x1e\xd4\x86\xf5\xfe\xbc\x3b\x70\xc1\xce\x9c\x82\xcc\x8e\xae\xd3\x57\xd1\x02\xf1\x6c\x16\x2e\x98\x51\xe0\x0c\x51\x37\x3b\xaa\x75\x68\x5b\x33\x44\x11\x07\x8e\xda\x33\x22\xa4\xd4\xc3\xed\x7d\x23\xff\xdd\xfc\xc1\x9a\xd8\xf7\x89\x8f\x9f\x5a\x38\x5f\x8d\xcf\x11\xaa\x2f\x5f\x85\xb3\x20\xee\x37\xd3\xa0\xe3\xaa\xff\xed\xf7\x08\xb9\x29\x77\x38\xba\x09\x19\x0b\x17\xce\x7a\xe1\x3f\xc7\xb7\x69\x95\xf1\x5d\x2c\x73\x6b\xdf\x01\x00\x00\xff\xff\xdd\xed\x80\x29\x4d\x01\x00\x00"), From 8d4c618b4904f5c2959732537c9a4177a38f671b Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 20 Nov 2018 21:32:47 +0100 Subject: [PATCH 29/62] Add missing nodejs path --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/deploymentconfig | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 3ffb217..76324fc 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 11, 20, 19, 22, 4, 197188479, time.UTC), + modTime: time.Date(2018, 11, 20, 20, 31, 54, 14633840, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 10, 25, 10, 19, 7, 400110771, time.UTC), - uncompressedSize: 1969, + modTime: time.Date(2018, 11, 20, 20, 31, 54, 12796477, time.UTC), + uncompressedSize: 1999, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4f\x6f\xdb\x3a\x0c\xbf\xe7\x53\x08\xbd\x3b\x46\x7b\x54\x4f\x0f\xe9\x7b\xc0\x3b\xb4\x08\x96\xa2\x77\x46\x66\x1c\x6e\xfa\x07\x8a\xf6\x10\x04\xfd\xee\x83\xe2\xd4\x91\xf3\x67\xc5\x06\x6c\x3a\x99\xa4\x48\xfe\xc8\x1f\x45\x43\xa4\x37\xe4\x44\xc1\x6b\x05\x31\xa6\x79\x88\xe8\xd3\x96\x36\x32\xa7\x50\xf7\xf7\xb3\x6f\xe4\x1b\xad\x9e\x30\xda\xb0\x73\xe8\x65\x11\xfc\x86\xda\x99\x43\x81\x06\x04\xf4\x4c\x29\x0b\x6b\xb4\x29\x7f\xa9\x1c\x43\xab\xfd\x7e\xfe\x02\x0e\xdf\xdf\x67\x4a\x79\x70\x58\x6a\x52\x44\x93\xaf\x32\x46\x4b\x06\x92\x56\xf7\x33\xa5\x12\x5a\x34\x12\xf8\x46\x10\xa5\x9a\x11\x80\x39\x00\x98\xda\x93\x30\x08\xb6\xbb\xc1\x5d\x76\x11\xb5\xfa\x12\xac\x25\xdf\xce\x94\x12\x74\xd1\x82\xe0\x60\x2d\x91\xe7\x53\xa2\xbf\x91\xfc\x73\x00\xf9\x9c\x57\x9a\x75\x1f\xd5\xe6\x63\x82\x17\x20\x8f\x3c\x26\xab\x14\x70\x5b\xa4\xae\x54\x65\x0a\xa1\xee\x81\x6b\x4b\xeb\x3a\x75\x11\xb9\xa7\x14\xb8\xa9\x73\xf6\x42\x31\xcf\xf2\xe8\x63\x82\x73\xe0\x1b\xfd\x59\x90\x35\xf9\x52\x1e\xaf\xa3\xef\x4f\xbe\xfb\xbd\x62\xf0\x2d\xaa\xf9\x2a\xa2\x99\xff\xeb\xfb\xa4\x8a\x86\x54\x57\x0b\x1e\x4e\x0f\xb6\x1b\x4c\x6f\xf9\xab\xb0\xed\xf7\xe8\x9b\x42\x26\x07\x2d\x6a\x75\xd7\x60\x5f\x71\xe7\x85\x1c\xea\xcc\x55\x92\xbb\xe9\x9d\x65\x67\xed\x32\x58\x32\x3b\xad\xfe\xb1\xdf\x61\x97\x46\xfb\x2d\x1c\x31\xb0\x4c\xba\x3b\x32\xb0\x0c\x2c\x07\x8f\x43\x65\x59\x9a\xc0\x8f\x1c\x24\x98\x60\xb5\x7a\x5d\x2c\x47\x7d\x1f\x6c\xe7\xf0\x39\x74\x7e\x1a\xd5\x65\xcd\x12\x64\xab\xaf\x36\xbb\x88\x3b\x00\x4d\x5b\x60\x6c\xaa\x3c\x83\x37\xa2\x88\x8b\x35\xb0\xd0\x06\x8c\xa4\x0b\x7f\xf7\x50\xfa\x92\xa7\xfc\x26\x2f\x26\x6b\x42\xe5\x07\x57\x8b\xe7\xa7\xd5\x25\x4d\xdc\xf9\xea\x2b\xf4\xa0\xeb\x2e\x71\x6d\x83\x01\x5b\xa7\x07\xaa\xb9\xf3\x8f\x26\xb8\x48\x16\xaf\xda\x21\x25\x74\x6b\x8b\x8f\xeb\x8e\x6c\xa3\xeb\xd3\x13\x49\xf5\x41\x05\x31\x5e\x10\xfd\xd1\xf4\xd5\xa9\x43\x03\x6d\xbf\x49\xbb\x09\x71\x57\x5d\x6b\x37\x63\x0a\x1d\x1b\x4c\x5a\xed\x4f\xe4\x0a\xb2\x23\x0f\x42\xc1\x3f\x63\x4a\x39\xc3\xd0\xf3\x06\xfb\xba\x30\x56\x36\xb4\x3f\x73\x3a\x42\xfa\x8f\x2c\xfe\x85\x01\x19\x22\x97\xec\xba\x28\xbb\x27\xe2\x49\x6d\xb7\xbc\xab\xab\x83\xa3\x54\xcc\x8b\x3f\x09\x7a\x79\x3b\xc4\x5f\x58\x20\xa7\x0b\x38\x26\x2b\x5e\xce\x7c\x85\xa9\x6d\x8f\xa3\x56\x1d\x77\xed\xff\x99\xaa\xc5\x36\x6f\x8b\xd9\x48\xdd\x20\x2f\x81\xc1\x8d\xc8\xa1\x93\xe0\x40\xc8\x68\x25\xdc\xe1\xf9\x66\xcc\xb9\x8a\x2a\x6f\x70\xbb\xe1\x50\xc0\x1c\x7e\x50\x07\x04\x2b\x61\x04\xf7\x0a\xed\x27\x33\x72\x1c\xb5\x3f\x5f\xc0\xf9\x4e\xfa\x65\xe4\x97\x6b\xf1\x47\x00\x00\x00\xff\xff\x72\xed\x96\x09\xb1\x07\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xdb\x48\x0c\xbd\xfb\x57\x0c\x72\x97\x85\xe4\x38\x39\x2d\x9c\x5d\x60\x0f\x09\x8c\x75\x90\x3b\x3d\xa2\x65\x6e\xe7\x0b\x1c\x4a\xad\x61\xe4\xbf\x17\x63\x39\xf2\xc8\x1f\x0d\x5a\xa0\x9d\x93\x48\xea\x91\x8f\xf3\x28\x0a\x22\xbd\x21\x27\x0a\x5e\x2b\x88\x31\xcd\x43\x44\x9f\xb6\xb4\x91\x39\x85\xba\xbf\x9f\x7d\x21\xdf\x68\xf5\x84\xd1\x86\x9d\x43\x2f\x8b\xe0\x37\xd4\xce\x1c\x0a\x34\x20\xa0\x67\x4a\x59\x58\xa3\x4d\xf9\x49\xe5\x1c\x5a\xed\xf7\xf3\x17\x70\xf8\xfe\x3e\x53\xca\x83\xc3\xd2\x93\x22\x9a\xfc\x2a\x63\xb4\x64\x20\x69\x75\x3f\x53\x2a\xa1\x45\x23\x81\x6f\x24\x51\xaa\x19\x09\x98\x03\x81\x69\x3c\x09\x83\x60\xbb\x1b\xe0\xb2\x8b\xa8\xd5\x7f\xc1\x5a\xf2\xed\x4c\x29\x41\x17\x2d\x08\x0e\xd1\x92\x79\x3e\x25\xfb\x1b\xc5\x3f\x27\x90\xcf\x79\xa7\xd9\xf7\xd1\x6d\x3e\x26\x78\x01\xf2\xc8\x63\xb1\x4a\x01\xb7\x45\xe9\x4a\x55\xa6\x30\xea\x1e\xb8\xb6\xb4\xae\x53\x17\x91\x7b\x4a\x81\x9b\x3a\x57\x2f\x1c\xf3\x6c\x8f\x18\x13\x9c\x03\xdf\xe8\xcf\x92\xac\xc9\x97\xf6\xf8\x3a\xfa\xfe\x84\xdd\xef\x15\x83\x6f\x51\xcd\x57\x11\xcd\xfc\x6f\xdf\x27\x55\x5c\x48\x75\xb5\xe1\xe1\xf4\x60\xbb\x21\xf4\x96\x9f\x8a\xd8\x7e\x8f\xbe\x29\x6c\x72\xd0\xa2\x56\x77\x0d\xf6\x15\x77\x5e\xc8\xa1\xce\x5a\x25\xb9\x9b\xbe\xb3\xec\xac\x5d\x06\x4b\x66\xa7\xd5\x5f\xf6\x2b\xec\xd2\x18\xbf\xc5\x23\x06\x96\xc9\xed\x8e\x0a\x2c\x03\xcb\x01\x71\xe8\x2c\x5b\x13\xfa\x91\x83\x04\x13\xac\x56\xaf\x8b\xe5\xe8\xef\x83\xed\x1c\x3e\x87\xce\x4f\xb3\xba\xec\x59\x82\x6c\xf5\xd5\xcb\x2e\xf2\x0e\x44\xd3\x16\x18\x9b\x2a\xcf\xe0\x8d\x2c\xe2\x62\x0d\x2c\xb4\x01\x23\xe9\x02\xef\x1e\x4a\x2c\x79\xca\xdf\xe4\xc5\x64\x4d\xa4\xfc\xd0\x6a\xf1\xfc\xb4\xba\x94\x89\x3b\x5f\xfd\x0f\x3d\xe8\xba\x4b\x5c\xdb\x60\xc0\xd6\xe9\x81\x6a\xee\xfc\x63\x8e\xf9\xd0\xe0\x31\x46\x6b\xfc\x86\x66\x8c\x9a\xe0\x22\x59\xbc\x8a\x86\x94\xd0\xad\x2d\x3e\xae\x3b\xb2\x8d\xae\x4f\x1f\x50\xaa\x0f\x2e\x88\xf1\x62\x0c\x3e\x24\x59\x9d\xee\x6f\x10\xf5\x17\x87\xc2\x84\xb8\xab\xae\x89\xc1\x98\x42\xc7\x06\x93\x56\xfb\x93\xf4\x82\xec\xc8\x83\x50\xf0\xcf\x98\x52\xae\x30\x28\xd2\x60\x5f\x17\xc1\xca\x86\xf6\x47\xa0\x23\xa5\x7f\xc8\xe2\x1f\x18\x9f\x21\x73\xa9\xbd\x8b\xb2\x7b\x22\x9e\xf4\x76\x0b\x5d\x5d\x1d\x2b\xa5\x62\xfe\x2d\x24\x41\x2f\x6f\x87\xfc\x0b\x0b\xe4\x74\x41\xc7\x64\xc7\xcb\x19\x56\x98\xda\xf6\x38\x88\xd5\x71\x13\xff\x9b\xa5\x5a\x6c\xf3\x2e\x99\x8d\xd2\x0d\xf6\x12\x18\xdc\xc8\x1c\x3a\x09\x0e\x84\x8c\x56\xc2\x1d\x9e\xef\xcd\x5c\xab\xe8\xf2\x86\xb6\x1b\x0e\x05\xcd\xe1\xf7\x75\x60\xb0\x12\x46\x70\xaf\xd0\x7e\x32\x23\xc7\x51\xfb\xfd\x0d\x9c\x6f\xac\x9f\x66\x7e\xb9\x34\xbf\x07\x00\x00\xff\xff\x7f\xf5\x98\x99\xcf\x07\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index f20902f..1d4b2bc 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -43,7 +43,7 @@ spec: initContainers: - env: - name: CMDS - value: run-java:/usr/local/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp + value: run-java:/usr/local/s2i/run;run-node:/usr/libexec/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp image: "{{.Spec.SupervisordName}}:latest" imagePullPolicy: Always name: copy-supervisord From 4cb914b92e90af0ba8d687123cee0fd118856004 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 21 Nov 2018 15:09:19 +0100 Subject: [PATCH 30/62] Append the runtime's type to the name of the dev-runtime image --- tmpl/innerloop/deploymentconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 1d4b2bc..9059dbd 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -29,7 +29,7 @@ spec: - name: {{.Name}} value: {{.Value}} {{end}} - image: "dev-runtime:latest" + image: {{.RuntimeName}}:latest imagePullPolicy: Always name: {{.Name}} ports: @@ -75,4 +75,4 @@ spec: - {{.Name}} from: kind: ImageStreamTag - name: dev-runtime:latest \ No newline at end of file + name: {{.RuntimeName}}:latest \ No newline at end of file From 29139d4a3ef9c4d5a42d8b05035bb3cdd9d32198 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 21 Nov 2018 15:09:31 +0100 Subject: [PATCH 31/62] Regenerate assets --- assets_vfsdata.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 76324fc..5fada83 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 11, 20, 20, 31, 54, 14633840, time.UTC), + modTime: time.Date(2018, 11, 21, 14, 8, 50, 886610987, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 11, 20, 20, 31, 54, 12796477, time.UTC), - uncompressedSize: 1999, + modTime: time.Date(2018, 11, 21, 14, 8, 50, 886091245, time.UTC), + uncompressedSize: 2007, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xdb\x48\x0c\xbd\xfb\x57\x0c\x72\x97\x85\xe4\x38\x39\x2d\x9c\x5d\x60\x0f\x09\x8c\x75\x90\x3b\x3d\xa2\x65\x6e\xe7\x0b\x1c\x4a\xad\x61\xe4\xbf\x17\x63\x39\xf2\xc8\x1f\x0d\x5a\xa0\x9d\x93\x48\xea\x91\x8f\xf3\x28\x0a\x22\xbd\x21\x27\x0a\x5e\x2b\x88\x31\xcd\x43\x44\x9f\xb6\xb4\x91\x39\x85\xba\xbf\x9f\x7d\x21\xdf\x68\xf5\x84\xd1\x86\x9d\x43\x2f\x8b\xe0\x37\xd4\xce\x1c\x0a\x34\x20\xa0\x67\x4a\x59\x58\xa3\x4d\xf9\x49\xe5\x1c\x5a\xed\xf7\xf3\x17\x70\xf8\xfe\x3e\x53\xca\x83\xc3\xd2\x93\x22\x9a\xfc\x2a\x63\xb4\x64\x20\x69\x75\x3f\x53\x2a\xa1\x45\x23\x81\x6f\x24\x51\xaa\x19\x09\x98\x03\x81\x69\x3c\x09\x83\x60\xbb\x1b\xe0\xb2\x8b\xa8\xd5\x7f\xc1\x5a\xf2\xed\x4c\x29\x41\x17\x2d\x08\x0e\xd1\x92\x79\x3e\x25\xfb\x1b\xc5\x3f\x27\x90\xcf\x79\xa7\xd9\xf7\xd1\x6d\x3e\x26\x78\x01\xf2\xc8\x63\xb1\x4a\x01\xb7\x45\xe9\x4a\x55\xa6\x30\xea\x1e\xb8\xb6\xb4\xae\x53\x17\x91\x7b\x4a\x81\x9b\x3a\x57\x2f\x1c\xf3\x6c\x8f\x18\x13\x9c\x03\xdf\xe8\xcf\x92\xac\xc9\x97\xf6\xf8\x3a\xfa\xfe\x84\xdd\xef\x15\x83\x6f\x51\xcd\x57\x11\xcd\xfc\x6f\xdf\x27\x55\x5c\x48\x75\xb5\xe1\xe1\xf4\x60\xbb\x21\xf4\x96\x9f\x8a\xd8\x7e\x8f\xbe\x29\x6c\x72\xd0\xa2\x56\x77\x0d\xf6\x15\x77\x5e\xc8\xa1\xce\x5a\x25\xb9\x9b\xbe\xb3\xec\xac\x5d\x06\x4b\x66\xa7\xd5\x5f\xf6\x2b\xec\xd2\x18\xbf\xc5\x23\x06\x96\xc9\xed\x8e\x0a\x2c\x03\xcb\x01\x71\xe8\x2c\x5b\x13\xfa\x91\x83\x04\x13\xac\x56\xaf\x8b\xe5\xe8\xef\x83\xed\x1c\x3e\x87\xce\x4f\xb3\xba\xec\x59\x82\x6c\xf5\xd5\xcb\x2e\xf2\x0e\x44\xd3\x16\x18\x9b\x2a\xcf\xe0\x8d\x2c\xe2\x62\x0d\x2c\xb4\x01\x23\xe9\x02\xef\x1e\x4a\x2c\x79\xca\xdf\xe4\xc5\x64\x4d\xa4\xfc\xd0\x6a\xf1\xfc\xb4\xba\x94\x89\x3b\x5f\xfd\x0f\x3d\xe8\xba\x4b\x5c\xdb\x60\xc0\xd6\xe9\x81\x6a\xee\xfc\x63\x8e\xf9\xd0\xe0\x31\x46\x6b\xfc\x86\x66\x8c\x9a\xe0\x22\x59\xbc\x8a\x86\x94\xd0\xad\x2d\x3e\xae\x3b\xb2\x8d\xae\x4f\x1f\x50\xaa\x0f\x2e\x88\xf1\x62\x0c\x3e\x24\x59\x9d\xee\x6f\x10\xf5\x17\x87\xc2\x84\xb8\xab\xae\x89\xc1\x98\x42\xc7\x06\x93\x56\xfb\x93\xf4\x82\xec\xc8\x83\x50\xf0\xcf\x98\x52\xae\x30\x28\xd2\x60\x5f\x17\xc1\xca\x86\xf6\x47\xa0\x23\xa5\x7f\xc8\xe2\x1f\x18\x9f\x21\x73\xa9\xbd\x8b\xb2\x7b\x22\x9e\xf4\x76\x0b\x5d\x5d\x1d\x2b\xa5\x62\xfe\x2d\x24\x41\x2f\x6f\x87\xfc\x0b\x0b\xe4\x74\x41\xc7\x64\xc7\xcb\x19\x56\x98\xda\xf6\x38\x88\xd5\x71\x13\xff\x9b\xa5\x5a\x6c\xf3\x2e\x99\x8d\xd2\x0d\xf6\x12\x18\xdc\xc8\x1c\x3a\x09\x0e\x84\x8c\x56\xc2\x1d\x9e\xef\xcd\x5c\xab\xe8\xf2\x86\xb6\x1b\x0e\x05\xcd\xe1\xf7\x75\x60\xb0\x12\x46\x70\xaf\xd0\x7e\x32\x23\xc7\x51\xfb\xfd\x0d\x9c\x6f\xac\x9f\x66\x7e\xb9\x34\xbf\x07\x00\x00\xff\xff\x7f\xf5\x98\x99\xcf\x07\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xe3\x38\x0c\xbd\xfb\x57\x08\xbd\x3b\x46\x7b\x54\x4f\x8b\x74\x17\xd8\x43\x8b\xa0\x29\x7a\x67\x64\xc6\xe1\x8c\xbe\x20\xd1\x9e\x31\x8c\xfe\xf7\x81\xe2\xd4\x91\xd3\x78\x8a\x1e\x66\x74\x0a\x49\x3d\xf2\x51\x8f\xa1\xc1\xd3\x2b\x86\x48\xce\x4a\x01\xde\xc7\x95\xf3\x68\xe3\x81\xf6\xbc\x22\x57\x75\xb7\xc5\x77\xb2\xb5\x14\x0f\xe8\xb5\xeb\x0d\x5a\x5e\x3b\xbb\xa7\xa6\x30\xc8\x50\x03\x83\x2c\x84\xd0\xb0\x43\x1d\xd3\x2f\x91\x72\x48\x31\x0c\xab\x27\x30\xf8\xf6\x56\x08\x61\xc1\x60\xee\x89\x1e\x55\xba\x1a\xd0\x6b\x52\x10\xa5\xb8\x2d\x84\x88\xa8\x51\xb1\x0b\x0b\x49\x84\xa8\x27\x02\xea\x48\x60\x1e\x8f\x1c\x80\xb1\xe9\x47\x38\xf7\x1e\xa5\x78\x76\x5a\x93\x6d\x0a\x21\x18\x8d\xd7\xc0\x38\x46\x73\xe6\xe9\xe4\xec\x17\x8a\x7f\x4e\x20\x9d\xcb\x4e\x93\xef\xbd\xdb\x74\x94\xb3\x0c\x64\x31\x4c\xc5\x4a\x01\xa1\xc9\x4a\x97\xa2\x54\x99\x51\x75\x10\x2a\x4d\xbb\x2a\xb6\x1e\x43\x47\xd1\x85\xba\x4a\xd5\x33\xc7\x2a\xd9\x13\x46\x39\x63\xc0\xd6\xf2\xb3\x24\x3b\xb2\xb9\x3d\x5d\x47\xdb\x9d\xb1\xc3\x20\x02\xd8\x06\xc5\x6a\xeb\x51\xad\xfe\xb5\x5d\x14\xd9\x83\x94\x57\x1b\x1e\x4f\x07\xba\x1d\x43\xaf\xe9\x57\x16\x1b\x06\xb4\x75\x66\x93\x81\x66\xbc\xf9\xdc\x5a\x26\x83\x63\x2e\x99\xf4\x8a\x3c\xbf\xb6\x69\xb5\xde\x38\x4d\xaa\x97\xe2\x1f\xfd\x03\xfa\x38\xc5\x97\xa8\x78\x17\x78\xf6\xc0\x93\x08\x1b\x17\xf8\x88\x38\x36\x97\xac\x59\x07\x3e\x38\x76\xca\x69\x29\x5e\xd6\x9b\xc9\xdf\x39\xdd\x1a\x7c\x74\xad\x9d\x67\x35\xc9\xb3\x01\x3e\xc8\xab\xef\x9d\xe5\x1d\x89\xc6\x03\x04\xac\xcb\x34\x86\x0b\x59\xd8\xf8\x0a\x02\xd3\x1e\x14\xc7\x0f\x78\x73\x97\x63\xc9\x52\xfa\x5b\x7e\x18\xae\x99\x9a\xef\x72\xad\x1f\x1f\xb6\x1f\x95\x0a\xad\x2d\xbf\x41\x07\xb2\x6a\x63\xa8\xb4\x53\xa0\xab\x78\x47\x55\x68\xed\x7d\x8a\x59\x57\xe3\x29\x46\x3b\xfc\x89\x6a\x8a\x2a\x67\x3c\x69\xbc\x8a\x86\x18\xd1\xec\x34\xde\xef\x5a\xd2\xb5\xac\xce\xff\xa1\x58\x1d\x5d\xe0\xfd\xe5\x24\xdc\xbc\x4b\xb2\x3d\xbf\xdf\x6c\x26\x6e\xbe\x38\x14\xca\xf9\xbe\xbc\x26\x46\xc0\xe8\xda\xa0\x30\x4a\x31\x9c\xa5\x67\x0c\x86\x2c\x30\x39\xfb\x88\x31\xa6\x0a\xa3\x22\x35\x76\x55\x16\x2c\xb5\x6b\x7e\x07\x3a\x51\xfa\x8f\x34\xfe\x85\xf1\x19\x33\xe7\xda\x1b\xcf\xfd\x03\x85\x59\x6f\x4b\xe8\xf2\xea\x58\x09\xe1\xd3\x97\x21\x32\x5a\x7e\x3d\xe6\x5f\x6b\x20\x23\x33\x3a\x2a\x39\x9e\x2e\xb0\x1c\xa8\x69\x4e\x83\x58\x9e\x96\xf1\xff\x49\xaa\xf5\x21\xad\x93\x62\x92\x6e\xb4\x37\x10\xc0\x4c\xcc\xa1\x65\x67\x80\x49\x49\xc1\xa1\xc5\xcb\xd5\x99\x6a\x65\x5d\x2e\x68\xbb\x0f\x2e\xa3\x39\x7e\xc1\x8e\x0c\xb6\x1c\x10\xcc\x0b\x34\x9f\xcc\xc8\x79\xfd\xfc\xe1\x06\x2e\x37\xd6\x97\x99\x2f\x2c\xce\x5f\x01\x00\x00\xff\xff\xa8\xf6\x0b\x4c\xd7\x07\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", From deaf3627aaba2c2779d83f3339f21ff5f97a2c95 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 21 Nov 2018 15:40:46 +0100 Subject: [PATCH 32/62] Fix wrong path to access .RuntimeName -> .Spec.RuntimeName --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/deploymentconfig | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 5fada83..61f3c2d 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 11, 21, 14, 8, 50, 886610987, time.UTC), + modTime: time.Date(2018, 11, 21, 14, 37, 49, 945069072, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 11, 21, 14, 8, 50, 886091245, time.UTC), - uncompressedSize: 2007, + modTime: time.Date(2018, 11, 21, 14, 37, 49, 944281887, time.UTC), + uncompressedSize: 2017, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xe3\x38\x0c\xbd\xfb\x57\x08\xbd\x3b\x46\x7b\x54\x4f\x8b\x74\x17\xd8\x43\x8b\xa0\x29\x7a\x67\x64\xc6\xe1\x8c\xbe\x20\xd1\x9e\x31\x8c\xfe\xf7\x81\xe2\xd4\x91\xd3\x78\x8a\x1e\x66\x74\x0a\x49\x3d\xf2\x51\x8f\xa1\xc1\xd3\x2b\x86\x48\xce\x4a\x01\xde\xc7\x95\xf3\x68\xe3\x81\xf6\xbc\x22\x57\x75\xb7\xc5\x77\xb2\xb5\x14\x0f\xe8\xb5\xeb\x0d\x5a\x5e\x3b\xbb\xa7\xa6\x30\xc8\x50\x03\x83\x2c\x84\xd0\xb0\x43\x1d\xd3\x2f\x91\x72\x48\x31\x0c\xab\x27\x30\xf8\xf6\x56\x08\x61\xc1\x60\xee\x89\x1e\x55\xba\x1a\xd0\x6b\x52\x10\xa5\xb8\x2d\x84\x88\xa8\x51\xb1\x0b\x0b\x49\x84\xa8\x27\x02\xea\x48\x60\x1e\x8f\x1c\x80\xb1\xe9\x47\x38\xf7\x1e\xa5\x78\x76\x5a\x93\x6d\x0a\x21\x18\x8d\xd7\xc0\x38\x46\x73\xe6\xe9\xe4\xec\x17\x8a\x7f\x4e\x20\x9d\xcb\x4e\x93\xef\xbd\xdb\x74\x94\xb3\x0c\x64\x31\x4c\xc5\x4a\x01\xa1\xc9\x4a\x97\xa2\x54\x99\x51\x75\x10\x2a\x4d\xbb\x2a\xb6\x1e\x43\x47\xd1\x85\xba\x4a\xd5\x33\xc7\x2a\xd9\x13\x46\x39\x63\xc0\xd6\xf2\xb3\x24\x3b\xb2\xb9\x3d\x5d\x47\xdb\x9d\xb1\xc3\x20\x02\xd8\x06\xc5\x6a\xeb\x51\xad\xfe\xb5\x5d\x14\xd9\x83\x94\x57\x1b\x1e\x4f\x07\xba\x1d\x43\xaf\xe9\x57\x16\x1b\x06\xb4\x75\x66\x93\x81\x66\xbc\xf9\xdc\x5a\x26\x83\x63\x2e\x99\xf4\x8a\x3c\xbf\xb6\x69\xb5\xde\x38\x4d\xaa\x97\xe2\x1f\xfd\x03\xfa\x38\xc5\x97\xa8\x78\x17\x78\xf6\xc0\x93\x08\x1b\x17\xf8\x88\x38\x36\x97\xac\x59\x07\x3e\x38\x76\xca\x69\x29\x5e\xd6\x9b\xc9\xdf\x39\xdd\x1a\x7c\x74\xad\x9d\x67\x35\xc9\xb3\x01\x3e\xc8\xab\xef\x9d\xe5\x1d\x89\xc6\x03\x04\xac\xcb\x34\x86\x0b\x59\xd8\xf8\x0a\x02\xd3\x1e\x14\xc7\x0f\x78\x73\x97\x63\xc9\x52\xfa\x5b\x7e\x18\xae\x99\x9a\xef\x72\xad\x1f\x1f\xb6\x1f\x95\x0a\xad\x2d\xbf\x41\x07\xb2\x6a\x63\xa8\xb4\x53\xa0\xab\x78\x47\x55\x68\xed\x7d\x8a\x59\x57\xe3\x29\x46\x3b\xfc\x89\x6a\x8a\x2a\x67\x3c\x69\xbc\x8a\x86\x18\xd1\xec\x34\xde\xef\x5a\xd2\xb5\xac\xce\xff\xa1\x58\x1d\x5d\xe0\xfd\xe5\x24\xdc\xbc\x4b\xb2\x3d\xbf\xdf\x6c\x26\x6e\xbe\x38\x14\xca\xf9\xbe\xbc\x26\x46\xc0\xe8\xda\xa0\x30\x4a\x31\x9c\xa5\x67\x0c\x86\x2c\x30\x39\xfb\x88\x31\xa6\x0a\xa3\x22\x35\x76\x55\x16\x2c\xb5\x6b\x7e\x07\x3a\x51\xfa\x8f\x34\xfe\x85\xf1\x19\x33\xe7\xda\x1b\xcf\xfd\x03\x85\x59\x6f\x4b\xe8\xf2\xea\x58\x09\xe1\xd3\x97\x21\x32\x5a\x7e\x3d\xe6\x5f\x6b\x20\x23\x33\x3a\x2a\x39\x9e\x2e\xb0\x1c\xa8\x69\x4e\x83\x58\x9e\x96\xf1\xff\x49\xaa\xf5\x21\xad\x93\x62\x92\x6e\xb4\x37\x10\xc0\x4c\xcc\xa1\x65\x67\x80\x49\x49\xc1\xa1\xc5\xcb\xd5\x99\x6a\x65\x5d\x2e\x68\xbb\x0f\x2e\xa3\x39\x7e\xc1\x8e\x0c\xb6\x1c\x10\xcc\x0b\x34\x9f\xcc\xc8\x79\xfd\xfc\xe1\x06\x2e\x37\xd6\x97\x99\x2f\x2c\xce\x5f\x01\x00\x00\xff\xff\xa8\xf6\x0b\x4c\xd7\x07\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xdb\x3c\x0c\xbe\xfb\x57\x08\xbd\x3b\x46\x7b\x54\x4f\x2f\xd2\x77\xc0\x0e\x2d\x82\xa6\xe8\x9d\x91\x19\x87\x9b\xbe\x20\xd1\xde\x0c\xa3\xff\x7d\x50\x9c\x3a\x72\x9a\x34\xe8\x61\xd3\xc9\x24\x45\xf2\x21\x1f\x9a\x02\x4f\xaf\x18\x22\x39\x2b\x05\x78\x1f\x17\xce\xa3\x8d\x3b\xda\xf2\x82\x5c\xd5\xdd\x16\x3f\xc9\xd6\x52\x3c\xa0\xd7\xae\x37\x68\x79\xe9\xec\x96\x9a\xc2\x20\x43\x0d\x0c\xb2\x10\x42\xc3\x06\x75\x4c\x5f\x22\xc5\x90\x62\x18\x16\x4f\x60\xf0\xed\xad\x10\xc2\x82\xc1\x5c\x13\x3d\xaa\x74\x35\xa0\xd7\xa4\x20\x4a\x71\x5b\x08\x11\x51\xa3\x62\x17\x2e\x04\x11\xa2\x9e\x00\xa8\x3d\x80\xb9\x3d\x72\x00\xc6\xa6\x1f\xdd\xb9\xf7\x28\xc5\xb3\xd3\x9a\x6c\x53\x08\xc1\x68\xbc\x06\xc6\xd1\x9a\x23\x4f\x27\x47\x7f\x21\xf9\x75\x00\xe9\x9c\x56\x9a\x74\xef\xd5\xa6\xa3\x9c\x65\x20\x8b\x61\x4a\x56\x0a\x08\x4d\x96\xba\x14\xa5\xca\x84\xaa\x83\x50\x69\xda\x54\xb1\xf5\x18\x3a\x8a\x2e\xd4\x55\xca\x9e\x29\x16\x49\x9e\x7c\x94\x33\x06\x6c\x2d\xaf\x05\xd9\x90\xcd\xe5\xe9\x3a\xda\xee\xe8\x3b\x0c\x22\x80\x6d\x50\x2c\xd6\x1e\xd5\xe2\x7f\xdb\x45\x91\x35\xa4\x3c\x5b\xf0\x78\x3a\xd0\xed\x68\x7a\x4d\x5f\x99\x6d\x18\xd0\xd6\x99\x4c\x06\x9a\xf1\xe6\x3e\xc9\x73\x6b\x99\x0c\x8e\x01\x65\x22\x2d\xf2\xfc\xee\xaa\xd5\x7a\xe5\x34\xa9\x5e\x8a\xff\xf4\x2f\xe8\xe3\x64\xbf\x84\xc7\xbb\xc0\xb3\x2e\x4f\x4c\xac\x5c\xe0\x63\xf2\x24\xcd\xca\xf0\xc1\xb1\x53\x4e\x4b\xf1\xb2\x5c\x4d\xfa\xce\xe9\xd6\xe0\xa3\x6b\xed\x3c\xaa\x49\x9a\x15\xf0\x4e\x9e\x6d\x7a\x16\x77\x04\x1a\x77\x10\xb0\x2e\xd3\x2c\x5e\x88\xc2\xc6\x57\x10\x98\xb6\xa0\x38\x7e\xf0\x37\x77\xb9\x2f\x59\x4a\xff\xe6\x87\x09\x9b\x51\xfa\xce\xd9\xf2\xf1\x61\xfd\x91\xae\xd0\xda\xf2\x07\x74\x20\xab\x36\x86\x4a\x3b\x05\xba\x8a\x77\x54\x85\xd6\xde\x27\x9b\x75\x35\x1e\x6c\xb4\xc1\xdf\xa8\x26\xab\x72\xc6\x93\xc6\xb3\xde\x10\x23\x9a\x8d\xc6\xfb\x4d\x4b\xba\x96\xd5\xf1\x47\x8a\xd5\x5e\x05\xde\x9f\x8e\xc3\xcd\x3b\x25\xeb\x63\xff\x66\x33\x71\xf3\xc5\xa1\x50\xce\xf7\xe5\x39\x32\x02\x46\xd7\x06\x85\x51\x8a\xe1\x48\x3d\x63\x30\x64\x81\xc9\xd9\x47\x8c\x31\x65\x18\x19\xa9\xb1\xab\x32\x63\xa9\x5d\xf3\x99\xd3\x01\xd2\x37\xd2\xf8\x0f\xc6\x67\x8c\x9c\x73\x6f\x3c\xf7\x0f\x14\x66\xb5\x5d\xf2\x2e\xcf\x8e\x95\x10\x3e\x3d\x0f\x91\xd1\xf2\xeb\x3e\xfe\x52\x03\x19\x99\xc1\x51\x49\xf1\x74\xe2\xcb\x81\x9a\xe6\x30\x88\xe5\x61\x23\x7f\x4f\x54\x2d\x77\x69\xa7\x14\x13\x75\xa3\xbc\x82\x00\x66\x42\x0e\x2d\x3b\x03\x4c\x4a\x0a\x0e\x2d\x9e\xee\xcf\x94\x2b\xab\xf2\x02\xb7\xdb\xe0\x32\x98\xe3\x33\xb6\x47\xb0\xe6\x80\x60\x5e\xa0\xb9\x32\x23\xc7\xf5\xf3\x97\x0b\x38\xdd\x58\x5f\x46\xfe\xd9\xf6\xfc\x13\x00\x00\xff\xff\x1c\xb6\x80\x62\xe1\x07\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 9059dbd..29ad588 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -29,7 +29,7 @@ spec: - name: {{.Name}} value: {{.Value}} {{end}} - image: {{.RuntimeName}}:latest + image: {{.Spec.RuntimeName}}:latest imagePullPolicy: Always name: {{.Name}} ports: @@ -75,4 +75,4 @@ spec: - {{.Name}} from: kind: ImageStreamTag - name: {{.RuntimeName}}:latest \ No newline at end of file + name: {{.Spec.RuntimeName}}:latest \ No newline at end of file From de1b04cc6821ac9d9b4ec079ba228ef1cac71782 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Fri, 7 Dec 2018 10:11:07 +0100 Subject: [PATCH 33/62] Remove deep copy --- assets_vfsdata.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 61f3c2d..65113fe 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,11 +25,11 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 11, 21, 14, 37, 49, 945069072, time.UTC), + modTime: time.Date(2018, 12, 7, 6, 1, 19, 576845181, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 11, 21, 14, 37, 49, 944281887, time.UTC), + modTime: time.Date(2018, 12, 7, 6, 1, 19, 576376575, time.UTC), uncompressedSize: 2017, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xdb\x3c\x0c\xbe\xfb\x57\x08\xbd\x3b\x46\x7b\x54\x4f\x2f\xd2\x77\xc0\x0e\x2d\x82\xa6\xe8\x9d\x91\x19\x87\x9b\xbe\x20\xd1\xde\x0c\xa3\xff\x7d\x50\x9c\x3a\x72\x9a\x34\xe8\x61\xd3\xc9\x24\x45\xf2\x21\x1f\x9a\x02\x4f\xaf\x18\x22\x39\x2b\x05\x78\x1f\x17\xce\xa3\x8d\x3b\xda\xf2\x82\x5c\xd5\xdd\x16\x3f\xc9\xd6\x52\x3c\xa0\xd7\xae\x37\x68\x79\xe9\xec\x96\x9a\xc2\x20\x43\x0d\x0c\xb2\x10\x42\xc3\x06\x75\x4c\x5f\x22\xc5\x90\x62\x18\x16\x4f\x60\xf0\xed\xad\x10\xc2\x82\xc1\x5c\x13\x3d\xaa\x74\x35\xa0\xd7\xa4\x20\x4a\x71\x5b\x08\x11\x51\xa3\x62\x17\x2e\x04\x11\xa2\x9e\x00\xa8\x3d\x80\xb9\x3d\x72\x00\xc6\xa6\x1f\xdd\xb9\xf7\x28\xc5\xb3\xd3\x9a\x6c\x53\x08\xc1\x68\xbc\x06\xc6\xd1\x9a\x23\x4f\x27\x47\x7f\x21\xf9\x75\x00\xe9\x9c\x56\x9a\x74\xef\xd5\xa6\xa3\x9c\x65\x20\x8b\x61\x4a\x56\x0a\x08\x4d\x96\xba\x14\xa5\xca\x84\xaa\x83\x50\x69\xda\x54\xb1\xf5\x18\x3a\x8a\x2e\xd4\x55\xca\x9e\x29\x16\x49\x9e\x7c\x94\x33\x06\x6c\x2d\xaf\x05\xd9\x90\xcd\xe5\xe9\x3a\xda\xee\xe8\x3b\x0c\x22\x80\x6d\x50\x2c\xd6\x1e\xd5\xe2\x7f\xdb\x45\x91\x35\xa4\x3c\x5b\xf0\x78\x3a\xd0\xed\x68\x7a\x4d\x5f\x99\x6d\x18\xd0\xd6\x99\x4c\x06\x9a\xf1\xe6\x3e\xc9\x73\x6b\x99\x0c\x8e\x01\x65\x22\x2d\xf2\xfc\xee\xaa\xd5\x7a\xe5\x34\xa9\x5e\x8a\xff\xf4\x2f\xe8\xe3\x64\xbf\x84\xc7\xbb\xc0\xb3\x2e\x4f\x4c\xac\x5c\xe0\x63\xf2\x24\xcd\xca\xf0\xc1\xb1\x53\x4e\x4b\xf1\xb2\x5c\x4d\xfa\xce\xe9\xd6\xe0\xa3\x6b\xed\x3c\xaa\x49\x9a\x15\xf0\x4e\x9e\x6d\x7a\x16\x77\x04\x1a\x77\x10\xb0\x2e\xd3\x2c\x5e\x88\xc2\xc6\x57\x10\x98\xb6\xa0\x38\x7e\xf0\x37\x77\xb9\x2f\x59\x4a\xff\xe6\x87\x09\x9b\x51\xfa\xce\xd9\xf2\xf1\x61\xfd\x91\xae\xd0\xda\xf2\x07\x74\x20\xab\x36\x86\x4a\x3b\x05\xba\x8a\x77\x54\x85\xd6\xde\x27\x9b\x75\x35\x1e\x6c\xb4\xc1\xdf\xa8\x26\xab\x72\xc6\x93\xc6\xb3\xde\x10\x23\x9a\x8d\xc6\xfb\x4d\x4b\xba\x96\xd5\xf1\x47\x8a\xd5\x5e\x05\xde\x9f\x8e\xc3\xcd\x3b\x25\xeb\x63\xff\x66\x33\x71\xf3\xc5\xa1\x50\xce\xf7\xe5\x39\x32\x02\x46\xd7\x06\x85\x51\x8a\xe1\x48\x3d\x63\x30\x64\x81\xc9\xd9\x47\x8c\x31\x65\x18\x19\xa9\xb1\xab\x32\x63\xa9\x5d\xf3\x99\xd3\x01\xd2\x37\xd2\xf8\x0f\xc6\x67\x8c\x9c\x73\x6f\x3c\xf7\x0f\x14\x66\xb5\x5d\xf2\x2e\xcf\x8e\x95\x10\x3e\x3d\x0f\x91\xd1\xf2\xeb\x3e\xfe\x52\x03\x19\x99\xc1\x51\x49\xf1\x74\xe2\xcb\x81\x9a\xe6\x30\x88\xe5\x61\x23\x7f\x4f\x54\x2d\x77\x69\xa7\x14\x13\x75\xa3\xbc\x82\x00\x66\x42\x0e\x2d\x3b\x03\x4c\x4a\x0a\x0e\x2d\x9e\xee\xcf\x94\x2b\xab\xf2\x02\xb7\xdb\xe0\x32\x98\xe3\x33\xb6\x47\xb0\xe6\x80\x60\x5e\xa0\xb9\x32\x23\xc7\xf5\xf3\x97\x0b\x38\xdd\x58\x5f\x46\xfe\xd9\xf6\xfc\x13\x00\x00\xff\xff\x1c\xb6\x80\x62\xe1\x07\x00\x00"), From 4a196b563bc39c2f935d8b3b6d2f7df06f2bdef3 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 11 Dec 2018 12:04:37 +0100 Subject: [PATCH 34/62] Use a different PVC storage name / component --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/deploymentconfig | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 65113fe..fe35948 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 12, 7, 6, 1, 19, 576845181, time.UTC), + modTime: time.Date(2018, 12, 11, 11, 3, 59, 557302963, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 12, 7, 6, 1, 19, 576376575, time.UTC), - uncompressedSize: 2017, + modTime: time.Date(2018, 12, 11, 11, 3, 59, 555683449, time.UTC), + uncompressedSize: 2032, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xdb\x3c\x0c\xbe\xfb\x57\x08\xbd\x3b\x46\x7b\x54\x4f\x2f\xd2\x77\xc0\x0e\x2d\x82\xa6\xe8\x9d\x91\x19\x87\x9b\xbe\x20\xd1\xde\x0c\xa3\xff\x7d\x50\x9c\x3a\x72\x9a\x34\xe8\x61\xd3\xc9\x24\x45\xf2\x21\x1f\x9a\x02\x4f\xaf\x18\x22\x39\x2b\x05\x78\x1f\x17\xce\xa3\x8d\x3b\xda\xf2\x82\x5c\xd5\xdd\x16\x3f\xc9\xd6\x52\x3c\xa0\xd7\xae\x37\x68\x79\xe9\xec\x96\x9a\xc2\x20\x43\x0d\x0c\xb2\x10\x42\xc3\x06\x75\x4c\x5f\x22\xc5\x90\x62\x18\x16\x4f\x60\xf0\xed\xad\x10\xc2\x82\xc1\x5c\x13\x3d\xaa\x74\x35\xa0\xd7\xa4\x20\x4a\x71\x5b\x08\x11\x51\xa3\x62\x17\x2e\x04\x11\xa2\x9e\x00\xa8\x3d\x80\xb9\x3d\x72\x00\xc6\xa6\x1f\xdd\xb9\xf7\x28\xc5\xb3\xd3\x9a\x6c\x53\x08\xc1\x68\xbc\x06\xc6\xd1\x9a\x23\x4f\x27\x47\x7f\x21\xf9\x75\x00\xe9\x9c\x56\x9a\x74\xef\xd5\xa6\xa3\x9c\x65\x20\x8b\x61\x4a\x56\x0a\x08\x4d\x96\xba\x14\xa5\xca\x84\xaa\x83\x50\x69\xda\x54\xb1\xf5\x18\x3a\x8a\x2e\xd4\x55\xca\x9e\x29\x16\x49\x9e\x7c\x94\x33\x06\x6c\x2d\xaf\x05\xd9\x90\xcd\xe5\xe9\x3a\xda\xee\xe8\x3b\x0c\x22\x80\x6d\x50\x2c\xd6\x1e\xd5\xe2\x7f\xdb\x45\x91\x35\xa4\x3c\x5b\xf0\x78\x3a\xd0\xed\x68\x7a\x4d\x5f\x99\x6d\x18\xd0\xd6\x99\x4c\x06\x9a\xf1\xe6\x3e\xc9\x73\x6b\x99\x0c\x8e\x01\x65\x22\x2d\xf2\xfc\xee\xaa\xd5\x7a\xe5\x34\xa9\x5e\x8a\xff\xf4\x2f\xe8\xe3\x64\xbf\x84\xc7\xbb\xc0\xb3\x2e\x4f\x4c\xac\x5c\xe0\x63\xf2\x24\xcd\xca\xf0\xc1\xb1\x53\x4e\x4b\xf1\xb2\x5c\x4d\xfa\xce\xe9\xd6\xe0\xa3\x6b\xed\x3c\xaa\x49\x9a\x15\xf0\x4e\x9e\x6d\x7a\x16\x77\x04\x1a\x77\x10\xb0\x2e\xd3\x2c\x5e\x88\xc2\xc6\x57\x10\x98\xb6\xa0\x38\x7e\xf0\x37\x77\xb9\x2f\x59\x4a\xff\xe6\x87\x09\x9b\x51\xfa\xce\xd9\xf2\xf1\x61\xfd\x91\xae\xd0\xda\xf2\x07\x74\x20\xab\x36\x86\x4a\x3b\x05\xba\x8a\x77\x54\x85\xd6\xde\x27\x9b\x75\x35\x1e\x6c\xb4\xc1\xdf\xa8\x26\xab\x72\xc6\x93\xc6\xb3\xde\x10\x23\x9a\x8d\xc6\xfb\x4d\x4b\xba\x96\xd5\xf1\x47\x8a\xd5\x5e\x05\xde\x9f\x8e\xc3\xcd\x3b\x25\xeb\x63\xff\x66\x33\x71\xf3\xc5\xa1\x50\xce\xf7\xe5\x39\x32\x02\x46\xd7\x06\x85\x51\x8a\xe1\x48\x3d\x63\x30\x64\x81\xc9\xd9\x47\x8c\x31\x65\x18\x19\xa9\xb1\xab\x32\x63\xa9\x5d\xf3\x99\xd3\x01\xd2\x37\xd2\xf8\x0f\xc6\x67\x8c\x9c\x73\x6f\x3c\xf7\x0f\x14\x66\xb5\x5d\xf2\x2e\xcf\x8e\x95\x10\x3e\x3d\x0f\x91\xd1\xf2\xeb\x3e\xfe\x52\x03\x19\x99\xc1\x51\x49\xf1\x74\xe2\xcb\x81\x9a\xe6\x30\x88\xe5\x61\x23\x7f\x4f\x54\x2d\x77\x69\xa7\x14\x13\x75\xa3\xbc\x82\x00\x66\x42\x0e\x2d\x3b\x03\x4c\x4a\x0a\x0e\x2d\x9e\xee\xcf\x94\x2b\xab\xf2\x02\xb7\xdb\xe0\x32\x98\xe3\x33\xb6\x47\xb0\xe6\x80\x60\x5e\xa0\xb9\x32\x23\xc7\xf5\xf3\x97\x0b\x38\xdd\x58\x5f\x46\xfe\xd9\xf6\xfc\x13\x00\x00\xff\xff\x1c\xb6\x80\x62\xe1\x07\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4f\x6f\xdb\x3e\x0c\xbd\xfb\x53\x08\xbd\x3b\x46\x7b\x54\x4f\x3f\xa4\xbf\x01\x3b\xb4\x08\x9a\xa2\x77\x46\x66\x1c\x6e\xfa\x07\x89\xf6\x66\x18\xfd\xee\x83\xe2\xc4\x91\xd3\xa4\x45\x0f\x9b\x4e\x21\x29\x92\x8f\x7a\x2f\x34\x78\x7a\xc5\x10\xc9\x59\x29\xc0\xfb\xb8\x70\x1e\x6d\xdc\xd1\x96\x17\xe4\xaa\xee\xb6\xf8\x49\xb6\x96\xe2\x01\xbd\x76\xbd\x41\xcb\x4b\x67\xb7\xd4\x14\x06\x19\x6a\x60\x90\x85\x10\x1a\x36\xa8\x63\xfa\x25\x52\x0d\x29\x86\x61\xf1\x04\x06\xdf\xde\x0a\x21\x2c\x18\xcc\x3d\xd1\xa3\x4a\x57\x03\x7a\x4d\x0a\xa2\x14\xb7\x85\x10\x11\x35\x2a\x76\xe1\x4a\x11\x21\xea\x09\x80\xda\x03\x98\xc7\x23\x07\x60\x6c\xfa\x31\x9d\x7b\x8f\x52\x3c\x3b\xad\xc9\x36\x85\x10\x8c\xc6\x6b\x60\x1c\xa3\x39\xf2\x74\x72\xf4\x57\x9a\x7f\x0e\x20\x9d\xf3\x49\x93\xef\x38\x6d\x3a\xca\x59\x06\xb2\x18\xa6\x66\xa5\x80\xd0\x64\xad\x4b\x51\xaa\xcc\xa8\x3a\x08\x95\xa6\x4d\x15\x5b\x8f\xa1\xa3\xe8\x42\x5d\xa5\xee\x99\x63\x91\xec\x29\x47\x39\x63\xc0\xd6\xf2\xb3\x22\x1b\xb2\xb9\x3d\x5d\x47\xdb\x9d\x72\x87\x41\x04\xb0\x0d\x8a\xc5\xda\xa3\x5a\xfc\x6f\xbb\x28\xb2\x07\x29\x2f\x0e\x3c\x9e\x0e\x74\x3b\x86\x5e\xd3\xaf\x2c\x36\x0c\x68\xeb\xcc\x26\x03\xcd\x78\x73\xdf\xe4\xb9\xb5\x4c\x06\xc7\x82\x32\x91\x16\x79\x7e\x77\xd5\x6a\xbd\x72\x9a\x54\x2f\xc5\x7f\xfa\x17\xf4\x71\x8a\x5f\xc3\xe3\x5d\xe0\xd9\x2b\x4f\x4c\xac\x5c\xe0\x53\xf3\x64\xcd\xc6\xf0\xc1\xb1\x53\x4e\x4b\xf1\xb2\x5c\x4d\xfe\xce\xe9\xd6\xe0\xa3\x6b\xed\xbc\xaa\x49\x9e\x15\xf0\x4e\x5e\x7c\xf4\xac\xee\x08\x34\xee\x20\x60\x5d\x26\x2d\x5e\xa9\xc2\xc6\x57\x10\x98\xb6\xa0\x38\xbe\xcb\x3f\xc2\x5e\xb3\x0b\xd0\xe0\x7c\x6a\xb2\x94\xfe\xaa\xef\x04\x37\x63\xf8\x48\xe1\xf2\xf1\x61\xfd\x9e\xbd\xd0\xda\xf2\x07\x74\x20\xab\x36\x86\x4a\x3b\x05\xba\x8a\x77\x54\x85\xd6\xde\xa7\x98\x75\x35\x1e\x62\xb4\xc1\xdf\xa8\xa6\xa8\x72\xc6\x93\xc6\x8b\xd9\x10\x23\x9a\x8d\xc6\xfb\x4d\x4b\xba\x96\xd5\xe9\x7f\x15\xab\xbd\x0b\xbc\x3f\x57\xc7\xcd\x34\xea\xe9\x39\x67\x12\xb9\xf9\xa2\x46\x94\xf3\x7d\x79\x89\x9b\x80\xd1\xb5\x41\x61\x94\x62\x38\x29\x81\x31\x18\xb2\xc0\xe4\xec\x23\xc6\x98\x3a\x8c\x04\xd5\xd8\x55\x59\xb0\xd4\xae\xf9\x28\xe9\x00\xe9\x1b\x69\xfc\x07\x6a\x1a\x2b\xe7\xdc\x1b\xcf\xfd\x03\x85\xd9\x6c\xd7\xb2\x8f\xda\x30\x77\x73\x85\xfa\xf4\xb5\x88\x8c\x96\x5f\xf7\xf5\x97\x1a\xc8\xc8\x0c\x8e\x4a\x8e\xa7\xb3\x5c\x0e\xd4\x34\x07\x21\x96\x87\x05\xfd\x3d\x51\xb5\xdc\xa5\x15\x53\x4c\xd4\x8d\xf6\x0a\x02\x98\x09\x39\xb4\xec\x0c\x30\x29\x29\x38\xb4\x78\xbe\x4e\x53\xaf\x6c\xca\x2b\xdc\x6e\x83\xcb\x60\x8e\x5f\xb5\x3d\x82\x35\x07\x04\xf3\x02\xcd\x27\x1a\x39\x6d\xa3\xbf\x3c\xc0\xf9\x02\xfb\x32\xf2\x8f\x96\xe9\x9f\x00\x00\x00\xff\xff\x59\x5a\xad\x78\xf0\x07\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 29ad588..f702682 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -39,7 +39,7 @@ spec: - mountPath: /var/lib/supervisord name: shared-data - mountPath: /tmp/artifacts - name: m2-data + name: {{.Spec.Storage.Name}} initContainers: - env: - name: CMDS From 3c24d4b4179fe06311c0c776ea2578bfc245938c Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 11 Dec 2018 12:06:46 +0100 Subject: [PATCH 35/62] Fix issue. Add missing volume name --- tmpl/innerloop/deploymentconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index f702682..83bff0f 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -56,9 +56,9 @@ spec: volumes: - emptyDir: {} name: shared-data - - name: m2-data + - name: {{.Spec.Storage.Name}} persistentVolumeClaim: - claimName: m2-data + claimName: {{.Spec.Storage.Name}} triggers: - type: ImageChange imageChangeParams: From 10059d774c434bfd7512ac7fb6d4ba6e9ede9d1b Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 11 Dec 2018 12:11:49 +0100 Subject: [PATCH 36/62] Regenerate assets --- assets_vfsdata.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index fe35948..0771cc9 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,14 +25,14 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 12, 11, 11, 3, 59, 557302963, time.UTC), + modTime: time.Date(2018, 12, 11, 11, 6, 30, 472483788, time.UTC), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 12, 11, 11, 3, 59, 555683449, time.UTC), - uncompressedSize: 2032, + modTime: time.Date(2018, 12, 11, 11, 6, 30, 471117322, time.UTC), + uncompressedSize: 2062, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4f\x6f\xdb\x3e\x0c\xbd\xfb\x53\x08\xbd\x3b\x46\x7b\x54\x4f\x3f\xa4\xbf\x01\x3b\xb4\x08\x9a\xa2\x77\x46\x66\x1c\x6e\xfa\x07\x89\xf6\x66\x18\xfd\xee\x83\xe2\xc4\x91\xd3\xa4\x45\x0f\x9b\x4e\x21\x29\x92\x8f\x7a\x2f\x34\x78\x7a\xc5\x10\xc9\x59\x29\xc0\xfb\xb8\x70\x1e\x6d\xdc\xd1\x96\x17\xe4\xaa\xee\xb6\xf8\x49\xb6\x96\xe2\x01\xbd\x76\xbd\x41\xcb\x4b\x67\xb7\xd4\x14\x06\x19\x6a\x60\x90\x85\x10\x1a\x36\xa8\x63\xfa\x25\x52\x0d\x29\x86\x61\xf1\x04\x06\xdf\xde\x0a\x21\x2c\x18\xcc\x3d\xd1\xa3\x4a\x57\x03\x7a\x4d\x0a\xa2\x14\xb7\x85\x10\x11\x35\x2a\x76\xe1\x4a\x11\x21\xea\x09\x80\xda\x03\x98\xc7\x23\x07\x60\x6c\xfa\x31\x9d\x7b\x8f\x52\x3c\x3b\xad\xc9\x36\x85\x10\x8c\xc6\x6b\x60\x1c\xa3\x39\xf2\x74\x72\xf4\x57\x9a\x7f\x0e\x20\x9d\xf3\x49\x93\xef\x38\x6d\x3a\xca\x59\x06\xb2\x18\xa6\x66\xa5\x80\xd0\x64\xad\x4b\x51\xaa\xcc\xa8\x3a\x08\x95\xa6\x4d\x15\x5b\x8f\xa1\xa3\xe8\x42\x5d\xa5\xee\x99\x63\x91\xec\x29\x47\x39\x63\xc0\xd6\xf2\xb3\x22\x1b\xb2\xb9\x3d\x5d\x47\xdb\x9d\x72\x87\x41\x04\xb0\x0d\x8a\xc5\xda\xa3\x5a\xfc\x6f\xbb\x28\xb2\x07\x29\x2f\x0e\x3c\x9e\x0e\x74\x3b\x86\x5e\xd3\xaf\x2c\x36\x0c\x68\xeb\xcc\x26\x03\xcd\x78\x73\xdf\xe4\xb9\xb5\x4c\x06\xc7\x82\x32\x91\x16\x79\x7e\x77\xd5\x6a\xbd\x72\x9a\x54\x2f\xc5\x7f\xfa\x17\xf4\x71\x8a\x5f\xc3\xe3\x5d\xe0\xd9\x2b\x4f\x4c\xac\x5c\xe0\x53\xf3\x64\xcd\xc6\xf0\xc1\xb1\x53\x4e\x4b\xf1\xb2\x5c\x4d\xfe\xce\xe9\xd6\xe0\xa3\x6b\xed\xbc\xaa\x49\x9e\x15\xf0\x4e\x5e\x7c\xf4\xac\xee\x08\x34\xee\x20\x60\x5d\x26\x2d\x5e\xa9\xc2\xc6\x57\x10\x98\xb6\xa0\x38\xbe\xcb\x3f\xc2\x5e\xb3\x0b\xd0\xe0\x7c\x6a\xb2\x94\xfe\xaa\xef\x04\x37\x63\xf8\x48\xe1\xf2\xf1\x61\xfd\x9e\xbd\xd0\xda\xf2\x07\x74\x20\xab\x36\x86\x4a\x3b\x05\xba\x8a\x77\x54\x85\xd6\xde\xa7\x98\x75\x35\x1e\x62\xb4\xc1\xdf\xa8\xa6\xa8\x72\xc6\x93\xc6\x8b\xd9\x10\x23\x9a\x8d\xc6\xfb\x4d\x4b\xba\x96\xd5\xe9\x7f\x15\xab\xbd\x0b\xbc\x3f\x57\xc7\xcd\x34\xea\xe9\x39\x67\x12\xb9\xf9\xa2\x46\x94\xf3\x7d\x79\x89\x9b\x80\xd1\xb5\x41\x61\x94\x62\x38\x29\x81\x31\x18\xb2\xc0\xe4\xec\x23\xc6\x98\x3a\x8c\x04\xd5\xd8\x55\x59\xb0\xd4\xae\xf9\x28\xe9\x00\xe9\x1b\x69\xfc\x07\x6a\x1a\x2b\xe7\xdc\x1b\xcf\xfd\x03\x85\xd9\x6c\xd7\xb2\x8f\xda\x30\x77\x73\x85\xfa\xf4\xb5\x88\x8c\x96\x5f\xf7\xf5\x97\x1a\xc8\xc8\x0c\x8e\x4a\x8e\xa7\xb3\x5c\x0e\xd4\x34\x07\x21\x96\x87\x05\xfd\x3d\x51\xb5\xdc\xa5\x15\x53\x4c\xd4\x8d\xf6\x0a\x02\x98\x09\x39\xb4\xec\x0c\x30\x29\x29\x38\xb4\x78\xbe\x4e\x53\xaf\x6c\xca\x2b\xdc\x6e\x83\xcb\x60\x8e\x5f\xb5\x3d\x82\x35\x07\x04\xf3\x02\xcd\x27\x1a\x39\x6d\xa3\xbf\x3c\xc0\xf9\x02\xfb\x32\xf2\x8f\x96\xe9\x9f\x00\x00\x00\xff\xff\x59\x5a\xad\x78\xf0\x07\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcd\x6e\xe3\x38\x0c\xbe\xe7\x29\x84\xde\x1d\xa3\x7b\x54\x4f\x8b\x74\x17\xd8\x43\x8b\xa0\x29\x7a\x67\x64\xc6\xe1\x8e\xfe\x40\xd1\x9e\x09\x82\xbe\xfb\x40\x71\xea\xc8\x69\xd2\x4e\x0f\x33\x3a\x99\xa4\x48\x7e\xe4\x47\x53\x10\xe9\x05\x39\x51\xf0\x5a\x41\x8c\x69\x1e\x22\xfa\xb4\xa5\x8d\xcc\x29\xd4\xfd\xed\xec\x1b\xf9\x46\xab\x7b\x8c\x36\xec\x1c\x7a\x59\x04\xbf\xa1\x76\xe6\x50\xa0\x01\x01\x3d\x53\xca\xc2\x1a\x6d\xca\x5f\x2a\xc7\xd0\x6a\xbf\x9f\x3f\x82\xc3\xd7\xd7\x99\x52\x1e\x1c\x96\x9a\x14\xd1\xe4\xab\x8c\xd1\x92\x81\xa4\xd5\xed\x4c\xa9\x84\x16\x8d\x04\xbe\x12\x44\xa9\x66\x04\x60\x0e\x00\xa6\xf6\x24\x0c\x82\xed\x6e\x70\x97\x5d\x44\xad\x9e\x82\xb5\xe4\xdb\x99\x52\x82\x2e\x5a\x10\x1c\xac\x25\xf2\x7c\x4a\xf4\x57\x92\x7f\x0e\x20\x9f\xf3\x4a\xb3\xee\xad\xda\x7c\x4c\xf0\x02\xe4\x91\xc7\x64\x95\x02\x6e\x8b\xd4\x95\xaa\x4c\x21\xd4\x3d\x70\x6d\x69\x5d\xa7\x2e\x22\xf7\x94\x02\x37\x75\xce\x5e\x28\xe6\x59\x1e\x7d\x4c\x70\x0e\x7c\xa3\x3f\x0b\xb2\x26\x5f\xca\xe3\x75\xf4\xfd\xc9\x77\xbf\x57\x0c\xbe\x45\x35\x5f\x45\x34\xf3\x7f\x7c\x9f\x54\xd1\x90\xea\x62\xc1\xc3\xe9\xc1\x76\x83\xe9\x25\x7f\x15\xb6\xfd\x1e\x7d\x53\xc8\xe4\xa0\x1d\x6e\x1e\x92\x3c\x75\x5e\xc8\xe1\x10\x50\x67\xd2\x92\x4c\xef\x2e\x3b\x6b\x97\xc1\x92\xd9\x69\xf5\xb7\xfd\x0e\xbb\x34\xda\xaf\xe1\x89\x81\x65\xd2\xe5\x91\x89\x65\x60\x39\x25\xcf\xd2\xa4\x8c\xc8\x41\x82\x09\x56\xab\xe7\xc5\x72\xd4\xf7\xc1\x76\x0e\x1f\x42\xe7\xa7\x51\x5d\xd6\x2c\x41\xb6\xfa\x62\xd3\x8b\xb8\x03\xd0\xb4\x05\xc6\xa6\xca\xb3\x78\x25\x8a\xb8\x58\x03\x0b\x6d\xc0\x48\x7a\xe7\xff\x06\x7b\x25\x81\xa1\xc5\x69\xd5\xe4\x29\xff\xaa\xef\x06\x6e\xc2\xf0\x1b\x85\x8b\x87\xfb\xd5\x7b\xf6\xb8\xf3\xd5\xff\xd0\x83\xae\xbb\xc4\xb5\x0d\x06\x6c\x9d\xfe\xa2\x9a\x3b\x7f\x97\x6d\x3e\x34\x78\xb4\xd1\x1a\x7f\xa0\x19\xad\x26\xb8\x48\x16\x2f\x7a\x43\x4a\xe8\xd6\x16\xef\xd6\x1d\xd9\x46\xd7\xa7\xff\x2a\xd5\x07\x15\xc4\x78\x3e\x1d\x37\x63\xa9\xa7\x76\x4e\x46\xe4\xe6\x8b\x33\x62\x42\xdc\x55\x97\xb8\x61\x4c\xa1\x63\x83\x49\xab\xfd\x69\x12\x04\xd9\x91\x07\xa1\xe0\x1f\x30\xa5\x9c\x61\x20\xa8\xc1\xbe\x2e\x8c\x95\x0d\xed\x47\x4e\x47\x48\xff\x92\xc5\x3f\x30\x4d\x43\xe4\x92\x7b\x17\x65\x77\x4f\x3c\xa9\xed\x9a\x77\xf5\x2b\x53\xa6\x54\xcc\x8f\x47\x12\xf4\xf2\x72\x48\xb7\xb0\x40\x4e\x17\xe8\x4c\x56\x3c\x7e\x1c\x4a\x98\xda\xf6\x38\xa6\xd5\x71\x7d\xff\x97\x89\x5c\x6c\xf3\x02\x9a\x8d\xc4\x0e\xf2\x12\x18\xdc\x58\x17\x74\x12\x1c\x08\x19\xad\x84\x3b\x3c\x5f\xb6\x39\x49\xd1\x83\x2b\xcc\x6f\x38\x14\xa8\x87\x37\xef\x80\x60\x25\x8c\xe0\x9e\xa1\xfd\x64\x82\x4e\xbb\xea\x37\x17\x70\xbe\xde\xbe\x8c\xfc\xa3\x55\xfb\x33\x00\x00\xff\xff\x9b\x1f\x53\x16\x0e\x08\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", From b51650b1bea30234c688b6238cae9e4c57c99b61 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Mon, 17 Dec 2018 18:56:45 +0100 Subject: [PATCH 37/62] Add new templates supporting Deployment, Ingress and change logic to detect if the platform is k8s or openshift (#24) --- assets_vfsdata.go | 20 ++++++++++++-- tmpl/innerloop/deployment | 57 +++++++++++++++++++++++++++++++++++++++ tmpl/innerloop/ingress | 15 +++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 tmpl/innerloop/deployment create mode 100644 tmpl/innerloop/ingress diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 0771cc9..f2898d9 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,11 +25,18 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 12, 11, 11, 6, 30, 472483788, time.UTC), + modTime: time.Date(2018, 12, 14, 18, 28, 43, 861820694, time.UTC), + }, + "/innerloop/deployment": &vfsgen۰CompressedFileInfo{ + name: "deployment", + modTime: time.Date(2018, 12, 14, 17, 38, 14, 388654090, time.UTC), + uncompressedSize: 1558, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x52\xdc\x30\x0c\xbd\xef\x57\xf8\x07\xb2\x1e\x38\x9a\x53\x67\x69\x4f\x85\xd9\x19\x3a\xdc\x15\x47\x2c\x6a\x6d\xcb\xb5\x95\xd0\x9d\x0c\xff\xde\xf1\x06\x82\x53\x02\x74\x7a\xa8\x4e\x91\x94\xf7\xfc\xe4\xa7\x31\x44\xba\xc5\x94\x89\x83\x51\x10\x63\xd6\xc3\xd9\xe6\x07\x85\xce\xa8\x4b\x8c\x8e\x8f\x1e\x83\x6c\x3c\x0a\x74\x20\x60\x36\x4a\x39\x68\xd1\xe5\xf2\xa5\x0a\xc0\xa8\x71\xdc\x5e\x83\xc7\xc7\xc7\x8d\x52\x01\x3c\xd6\x95\x1c\xd1\x96\x5f\x13\x46\x47\x16\xb2\x51\x67\x1b\xa5\x32\x3a\xb4\xc2\x69\x22\xf1\x20\xf6\xfe\x6b\xc5\xba\xc2\x2b\xe8\xa3\x03\xc1\x27\x44\x25\xa7\x84\x5b\x80\x57\xe0\x25\xfe\x94\x56\x6a\xcf\xf2\x4a\x58\x0e\x02\x14\x30\xcd\x44\x8d\x82\x74\xa8\x68\x1b\xd5\xd8\x2a\xd1\x03\x24\xed\xa8\xd5\xb9\x8f\x98\x06\xca\x9c\x3a\x6d\x39\xdc\x55\x85\x6d\xc9\x67\x8c\x65\xef\x21\x74\xe6\x23\x92\x96\x42\x9d\xcf\xbf\x63\x18\x5e\xb0\xe3\xa8\x12\x84\x03\xaa\xed\x4d\x44\xbb\xfd\x1c\x86\xac\xe6\x61\x0b\xf5\xda\xc0\x53\x0c\xe0\xfa\xa9\x75\x5b\xbe\xaa\xde\x38\x62\xe8\xaa\x9c\x3c\x1c\xd0\xa8\x9f\x3d\x1c\xb7\xc4\x3a\x07\x7e\xe8\x12\x47\x9d\x63\xa2\x70\x68\x5a\x66\x69\xf2\x39\x99\xe2\x4d\x96\x25\x6c\xdf\x3b\xb7\x67\x47\xf6\x68\xd4\x27\xf7\x00\xc7\x3c\xf7\xdf\x92\x16\x39\xc9\xe2\xc2\x67\x53\xf6\x9c\xe4\x84\x38\x0d\x5b\xb2\xc5\x44\x31\xb1\xb0\x65\x67\xd4\xb7\xdd\x7e\xae\x0f\xec\x7a\x8f\x57\xdc\x87\x25\xab\x2f\x95\x3d\xc8\xbd\x59\xbd\xff\x8a\x77\x12\x9a\xef\x21\x61\xd7\x94\x95\x7b\x83\x45\x7c\xd4\x90\x84\xee\xc0\x4a\x7e\x85\x7f\x96\x7d\x23\x9c\xe0\x80\xcb\xa9\x29\x90\xec\x56\x76\x6f\x61\xf6\xb3\x9b\xbb\xab\xcb\x9b\xd7\x46\xa6\x3e\x34\xdf\x61\x00\xa3\xfb\x9c\xb4\x63\x0b\x4e\xe7\x73\xd2\xa9\x0f\x17\xa5\x17\xb8\xc3\xa7\x1e\xb5\xf8\x0b\xed\xdc\xb5\xec\x23\x39\x5c\x45\x43\xce\xe8\x5b\x87\x17\x6d\x4f\xae\x33\xba\x9b\xdf\x83\xac\x4f\x25\x88\xf1\xe3\x45\x79\xb9\xd6\x7f\x5b\x12\xcb\xf1\xd8\xac\x99\x23\x98\x3c\x05\x10\xe2\x70\x85\x39\x17\xae\xc9\x8b\x0e\x07\x5d\x35\x1b\xc7\x87\xf7\x40\x4f\x87\x7f\x21\x87\xff\x61\x71\x26\xe6\xda\x66\x1f\xe5\x78\x49\xc9\xa8\xf1\x71\xf3\x11\xba\xf9\x9b\x85\x52\x2a\x96\x07\x3d\x0b\x06\xb9\x3d\x1d\xb7\x73\x40\xde\x54\xea\x6c\x29\x5c\xbf\x43\xf5\x3b\x00\x00\xff\xff\x7e\xf0\xac\xb5\x16\x06\x00\x00"), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 12, 11, 11, 6, 30, 471117322, time.UTC), + modTime: time.Date(2018, 12, 11, 11, 20, 19, 144666461, time.UTC), uncompressedSize: 2062, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcd\x6e\xe3\x38\x0c\xbe\xe7\x29\x84\xde\x1d\xa3\x7b\x54\x4f\x8b\x74\x17\xd8\x43\x8b\xa0\x29\x7a\x67\x64\xc6\xe1\x8e\xfe\x40\xd1\x9e\x09\x82\xbe\xfb\x40\x71\xea\xc8\x69\xd2\x4e\x0f\x33\x3a\x99\xa4\x48\x7e\xe4\x47\x53\x10\xe9\x05\x39\x51\xf0\x5a\x41\x8c\x69\x1e\x22\xfa\xb4\xa5\x8d\xcc\x29\xd4\xfd\xed\xec\x1b\xf9\x46\xab\x7b\x8c\x36\xec\x1c\x7a\x59\x04\xbf\xa1\x76\xe6\x50\xa0\x01\x01\x3d\x53\xca\xc2\x1a\x6d\xca\x5f\x2a\xc7\xd0\x6a\xbf\x9f\x3f\x82\xc3\xd7\xd7\x99\x52\x1e\x1c\x96\x9a\x14\xd1\xe4\xab\x8c\xd1\x92\x81\xa4\xd5\xed\x4c\xa9\x84\x16\x8d\x04\xbe\x12\x44\xa9\x66\x04\x60\x0e\x00\xa6\xf6\x24\x0c\x82\xed\x6e\x70\x97\x5d\x44\xad\x9e\x82\xb5\xe4\xdb\x99\x52\x82\x2e\x5a\x10\x1c\xac\x25\xf2\x7c\x4a\xf4\x57\x92\x7f\x0e\x20\x9f\xf3\x4a\xb3\xee\xad\xda\x7c\x4c\xf0\x02\xe4\x91\xc7\x64\x95\x02\x6e\x8b\xd4\x95\xaa\x4c\x21\xd4\x3d\x70\x6d\x69\x5d\xa7\x2e\x22\xf7\x94\x02\x37\x75\xce\x5e\x28\xe6\x59\x1e\x7d\x4c\x70\x0e\x7c\xa3\x3f\x0b\xb2\x26\x5f\xca\xe3\x75\xf4\xfd\xc9\x77\xbf\x57\x0c\xbe\x45\x35\x5f\x45\x34\xf3\x7f\x7c\x9f\x54\xd1\x90\xea\x62\xc1\xc3\xe9\xc1\x76\x83\xe9\x25\x7f\x15\xb6\xfd\x1e\x7d\x53\xc8\xe4\xa0\x1d\x6e\x1e\x92\x3c\x75\x5e\xc8\xe1\x10\x50\x67\xd2\x92\x4c\xef\x2e\x3b\x6b\x97\xc1\x92\xd9\x69\xf5\xb7\xfd\x0e\xbb\x34\xda\xaf\xe1\x89\x81\x65\xd2\xe5\x91\x89\x65\x60\x39\x25\xcf\xd2\xa4\x8c\xc8\x41\x82\x09\x56\xab\xe7\xc5\x72\xd4\xf7\xc1\x76\x0e\x1f\x42\xe7\xa7\x51\x5d\xd6\x2c\x41\xb6\xfa\x62\xd3\x8b\xb8\x03\xd0\xb4\x05\xc6\xa6\xca\xb3\x78\x25\x8a\xb8\x58\x03\x0b\x6d\xc0\x48\x7a\xe7\xff\x06\x7b\x25\x81\xa1\xc5\x69\xd5\xe4\x29\xff\xaa\xef\x06\x6e\xc2\xf0\x1b\x85\x8b\x87\xfb\xd5\x7b\xf6\xb8\xf3\xd5\xff\xd0\x83\xae\xbb\xc4\xb5\x0d\x06\x6c\x9d\xfe\xa2\x9a\x3b\x7f\x97\x6d\x3e\x34\x78\xb4\xd1\x1a\x7f\xa0\x19\xad\x26\xb8\x48\x16\x2f\x7a\x43\x4a\xe8\xd6\x16\xef\xd6\x1d\xd9\x46\xd7\xa7\xff\x2a\xd5\x07\x15\xc4\x78\x3e\x1d\x37\x63\xa9\xa7\x76\x4e\x46\xe4\xe6\x8b\x33\x62\x42\xdc\x55\x97\xb8\x61\x4c\xa1\x63\x83\x49\xab\xfd\x69\x12\x04\xd9\x91\x07\xa1\xe0\x1f\x30\xa5\x9c\x61\x20\xa8\xc1\xbe\x2e\x8c\x95\x0d\xed\x47\x4e\x47\x48\xff\x92\xc5\x3f\x30\x4d\x43\xe4\x92\x7b\x17\x65\x77\x4f\x3c\xa9\xed\x9a\x77\xf5\x2b\x53\xa6\x54\xcc\x8f\x47\x12\xf4\xf2\x72\x48\xb7\xb0\x40\x4e\x17\xe8\x4c\x56\x3c\x7e\x1c\x4a\x98\xda\xf6\x38\xa6\xd5\x71\x7d\xff\x97\x89\x5c\x6c\xf3\x02\x9a\x8d\xc4\x0e\xf2\x12\x18\xdc\x58\x17\x74\x12\x1c\x08\x19\xad\x84\x3b\x3c\x5f\xb6\x39\x49\xd1\x83\x2b\xcc\x6f\x38\x14\xa8\x87\x37\xef\x80\x60\x25\x8c\xe0\x9e\xa1\xfd\x64\x82\x4e\xbb\xea\x37\x17\x70\xbe\xde\xbe\x8c\xfc\xa3\x55\xfb\x33\x00\x00\xff\xff\x9b\x1f\x53\x16\x0e\x08\x00\x00"), @@ -41,6 +48,13 @@ var Assets = func() http.FileSystem { compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x8b\xdb\x30\x10\x85\xef\xfe\x15\xc3\xd2\x6b\x6c\xb6\x47\x85\x1e\x96\xf6\x52\x28\xa5\x34\xd0\xfb\x44\x1e\xa7\x6a\x24\xcd\xa0\x91\x43\x83\xf0\x7f\x2f\x96\x15\xef\x16\xf6\x64\xfb\x7b\xf3\x66\x9e\x5f\x29\x1f\x22\x06\x7a\x11\x01\xf3\x09\xfa\xef\x18\x08\x96\x05\xc5\xfd\xa2\xa4\x8e\xa3\x81\xdb\x73\x77\x75\x71\x34\xf0\xcd\x69\xee\x5c\xa6\xa0\xa6\x2b\x05\x12\xc6\x0b\x41\x7f\x12\xb2\xfd\xd7\x80\x17\x52\x58\x96\xee\x00\x6f\xbd\x6e\xe5\x3d\x0b\x45\xfd\xed\xa6\xdc\x3b\x1e\x6e\xcf\x1d\xc0\xb6\xb0\xba\x4e\x39\x11\x86\x0e\x20\x50\xc6\x11\x33\x9a\x0e\x00\xc0\xe3\x99\xbc\x6e\xef\x00\x28\x62\xe0\x35\xea\xb2\x54\xbe\x7e\xad\xb8\xa6\xae\x4c\x85\x6c\xf3\x33\x5f\x67\xf9\xc1\xde\xd9\xfb\x63\x8b\x67\x8b\xde\xc0\x84\x5e\xa9\xa2\x52\xdc\x04\xfd\x17\xb6\x57\x4a\x35\x4c\x5b\x9c\xf1\xd2\x4e\x1f\xda\xcc\x4b\x8c\x9c\x31\x3b\x8e\x9f\xc3\xa8\x6d\x0c\x00\x77\xbc\x47\x05\xb0\x61\x54\x03\x4f\x69\x8e\x87\x3f\x78\x43\x33\xcc\x9a\x86\x7a\x7b\xd0\x8f\x6e\x48\x73\x3c\xae\x5a\xe4\x91\x9a\xe6\xce\xf4\x97\xec\xaa\x1e\x2d\x07\x71\x9e\xde\x75\xa2\x2a\x85\xb3\xa7\xe3\x79\x76\x7e\x34\xc3\x48\xe2\xf9\x1e\x28\x66\x1d\x2a\x42\x91\xa7\x16\xa3\x14\x8a\xe3\x9e\x73\x4a\x1c\x5e\x03\x6e\xed\xbf\xf9\xed\x5d\xd9\x1b\xfd\x49\xc2\xbb\xdb\x05\xe1\x94\x5b\x97\x50\x1e\x78\x1b\xf6\x98\x49\x73\x43\x89\x26\x4a\x14\x2d\xfd\x5f\x3c\x40\xbe\x0b\x19\x38\xf1\x9c\xec\xa3\xfa\x9a\xaf\x3d\xfe\x05\x00\x00\xff\xff\x5d\x16\x95\x07\x86\x02\x00\x00"), }, + "/innerloop/ingress": &vfsgen۰CompressedFileInfo{ + name: "ingress", + modTime: time.Date(2018, 12, 14, 18, 28, 43, 860373667, time.UTC), + uncompressedSize: 253, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8e\xc1\xaa\x83\x30\x10\x45\xf7\xf9\x8a\xfb\x03\x2a\x6e\xf3\x07\x6f\x23\x0f\x1e\xbc\xfd\x18\x87\x1a\xd4\x18\x32\x53\x29\x48\xfe\xbd\x44\xdb\x52\xda\xdd\x3d\x73\xce\x62\x28\xfa\x7f\x4e\xe2\xd7\x60\xc1\x37\xe5\x50\xa6\x34\x5b\xdb\xb3\x52\x6b\x26\x1f\x06\x8b\x9f\x70\x49\x2c\x62\x16\x56\x1a\x48\xc9\x1a\x20\xd0\xc2\x16\xfb\x5e\x77\xb4\x70\xce\x06\x98\xa9\xe7\x59\x8a\x03\x28\xc6\x77\x29\x91\x5d\x11\xe9\x3a\xf3\x51\x54\x18\x57\xd1\xb3\x1d\x55\xe3\xb9\x80\x48\x3a\xca\x13\xaa\x03\x2d\x9a\x07\x03\x3d\xb9\x89\xc3\x60\x5f\x07\x40\x38\x6d\xde\x71\xf7\xf5\xce\x47\xf0\xbb\x26\x3d\x82\xbf\xc8\xae\x2e\x94\xf3\x3d\x00\x00\xff\xff\x47\xfe\x76\xde\xfd\x00\x00\x00"), + }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", modTime: time.Date(2018, 10, 4, 9, 16, 23, 850123135, time.UTC), @@ -86,8 +100,10 @@ var Assets = func() http.FileSystem { fs["/servicecatalog"].(os.FileInfo), } fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/innerloop/deployment"].(os.FileInfo), fs["/innerloop/deploymentconfig"].(os.FileInfo), fs["/innerloop/imagestream"].(os.FileInfo), + fs["/innerloop/ingress"].(os.FileInfo), fs["/innerloop/pvc"].(os.FileInfo), fs["/innerloop/route"].(os.FileInfo), fs["/innerloop/service"].(os.FileInfo), diff --git a/tmpl/innerloop/deployment b/tmpl/innerloop/deployment new file mode 100644 index 0000000..c23fded --- /dev/null +++ b/tmpl/innerloop/deployment @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Name}} + name: {{.Name}} +spec: + replicas: 1 + selector: + matchLabels: + app: {{.Name}} + template: + metadata: + labels: + app: {{.Name}} + name: {{.Name}} + spec: + containers: + - args: + - -c + - /var/lib/supervisord/conf/supervisor.conf + command: + - /var/lib/supervisord/bin/supervisord + env: + {{ range .Spec.Envs }} + - name: {{.Name}} + value: {{.Value}} + {{end}} + image: quay.io/snowdrop/spring-boot-s2i:latest + imagePullPolicy: Always + name: {{.Name}} + ports: + - containerPort: {{.Spec.Port}} + protocol: TCP + volumeMounts: + - mountPath: /var/lib/supervisord + name: shared-data + - mountPath: /tmp/artifacts + name: {{.Spec.Storage.Name}} + initContainers: + - env: + - name: CMDS + value: run-java:/usr/local/s2i/run;run-node:/usr/libexec/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp + image: quay.io/snowdrop/supervisord:latest + imagePullPolicy: Always + name: copy-supervisord + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /var/lib/supervisord + name: shared-data + volumes: + - emptyDir: {} + name: shared-data + - name: {{.Spec.Storage.Name}} + persistentVolumeClaim: + claimName: {{.Spec.Storage.Name}} \ No newline at end of file diff --git a/tmpl/innerloop/ingress b/tmpl/innerloop/ingress new file mode 100644 index 0000000..8a10fa5 --- /dev/null +++ b/tmpl/innerloop/ingress @@ -0,0 +1,15 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{.Name}} + labels: + app: {{.Name}} +spec: + rules: + - host: + http: + paths: + - path: / + backend: + serviceName: {{.Name}} + servicePort: {{.Spec.Port}} \ No newline at end of file From 973572bcb4ac53801b4cc62fdc71baec1632b7f4 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 18 Dec 2018 11:54:31 +0100 Subject: [PATCH 38/62] Use as HOST the name of the service --- tmpl/innerloop/ingress | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmpl/innerloop/ingress b/tmpl/innerloop/ingress index 8a10fa5..6e70507 100644 --- a/tmpl/innerloop/ingress +++ b/tmpl/innerloop/ingress @@ -6,7 +6,7 @@ metadata: app: {{.Name}} spec: rules: - - host: + - host: {{.Name}} http: paths: - path: / From 6eb81b564d000d378d225b309a0eedd963d10e07 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 18 Dec 2018 11:58:25 +0100 Subject: [PATCH 39/62] Use as selector only app = name insdtead of deploymentconfig as it fails on k8s --- tmpl/innerloop/service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmpl/innerloop/service b/tmpl/innerloop/service index 0afe00f..92881a0 100644 --- a/tmpl/innerloop/service +++ b/tmpl/innerloop/service @@ -11,5 +11,4 @@ spec: protocol: TCP targetPort: {{.Spec.Port}} selector: - app: {{.Name}} - deploymentconfig: {{.Name}} \ No newline at end of file + app: {{.Name}} \ No newline at end of file From 83cc9b0aff839b132c70c0fab288aad53332fc24 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Fri, 21 Dec 2018 14:44:37 +0100 Subject: [PATCH 40/62] Regenerate the assets as the service do not include anymore the deploymentconfig label selector --- assets_vfsdata.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index f2898d9..e232731 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,11 +25,11 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 12, 14, 18, 28, 43, 861820694, time.UTC), + modTime: time.Date(2018, 12, 18, 10, 54, 50, 604165012, time.UTC), }, "/innerloop/deployment": &vfsgen۰CompressedFileInfo{ name: "deployment", - modTime: time.Date(2018, 12, 14, 17, 38, 14, 388654090, time.UTC), + modTime: time.Date(2018, 12, 17, 17, 56, 58, 564943567, time.UTC), uncompressedSize: 1558, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x52\xdc\x30\x0c\xbd\xef\x57\xf8\x07\xb2\x1e\x38\x9a\x53\x67\x69\x4f\x85\xd9\x19\x3a\xdc\x15\x47\x2c\x6a\x6d\xcb\xb5\x95\xd0\x9d\x0c\xff\xde\xf1\x06\x82\x53\x02\x74\x7a\xa8\x4e\x91\x94\xf7\xfc\xe4\xa7\x31\x44\xba\xc5\x94\x89\x83\x51\x10\x63\xd6\xc3\xd9\xe6\x07\x85\xce\xa8\x4b\x8c\x8e\x8f\x1e\x83\x6c\x3c\x0a\x74\x20\x60\x36\x4a\x39\x68\xd1\xe5\xf2\xa5\x0a\xc0\xa8\x71\xdc\x5e\x83\xc7\xc7\xc7\x8d\x52\x01\x3c\xd6\x95\x1c\xd1\x96\x5f\x13\x46\x47\x16\xb2\x51\x67\x1b\xa5\x32\x3a\xb4\xc2\x69\x22\xf1\x20\xf6\xfe\x6b\xc5\xba\xc2\x2b\xe8\xa3\x03\xc1\x27\x44\x25\xa7\x84\x5b\x80\x57\xe0\x25\xfe\x94\x56\x6a\xcf\xf2\x4a\x58\x0e\x02\x14\x30\xcd\x44\x8d\x82\x74\xa8\x68\x1b\xd5\xd8\x2a\xd1\x03\x24\xed\xa8\xd5\xb9\x8f\x98\x06\xca\x9c\x3a\x6d\x39\xdc\x55\x85\x6d\xc9\x67\x8c\x65\xef\x21\x74\xe6\x23\x92\x96\x42\x9d\xcf\xbf\x63\x18\x5e\xb0\xe3\xa8\x12\x84\x03\xaa\xed\x4d\x44\xbb\xfd\x1c\x86\xac\xe6\x61\x0b\xf5\xda\xc0\x53\x0c\xe0\xfa\xa9\x75\x5b\xbe\xaa\xde\x38\x62\xe8\xaa\x9c\x3c\x1c\xd0\xa8\x9f\x3d\x1c\xb7\xc4\x3a\x07\x7e\xe8\x12\x47\x9d\x63\xa2\x70\x68\x5a\x66\x69\xf2\x39\x99\xe2\x4d\x96\x25\x6c\xdf\x3b\xb7\x67\x47\xf6\x68\xd4\x27\xf7\x00\xc7\x3c\xf7\xdf\x92\x16\x39\xc9\xe2\xc2\x67\x53\xf6\x9c\xe4\x84\x38\x0d\x5b\xb2\xc5\x44\x31\xb1\xb0\x65\x67\xd4\xb7\xdd\x7e\xae\x0f\xec\x7a\x8f\x57\xdc\x87\x25\xab\x2f\x95\x3d\xc8\xbd\x59\xbd\xff\x8a\x77\x12\x9a\xef\x21\x61\xd7\x94\x95\x7b\x83\x45\x7c\xd4\x90\x84\xee\xc0\x4a\x7e\x85\x7f\x96\x7d\x23\x9c\xe0\x80\xcb\xa9\x29\x90\xec\x56\x76\x6f\x61\xf6\xb3\x9b\xbb\xab\xcb\x9b\xd7\x46\xa6\x3e\x34\xdf\x61\x00\xa3\xfb\x9c\xb4\x63\x0b\x4e\xe7\x73\xd2\xa9\x0f\x17\xa5\x17\xb8\xc3\xa7\x1e\xb5\xf8\x0b\xed\xdc\xb5\xec\x23\x39\x5c\x45\x43\xce\xe8\x5b\x87\x17\x6d\x4f\xae\x33\xba\x9b\xdf\x83\xac\x4f\x25\x88\xf1\xe3\x45\x79\xb9\xd6\x7f\x5b\x12\xcb\xf1\xd8\xac\x99\x23\x98\x3c\x05\x10\xe2\x70\x85\x39\x17\xae\xc9\x8b\x0e\x07\x5d\x35\x1b\xc7\x87\xf7\x40\x4f\x87\x7f\x21\x87\xff\x61\x71\x26\xe6\xda\x66\x1f\xe5\x78\x49\xc9\xa8\xf1\x71\xf3\x11\xba\xf9\x9b\x85\x52\x2a\x96\x07\x3d\x0b\x06\xb9\x3d\x1d\xb7\x73\x40\xde\x54\xea\x6c\x29\x5c\xbf\x43\xf5\x3b\x00\x00\xff\xff\x7e\xf0\xac\xb5\x16\x06\x00\x00"), @@ -50,10 +50,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/ingress": &vfsgen۰CompressedFileInfo{ name: "ingress", - modTime: time.Date(2018, 12, 14, 18, 28, 43, 860373667, time.UTC), - uncompressedSize: 253, + modTime: time.Date(2018, 12, 18, 10, 49, 29, 941218111, time.UTC), + uncompressedSize: 263, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8e\xc1\xaa\x83\x30\x10\x45\xf7\xf9\x8a\xfb\x03\x2a\x6e\xf3\x07\x6f\x23\x0f\x1e\xbc\xfd\x18\x87\x1a\xd4\x18\x32\x53\x29\x48\xfe\xbd\x44\xdb\x52\xda\xdd\x3d\x73\xce\x62\x28\xfa\x7f\x4e\xe2\xd7\x60\xc1\x37\xe5\x50\xa6\x34\x5b\xdb\xb3\x52\x6b\x26\x1f\x06\x8b\x9f\x70\x49\x2c\x62\x16\x56\x1a\x48\xc9\x1a\x20\xd0\xc2\x16\xfb\x5e\x77\xb4\x70\xce\x06\x98\xa9\xe7\x59\x8a\x03\x28\xc6\x77\x29\x91\x5d\x11\xe9\x3a\xf3\x51\x54\x18\x57\xd1\xb3\x1d\x55\xe3\xb9\x80\x48\x3a\xca\x13\xaa\x03\x2d\x9a\x07\x03\x3d\xb9\x89\xc3\x60\x5f\x07\x40\x38\x6d\xde\x71\xf7\xf5\xce\x47\xf0\xbb\x26\x3d\x82\xbf\xc8\xae\x2e\x94\xf3\x3d\x00\x00\xff\xff\x47\xfe\x76\xde\xfd\x00\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8e\x4d\x8a\x84\x30\x10\x85\xf7\x39\xc5\xbb\x80\x8a\xdb\xdc\x60\x36\x32\x30\x30\xfb\x32\x16\x63\x50\x63\x48\xd5\x48\x83\xe4\xee\x4d\xb4\xbb\xe9\x9f\x5d\x7d\xf5\xbd\x47\x15\x45\xff\xcb\x49\xfc\x1a\x2c\xf8\xa2\x1c\xca\x28\xcd\xd6\xf6\xac\xd4\x9a\xc9\x87\xc1\xe2\x2b\xfc\x25\x16\x31\x0b\x2b\x0d\xa4\x64\x0d\x10\x68\x61\x8b\x7d\xaf\x3b\x5a\x38\x67\x03\xcc\xd4\xf3\x2c\xc5\x01\x14\xe3\xb3\x94\xc8\xae\x88\xf4\x3f\xf3\x91\xa8\x30\xae\xa2\xaf\x7d\x60\x54\x8d\x67\x1f\x88\xa4\xa3\xdc\xa1\x3a\xd0\xa2\xb9\x31\xd0\x93\x9b\x38\x0c\xf6\xb1\x00\x84\xd3\xe6\x1d\x77\x1f\x8f\xbd\x05\xbe\xd7\x74\x5e\xfe\x89\xec\xea\x42\x39\x5f\x03\x00\x00\xff\xff\x62\x5b\x6a\xf3\x07\x01\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", @@ -71,10 +71,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/service": &vfsgen۰CompressedFileInfo{ name: "service", - modTime: time.Date(2018, 10, 4, 7, 33, 27, 665611911, time.UTC), - uncompressedSize: 257, + modTime: time.Date(2018, 12, 18, 10, 54, 50, 603330390, time.UTC), + uncompressedSize: 225, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\x31\x8a\xc3\x30\x10\x45\x7b\x9d\x62\x2e\xb0\x86\x6d\xd5\x6e\xbf\x18\xbc\x6c\x3f\x91\x7f\x8c\x88\xa4\x19\xa4\xc1\x10\x8c\xef\x1e\x2c\x52\x24\x24\xe9\x86\x79\xef\xc1\x67\x8d\xff\xa8\x2d\x4a\xf1\xb4\x7e\xbb\x4b\x2c\xb3\xa7\x09\x75\x8d\x01\x2e\xc3\x78\x66\x63\xef\x88\x0a\x67\x78\xda\xb6\xe1\x97\x33\xf6\xdd\x11\x25\x3e\x21\xb5\x83\x11\xb1\xea\x33\x7c\x0d\x9a\x22\x1c\xb2\x4a\xb5\x5e\x7d\xf5\xb3\x2b\x93\x22\x0c\xa3\x54\xbb\xb7\x5a\xc5\x24\x48\xf2\xf4\xf7\x33\xf6\x8f\x71\x5d\x60\xe3\xfb\xa0\x21\x21\x98\xd4\x8f\x5b\x66\x68\x92\x6b\x46\xb1\x20\xe5\x1c\x97\x07\x7e\x0b\x00\x00\xff\xff\x7c\x58\xa5\x67\x01\x01\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xce\xb1\xca\xc3\x30\x0c\x04\xe0\xdd\x4f\xa1\x17\xf8\x03\xff\xea\xb5\x7b\x09\xa4\x74\x57\x9d\xa3\x98\x3a\x96\x90\x45\x96\x90\x77\x2f\x31\x5d\x4a\xb3\x09\xdd\x7d\x70\xac\xf9\x0e\x6b\x59\x6a\xa4\xf5\x3f\xbc\x72\x9d\x23\x4d\xb0\x35\x27\x84\x05\xce\x33\x3b\xc7\x40\x54\x79\x41\xa4\x6d\x1b\xae\xbc\x60\xdf\x03\x51\xe1\x07\x4a\x3b\x32\x22\x56\xfd\x0e\x7f\x41\x53\xa4\xa3\xac\x62\xde\xd5\x5f\x3f\x7b\x65\x52\xa4\x61\x14\xf3\x8f\x55\x13\x97\x24\x25\xd2\xed\x32\xf6\x8f\xb3\x3d\xe1\xe3\x39\x68\x28\x48\x2e\x76\xb6\xe5\x1d\x00\x00\xff\xff\xe4\x1b\xba\x42\xe1\x00\x00\x00"), }, "/servicecatalog": &vfsgen۰DirInfo{ name: "servicecatalog", From a70072967db84f40a16ad23903018d5bc0306ae3 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 22 Jan 2019 19:24:10 +0100 Subject: [PATCH 41/62] Set labels using k8s recommended labels --- assets_vfsdata.go | 52 ++++++++++++++++----------------- template.go | 1 + tmpl/innerloop/deployment | 3 +- tmpl/innerloop/deploymentconfig | 3 +- tmpl/innerloop/imagestream | 3 +- tmpl/innerloop/ingress | 3 +- tmpl/innerloop/pvc | 2 ++ tmpl/innerloop/route | 2 ++ tmpl/innerloop/service | 2 ++ 9 files changed, 41 insertions(+), 30 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index e232731..42feb56 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -21,75 +21,75 @@ var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2018, 10, 11, 9, 22, 1, 958566131, time.UTC), + modTime: time.Date(2018, 12, 21, 14, 56, 32, 787887750, time.UTC), }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2018, 12, 18, 10, 54, 50, 604165012, time.UTC), + modTime: time.Date(2019, 1, 22, 18, 11, 45, 162213374, time.UTC), }, "/innerloop/deployment": &vfsgen۰CompressedFileInfo{ name: "deployment", - modTime: time.Date(2018, 12, 17, 17, 56, 58, 564943567, time.UTC), - uncompressedSize: 1558, + modTime: time.Date(2019, 1, 22, 18, 11, 45, 160657195, time.UTC), + uncompressedSize: 1642, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x52\xdc\x30\x0c\xbd\xef\x57\xf8\x07\xb2\x1e\x38\x9a\x53\x67\x69\x4f\x85\xd9\x19\x3a\xdc\x15\x47\x2c\x6a\x6d\xcb\xb5\x95\xd0\x9d\x0c\xff\xde\xf1\x06\x82\x53\x02\x74\x7a\xa8\x4e\x91\x94\xf7\xfc\xe4\xa7\x31\x44\xba\xc5\x94\x89\x83\x51\x10\x63\xd6\xc3\xd9\xe6\x07\x85\xce\xa8\x4b\x8c\x8e\x8f\x1e\x83\x6c\x3c\x0a\x74\x20\x60\x36\x4a\x39\x68\xd1\xe5\xf2\xa5\x0a\xc0\xa8\x71\xdc\x5e\x83\xc7\xc7\xc7\x8d\x52\x01\x3c\xd6\x95\x1c\xd1\x96\x5f\x13\x46\x47\x16\xb2\x51\x67\x1b\xa5\x32\x3a\xb4\xc2\x69\x22\xf1\x20\xf6\xfe\x6b\xc5\xba\xc2\x2b\xe8\xa3\x03\xc1\x27\x44\x25\xa7\x84\x5b\x80\x57\xe0\x25\xfe\x94\x56\x6a\xcf\xf2\x4a\x58\x0e\x02\x14\x30\xcd\x44\x8d\x82\x74\xa8\x68\x1b\xd5\xd8\x2a\xd1\x03\x24\xed\xa8\xd5\xb9\x8f\x98\x06\xca\x9c\x3a\x6d\x39\xdc\x55\x85\x6d\xc9\x67\x8c\x65\xef\x21\x74\xe6\x23\x92\x96\x42\x9d\xcf\xbf\x63\x18\x5e\xb0\xe3\xa8\x12\x84\x03\xaa\xed\x4d\x44\xbb\xfd\x1c\x86\xac\xe6\x61\x0b\xf5\xda\xc0\x53\x0c\xe0\xfa\xa9\x75\x5b\xbe\xaa\xde\x38\x62\xe8\xaa\x9c\x3c\x1c\xd0\xa8\x9f\x3d\x1c\xb7\xc4\x3a\x07\x7e\xe8\x12\x47\x9d\x63\xa2\x70\x68\x5a\x66\x69\xf2\x39\x99\xe2\x4d\x96\x25\x6c\xdf\x3b\xb7\x67\x47\xf6\x68\xd4\x27\xf7\x00\xc7\x3c\xf7\xdf\x92\x16\x39\xc9\xe2\xc2\x67\x53\xf6\x9c\xe4\x84\x38\x0d\x5b\xb2\xc5\x44\x31\xb1\xb0\x65\x67\xd4\xb7\xdd\x7e\xae\x0f\xec\x7a\x8f\x57\xdc\x87\x25\xab\x2f\x95\x3d\xc8\xbd\x59\xbd\xff\x8a\x77\x12\x9a\xef\x21\x61\xd7\x94\x95\x7b\x83\x45\x7c\xd4\x90\x84\xee\xc0\x4a\x7e\x85\x7f\x96\x7d\x23\x9c\xe0\x80\xcb\xa9\x29\x90\xec\x56\x76\x6f\x61\xf6\xb3\x9b\xbb\xab\xcb\x9b\xd7\x46\xa6\x3e\x34\xdf\x61\x00\xa3\xfb\x9c\xb4\x63\x0b\x4e\xe7\x73\xd2\xa9\x0f\x17\xa5\x17\xb8\xc3\xa7\x1e\xb5\xf8\x0b\xed\xdc\xb5\xec\x23\x39\x5c\x45\x43\xce\xe8\x5b\x87\x17\x6d\x4f\xae\x33\xba\x9b\xdf\x83\xac\x4f\x25\x88\xf1\xe3\x45\x79\xb9\xd6\x7f\x5b\x12\xcb\xf1\xd8\xac\x99\x23\x98\x3c\x05\x10\xe2\x70\x85\x39\x17\xae\xc9\x8b\x0e\x07\x5d\x35\x1b\xc7\x87\xf7\x40\x4f\x87\x7f\x21\x87\xff\x61\x71\x26\xe6\xda\x66\x1f\xe5\x78\x49\xc9\xa8\xf1\x71\xf3\x11\xba\xf9\x9b\x85\x52\x2a\x96\x07\x3d\x0b\x06\xb9\x3d\x1d\xb7\x73\x40\xde\x54\xea\x6c\x29\x5c\xbf\x43\xf5\x3b\x00\x00\xff\xff\x7e\xf0\xac\xb5\x16\x06\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x41\x4f\xdc\x3c\x10\xbd\xef\xaf\xf0\x81\xe3\x97\x58\x70\x34\xfa\x0e\xd5\xd2\x9e\x58\xba\x12\x15\xf7\x89\x33\x2c\x06\xdb\xe3\xda\x93\xd0\x28\xca\x7f\xaf\x9c\x40\x48\x60\x81\xaa\x87\xfa\xe4\x99\xf1\x7b\x7e\xe3\x37\x4a\x20\x98\x1b\x8c\xc9\x90\x57\x02\x42\x48\xb2\x3d\xdd\x3c\x18\x5f\x2b\x71\x81\xc1\x52\xe7\xd0\xf3\xc6\x21\x43\x0d\x0c\x6a\x23\x84\x85\x0a\x6d\xca\x3b\x91\x01\x4a\xf4\x7d\x79\x05\x0e\x87\xa1\xef\x45\x04\x7f\x40\x71\xf2\x80\xdd\x7f\xe2\xa4\x05\xdb\xa0\x50\xff\x8b\xf2\x7b\x75\x8f\x9a\x77\xc8\x50\x5e\x8e\x70\x31\x0c\x23\x41\xdf\x8f\x87\xc5\x30\xa8\x71\x3f\x41\x46\x2a\xf4\xf5\x74\xca\x83\xc3\xc5\x2d\x9b\x14\x50\xe7\xeb\x23\x06\x6b\x34\x24\x25\x4e\x37\x42\x24\xb4\xa8\x99\xe2\x24\xcc\x01\xeb\xbb\xcb\x85\xd2\xd7\x5a\x37\x42\x30\xba\x60\x81\xf1\x09\xb1\x68\x31\x2f\xbb\x02\x1f\x81\xe7\xf5\x5a\x5a\xce\x3d\xcb\xcb\x4b\x93\x67\x30\x1e\xe3\x4c\x54\x08\x88\x87\x05\x6d\x21\x0a\xbd\x08\x64\x0b\x51\x5a\x53\xc9\xd4\x04\x8c\xad\x49\x14\x6b\xa9\xc9\xdf\x2e\x12\x65\x8e\x67\x8c\x26\xe7\xc0\xd7\xea\x33\x92\xca\xf8\x65\x3c\x1f\x47\xdf\xbe\x60\x67\x07\xcb\xeb\x80\xba\xfc\xea\xdb\xd9\xa9\x89\xfa\x58\xc3\xd3\x1a\x9d\x1b\x4b\x37\x79\xb7\xa8\xf5\x3d\xfa\x7a\x11\x1b\x07\x07\x54\xe2\x67\x03\x5d\x69\x48\x26\x4f\x8f\x75\xa4\x20\x53\x88\xc6\x1f\x8a\x8a\x88\x8b\x74\x66\x54\xf6\x26\xf1\x1a\xb6\x6f\xac\xdd\x93\x35\xba\x53\xe2\x8b\x7d\x84\x2e\xcd\xf5\xf7\xa4\x05\x8a\xbc\x7a\xf0\xd9\x94\x3d\x45\x1e\x11\x63\xb3\x39\x5a\x75\x14\x22\x31\x69\xb2\x4a\xfc\xd8\xee\xe7\x7c\x4b\xb6\x71\xb8\xa3\xc6\xaf\x59\x5d\xce\xec\x81\xef\xd4\xd1\xf7\x5f\xf0\x4e\x42\xd3\x1d\x44\xac\x8b\x3c\x72\xef\xb0\xb0\x0b\x12\x22\x9b\x5b\xd0\x9c\xde\xe0\x9f\x65\x5f\x33\x45\x38\xe0\xba\x6b\xe3\x0d\x6f\x8f\xcc\xde\xca\xec\x67\x37\xb7\xbb\x8b\xeb\xb7\x46\xc6\xc6\x17\xf7\xd0\x82\x92\x4d\x8a\xd2\x92\x06\x2b\xd3\x99\x91\xb1\xf1\xe7\xb9\xe6\xa9\xc6\xa7\x9a\xa9\xf0\x17\xea\xb9\xaa\xc9\x05\x63\xf1\x28\x1a\x52\x42\x57\x59\x3c\xaf\x1a\x63\x6b\x25\xeb\xf9\x1b\x93\xe4\x98\x82\x10\x3e\x1f\x94\x97\x67\xfd\xbb\x21\xd1\x14\xba\xe2\x98\x39\x8c\xd1\x19\x0f\x6c\xc8\xef\x30\xa5\xcc\x35\x79\x51\x63\x2b\x17\xc5\xc2\xd2\xe1\x23\xd0\xd3\xe5\xdf\x8c\xc5\x7f\x30\x38\x13\xf3\xd2\x66\x17\xb8\xbb\x30\x51\x89\x7e\xd8\x7c\x86\x2e\xfe\x64\xa0\x84\x08\xf9\x27\x91\x18\x3d\xdf\x8c\xd7\x6d\x2d\x18\xa7\x16\xea\x74\x4e\x5c\x7d\x40\xf5\x3b\x00\x00\xff\xff\xd4\x99\x6d\x44\x6a\x06\x00\x00"), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2018, 12, 11, 11, 20, 19, 144666461, time.UTC), - uncompressedSize: 2062, + modTime: time.Date(2019, 1, 22, 18, 4, 45, 469034621, time.UTC), + uncompressedSize: 2146, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcd\x6e\xe3\x38\x0c\xbe\xe7\x29\x84\xde\x1d\xa3\x7b\x54\x4f\x8b\x74\x17\xd8\x43\x8b\xa0\x29\x7a\x67\x64\xc6\xe1\x8e\xfe\x40\xd1\x9e\x09\x82\xbe\xfb\x40\x71\xea\xc8\x69\xd2\x4e\x0f\x33\x3a\x99\xa4\x48\x7e\xe4\x47\x53\x10\xe9\x05\x39\x51\xf0\x5a\x41\x8c\x69\x1e\x22\xfa\xb4\xa5\x8d\xcc\x29\xd4\xfd\xed\xec\x1b\xf9\x46\xab\x7b\x8c\x36\xec\x1c\x7a\x59\x04\xbf\xa1\x76\xe6\x50\xa0\x01\x01\x3d\x53\xca\xc2\x1a\x6d\xca\x5f\x2a\xc7\xd0\x6a\xbf\x9f\x3f\x82\xc3\xd7\xd7\x99\x52\x1e\x1c\x96\x9a\x14\xd1\xe4\xab\x8c\xd1\x92\x81\xa4\xd5\xed\x4c\xa9\x84\x16\x8d\x04\xbe\x12\x44\xa9\x66\x04\x60\x0e\x00\xa6\xf6\x24\x0c\x82\xed\x6e\x70\x97\x5d\x44\xad\x9e\x82\xb5\xe4\xdb\x99\x52\x82\x2e\x5a\x10\x1c\xac\x25\xf2\x7c\x4a\xf4\x57\x92\x7f\x0e\x20\x9f\xf3\x4a\xb3\xee\xad\xda\x7c\x4c\xf0\x02\xe4\x91\xc7\x64\x95\x02\x6e\x8b\xd4\x95\xaa\x4c\x21\xd4\x3d\x70\x6d\x69\x5d\xa7\x2e\x22\xf7\x94\x02\x37\x75\xce\x5e\x28\xe6\x59\x1e\x7d\x4c\x70\x0e\x7c\xa3\x3f\x0b\xb2\x26\x5f\xca\xe3\x75\xf4\xfd\xc9\x77\xbf\x57\x0c\xbe\x45\x35\x5f\x45\x34\xf3\x7f\x7c\x9f\x54\xd1\x90\xea\x62\xc1\xc3\xe9\xc1\x76\x83\xe9\x25\x7f\x15\xb6\xfd\x1e\x7d\x53\xc8\xe4\xa0\x1d\x6e\x1e\x92\x3c\x75\x5e\xc8\xe1\x10\x50\x67\xd2\x92\x4c\xef\x2e\x3b\x6b\x97\xc1\x92\xd9\x69\xf5\xb7\xfd\x0e\xbb\x34\xda\xaf\xe1\x89\x81\x65\xd2\xe5\x91\x89\x65\x60\x39\x25\xcf\xd2\xa4\x8c\xc8\x41\x82\x09\x56\xab\xe7\xc5\x72\xd4\xf7\xc1\x76\x0e\x1f\x42\xe7\xa7\x51\x5d\xd6\x2c\x41\xb6\xfa\x62\xd3\x8b\xb8\x03\xd0\xb4\x05\xc6\xa6\xca\xb3\x78\x25\x8a\xb8\x58\x03\x0b\x6d\xc0\x48\x7a\xe7\xff\x06\x7b\x25\x81\xa1\xc5\x69\xd5\xe4\x29\xff\xaa\xef\x06\x6e\xc2\xf0\x1b\x85\x8b\x87\xfb\xd5\x7b\xf6\xb8\xf3\xd5\xff\xd0\x83\xae\xbb\xc4\xb5\x0d\x06\x6c\x9d\xfe\xa2\x9a\x3b\x7f\x97\x6d\x3e\x34\x78\xb4\xd1\x1a\x7f\xa0\x19\xad\x26\xb8\x48\x16\x2f\x7a\x43\x4a\xe8\xd6\x16\xef\xd6\x1d\xd9\x46\xd7\xa7\xff\x2a\xd5\x07\x15\xc4\x78\x3e\x1d\x37\x63\xa9\xa7\x76\x4e\x46\xe4\xe6\x8b\x33\x62\x42\xdc\x55\x97\xb8\x61\x4c\xa1\x63\x83\x49\xab\xfd\x69\x12\x04\xd9\x91\x07\xa1\xe0\x1f\x30\xa5\x9c\x61\x20\xa8\xc1\xbe\x2e\x8c\x95\x0d\xed\x47\x4e\x47\x48\xff\x92\xc5\x3f\x30\x4d\x43\xe4\x92\x7b\x17\x65\x77\x4f\x3c\xa9\xed\x9a\x77\xf5\x2b\x53\xa6\x54\xcc\x8f\x47\x12\xf4\xf2\x72\x48\xb7\xb0\x40\x4e\x17\xe8\x4c\x56\x3c\x7e\x1c\x4a\x98\xda\xf6\x38\xa6\xd5\x71\x7d\xff\x97\x89\x5c\x6c\xf3\x02\x9a\x8d\xc4\x0e\xf2\x12\x18\xdc\x58\x17\x74\x12\x1c\x08\x19\xad\x84\x3b\x3c\x5f\xb6\x39\x49\xd1\x83\x2b\xcc\x6f\x38\x14\xa8\x87\x37\xef\x80\x60\x25\x8c\xe0\x9e\xa1\xfd\x64\x82\x4e\xbb\xea\x37\x17\x70\xbe\xde\xbe\x8c\xfc\xa3\x55\xfb\x33\x00\x00\xff\xff\x9b\x1f\x53\x16\x0e\x08\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcd\x6e\xdb\x38\x10\xbe\xfb\x29\x88\x20\xc7\x95\x84\xec\x91\xc1\x1e\x16\xce\x2e\x50\xa0\x4e\x8d\x38\xc8\x7d\x44\x8d\x65\x26\xfc\x03\x39\x52\x2b\x08\x7e\xf7\x82\x92\x23\x53\x8e\x9d\x34\x87\x96\x27\xce\x0c\xe7\xf7\xfb\x34\x02\x27\x9f\xd0\x07\x69\x0d\x67\xe0\x5c\xc8\xad\x43\x13\x76\x72\x4b\xb9\xb4\x45\x7b\xb3\x78\x91\xa6\xe2\xec\x0e\x9d\xb2\x9d\x46\x43\x4b\x6b\xb6\xb2\x5e\x68\x24\xa8\x80\x80\x2f\x18\x53\x50\xa2\x0a\xf1\xc6\x62\x0c\xce\xfa\x3e\xbf\x07\x8d\xfb\x7d\xdf\x33\x0f\xa6\x46\x76\xfd\x82\xdd\x5f\xec\xba\x05\xd5\x20\xe3\xff\xb0\xfc\x5b\xf9\x8c\x82\x56\x48\x90\x7f\x1d\xdc\xd9\x7e\x3f\x04\xe8\xfb\xe1\x31\xdb\xef\xf9\x70\x1f\x5d\x86\x50\x68\xaa\xf1\x95\x01\x8d\x49\x96\x45\x70\x28\x62\x7a\x8f\x4e\x49\x01\x81\xb3\x9b\x05\x63\x01\x15\x0a\xb2\xfe\x5c\x61\x83\xaa\x9a\x9a\x12\x43\x53\x73\x7b\x20\x0f\x84\x75\x37\xba\x53\xe7\x90\xb3\x07\xab\x94\x34\xf5\x82\x31\x42\xed\x14\x10\x8e\xd6\x74\x1a\xf1\xa4\x13\xb9\x90\xfc\xe3\x02\xe2\x39\xed\x34\xea\x5e\xbb\x8d\x47\x58\x43\x20\x0d\xfa\x29\x59\xc6\xc0\xd7\x49\xea\x8c\x65\x22\x11\x8a\x16\x7c\xa1\x64\x59\x84\xc6\xa1\x6f\x65\xb0\xbe\x2a\x62\xf6\x44\x91\x47\x79\xf2\x11\x56\x6b\x30\x15\xff\x28\x48\x29\x4d\x2a\x4f\xcf\xd1\xb4\x47\xdf\x89\x10\xf9\xc6\xa1\xc8\xff\x33\xed\x04\xfc\x18\xfa\x5c\xc3\xe3\x19\x88\x30\x98\x9e\xe2\x2d\xb1\xf5\x3d\x9a\x2a\x91\xa5\x86\x7a\x7c\x39\x24\x79\x68\x0c\x49\x8d\x63\x40\x1e\x41\x0b\x34\x7f\xbb\x6e\x94\x5a\x5b\x25\x45\xc7\xd9\xbf\xea\x3b\x74\x61\xb2\x5f\xaa\xc7\x59\x4f\xb3\x29\x4f\x48\xac\xad\xa7\x63\xf2\x28\xcd\xda\x70\xde\x92\x15\x56\x71\xf6\xb8\x5c\x4f\xfa\xd6\xaa\x46\xe3\xca\x36\x66\x1e\x55\x47\xcd\x1a\x68\xc7\xcf\x0e\x3d\x89\x3b\x16\x1a\x76\xe0\xb1\xca\x22\x17\x2f\x44\x21\xed\x0a\xf0\x24\xb7\x20\x28\xbc\xf1\x7f\x2d\x7b\x43\xd6\x43\x8d\xf3\xae\xa5\x91\xf1\xf3\x7f\x43\xb8\x19\xc2\xaf\x10\x2e\x57\x77\x9b\xb7\xe8\xf9\xc6\x64\xcf\xd0\x02\x2f\x9a\xe0\x0b\x65\x05\xa8\x22\xfc\x2d\x0b\xdf\x98\xdb\x68\x33\xb6\xc2\x83\x4d\x96\xf8\x03\xc5\x64\x15\x56\x3b\xa9\xf0\xac\x37\x84\x80\xba\x54\x78\x5b\x36\x52\x55\xbc\x38\x7e\x57\xa1\x18\x54\xe0\xdc\x29\x3b\xae\xa6\x56\x8f\xe3\x9c\x51\xe4\xea\x93\x1c\x11\xd6\x75\xd9\x39\x6c\x3c\x06\xdb\x78\x81\x81\xb3\xfe\xc8\x04\x42\xaf\xa5\x01\x92\xd6\xac\x30\x84\x98\x61\x04\xa8\xc2\xb6\x48\x8c\x99\xb2\xf5\x7b\x4e\x87\x92\xfe\x97\x0a\xff\x00\x9b\xc6\xc8\x29\xf6\xda\x51\x77\x27\xfd\xac\xb7\x4b\xde\xd9\xaf\xb0\x8c\x31\x17\x7f\x48\x81\xd0\xd0\xd3\x90\x6e\xa9\x40\x6a\x9e\x54\x27\xa2\xe2\xfe\xfd\x50\xe4\x65\x5d\x1f\x68\x9a\x1d\xd6\xf7\x97\x08\xe4\x72\x17\x17\xd0\x62\x02\x76\x94\xd7\xe0\x41\x4f\x7d\x41\x43\x56\x03\x49\xc1\x19\xf9\x06\x4f\x97\x6d\x4c\x92\xcc\xe0\x02\xf2\x5b\x6f\x93\xaa\xc7\xff\xe8\x50\xc1\x86\x3c\x82\x7e\x84\xfa\x03\x06\x1d\x77\xd5\x6f\x6e\xe0\x74\xbd\x7d\xba\xf2\xf7\x56\xed\xcf\x00\x00\x00\xff\xff\x65\x17\x14\x0c\x62\x08\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2018, 11, 20, 19, 22, 4, 196654178, time.UTC), - uncompressedSize: 646, + modTime: time.Date(2019, 1, 22, 18, 8, 49, 834666741, time.UTC), + uncompressedSize: 732, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x90\x41\x8b\xdb\x30\x10\x85\xef\xfe\x15\xc3\xd2\x6b\x6c\xb6\x47\x85\x1e\x96\xf6\x52\x28\xa5\x34\xd0\xfb\x44\x1e\xa7\x6a\x24\xcd\xa0\x91\x43\x83\xf0\x7f\x2f\x96\x15\xef\x16\xf6\x64\xfb\x7b\xf3\x66\x9e\x5f\x29\x1f\x22\x06\x7a\x11\x01\xf3\x09\xfa\xef\x18\x08\x96\x05\xc5\xfd\xa2\xa4\x8e\xa3\x81\xdb\x73\x77\x75\x71\x34\xf0\xcd\x69\xee\x5c\xa6\xa0\xa6\x2b\x05\x12\xc6\x0b\x41\x7f\x12\xb2\xfd\xd7\x80\x17\x52\x58\x96\xee\x00\x6f\xbd\x6e\xe5\x3d\x0b\x45\xfd\xed\xa6\xdc\x3b\x1e\x6e\xcf\x1d\xc0\xb6\xb0\xba\x4e\x39\x11\x86\x0e\x20\x50\xc6\x11\x33\x9a\x0e\x00\xc0\xe3\x99\xbc\x6e\xef\x00\x28\x62\xe0\x35\xea\xb2\x54\xbe\x7e\xad\xb8\xa6\xae\x4c\x85\x6c\xf3\x33\x5f\x67\xf9\xc1\xde\xd9\xfb\x63\x8b\x67\x8b\xde\xc0\x84\x5e\xa9\xa2\x52\xdc\x04\xfd\x17\xb6\x57\x4a\x35\x4c\x5b\x9c\xf1\xd2\x4e\x1f\xda\xcc\x4b\x8c\x9c\x31\x3b\x8e\x9f\xc3\xa8\x6d\x0c\x00\x77\xbc\x47\x05\xb0\x61\x54\x03\x4f\x69\x8e\x87\x3f\x78\x43\x33\xcc\x9a\x86\x7a\x7b\xd0\x8f\x6e\x48\x73\x3c\xae\x5a\xe4\x91\x9a\xe6\xce\xf4\x97\xec\xaa\x1e\x2d\x07\x71\x9e\xde\x75\xa2\x2a\x85\xb3\xa7\xe3\x79\x76\x7e\x34\xc3\x48\xe2\xf9\x1e\x28\x66\x1d\x2a\x42\x91\xa7\x16\xa3\x14\x8a\xe3\x9e\x73\x4a\x1c\x5e\x03\x6e\xed\xbf\xf9\xed\x5d\xd9\x1b\xfd\x49\xc2\xbb\xdb\x05\xe1\x94\x5b\x97\x50\x1e\x78\x1b\xf6\x98\x49\x73\x43\x89\x26\x4a\x14\x2d\xfd\x5f\x3c\x40\xbe\x0b\x19\x38\xf1\x9c\xec\xa3\xfa\x9a\xaf\x3d\xfe\x05\x00\x00\xff\xff\x5d\x16\x95\x07\x86\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x51\xcb\x8a\xdc\x30\x10\xbc\xfb\x2b\x9a\x65\x8e\x19\x9b\xcd\x51\x43\x0e\x4b\x72\x09\x6c\x1e\x64\x20\xf7\xb6\x54\x9e\x68\x47\x2f\x24\x79\xc8\x60\xfc\xef\xc1\xb2\xad\xdd\xc0\x9e\x2c\xaa\xba\xaa\xab\xcb\xd3\x74\x70\x6c\xf1\x14\x02\x89\x4f\xd4\x7e\x67\x0b\x9a\x67\x0e\xfa\x37\x62\xd2\xde\x09\xba\x3d\x36\x57\xed\x94\xa0\x67\x9d\x72\xa3\x33\x6c\x12\xcd\x34\x51\x64\x77\x01\xb5\xe7\x00\xd9\x7e\xb5\x7c\x41\xa2\x79\x6e\x8e\xf4\x56\xab\x17\xbc\xf5\x01\x2e\xfd\xd1\x43\x6e\xb5\xef\x6e\x8f\x0d\xd1\x6a\x58\x54\xe7\x1c\xc1\xb6\x21\xb2\xc8\xac\x38\xb3\x68\x88\x88\x0c\xf7\x30\x69\x7d\x13\x71\x08\x82\x5e\xa3\xce\x73\xdd\x7f\xb8\xe2\xfe\x81\x0e\x37\x36\x23\xca\x05\x3f\xfa\x17\xc8\xfc\x0d\x99\xdb\xe7\xe2\xb1\xa4\x5a\x5d\xa6\xa9\x8c\xd3\x3c\x8b\xf2\x5e\x45\xc5\x0c\x4e\xed\x73\xcb\x8e\x85\x2f\x5d\x14\x2c\x05\xc8\x2d\x95\xf7\xd7\x31\xfc\xf4\x46\xcb\xfb\x9e\xcd\x78\xc9\x46\xd0\xc0\x26\xa1\x59\xd7\xe8\x81\xda\x2f\x5e\x5e\x11\xcb\x89\x9b\x71\xe6\xcb\x76\xd0\x71\x9b\x79\x72\xce\x67\xce\xda\xbb\xcf\x56\xa5\x9a\x93\x2b\x5c\x0b\x20\x92\x56\x25\x41\x0f\x71\x74\xc7\x17\xbe\xb1\xe8\xc6\x14\xbb\xb2\xbb\x4b\x1f\x75\x17\x47\x77\x5a\x38\xe7\x15\x36\x4e\xf7\xf8\x0b\xb9\xb0\x27\xe9\x6d\xd0\x06\xef\x2a\x39\x25\xd8\xde\xe0\xd4\x8f\xda\x28\xd1\x29\x04\xe3\xef\x16\x2e\xa7\xae\x40\x1c\xc2\x43\x6d\x10\x4e\xd5\x9c\x43\xf4\xf6\x35\xe0\xfa\x4f\xdf\x9c\x5d\x99\xda\xe8\x2f\x04\x5f\xd5\xda\x06\x1f\xf3\xd6\x25\x4d\x3b\xbc\x0e\x1b\xce\x48\x79\x83\x22\x06\x44\x38\x89\xff\x8b\x27\xca\xf7\x00\x41\x67\x3f\x46\xb9\x57\x5f\xf2\x6d\x9f\x7f\x01\x00\x00\xff\xff\xff\xc4\xfc\xff\xdc\x02\x00\x00"), }, "/innerloop/ingress": &vfsgen۰CompressedFileInfo{ name: "ingress", - modTime: time.Date(2018, 12, 18, 10, 49, 29, 941218111, time.UTC), - uncompressedSize: 263, + modTime: time.Date(2019, 1, 22, 18, 8, 49, 841472170, time.UTC), + uncompressedSize: 347, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8e\x4d\x8a\x84\x30\x10\x85\xf7\x39\xc5\xbb\x80\x8a\xdb\xdc\x60\x36\x32\x30\x30\xfb\x32\x16\x63\x50\x63\x48\xd5\x48\x83\xe4\xee\x4d\xb4\xbb\xe9\x9f\x5d\x7d\xf5\xbd\x47\x15\x45\xff\xcb\x49\xfc\x1a\x2c\xf8\xa2\x1c\xca\x28\xcd\xd6\xf6\xac\xd4\x9a\xc9\x87\xc1\xe2\x2b\xfc\x25\x16\x31\x0b\x2b\x0d\xa4\x64\x0d\x10\x68\x61\x8b\x7d\xaf\x3b\x5a\x38\x67\x03\xcc\xd4\xf3\x2c\xc5\x01\x14\xe3\xb3\x94\xc8\xae\x88\xf4\x3f\xf3\x91\xa8\x30\xae\xa2\xaf\x7d\x60\x54\x8d\x67\x1f\x88\xa4\xa3\xdc\xa1\x3a\xd0\xa2\xb9\x31\xd0\x93\x9b\x38\x0c\xf6\xb1\x00\x84\xd3\xe6\x1d\x77\x1f\x8f\xbd\x05\xbe\xd7\x74\x5e\xfe\x89\xec\xea\x42\x39\x5f\x03\x00\x00\xff\xff\x62\x5b\x6a\xf3\x07\x01\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8f\xcd\x4e\xc3\x30\x10\x84\xef\x79\x8a\x39\xf4\x48\x53\xf5\x6a\x89\x07\x40\x82\x82\x84\xc4\x7d\xe3\x8c\xda\x90\xc4\xb1\xec\x6d\x04\xb2\xfc\xee\xc8\x0e\x20\x7e\x6e\xfb\x79\x67\x67\xc6\xe2\x87\x17\x86\x38\x2c\xce\x80\x6f\x4a\x57\xc6\x78\x58\x8f\x1d\x55\x8e\xcd\x38\xb8\xde\xe0\xce\x9d\x03\x63\x6c\x66\xaa\xf4\xa2\x62\x1a\xc0\xc9\x4c\x83\x94\xda\x93\xcc\xcc\xb9\x01\x26\xe9\x38\xc5\xb2\x03\xc4\xfb\x1f\xcb\x94\x10\xc4\x9d\x89\xdd\xc8\xf7\x1b\xec\x56\x99\xae\x84\xb9\x45\xfb\xd8\xbd\xd2\xea\x03\x55\xda\xfb\x7a\x8e\x6a\x05\xa4\x54\xc5\xc8\xd9\xd4\x79\x3b\xa9\x56\x74\x7d\x51\x45\x4f\x5b\xc2\xc2\x75\x62\x4d\xdd\xe3\xb2\x44\xfd\xdd\x09\xb8\xa8\xfa\xad\x13\xe0\x45\x2f\xf1\x0b\xf6\x15\x0d\x0e\x9f\x0c\x74\x62\x47\xba\xde\x7c\x3f\x00\x91\x61\x1d\x2c\x4f\xff\x3e\xfb\x47\xf0\xb4\x84\x2d\xf9\xd9\xd3\xb6\x85\x72\xfe\x08\x00\x00\xff\xff\x62\x6c\xa9\xf9\x5b\x01\x00\x00"), }, "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ name: "pvc", - modTime: time.Date(2018, 10, 4, 9, 16, 23, 850123135, time.UTC), - uncompressedSize: 250, + modTime: time.Date(2019, 1, 22, 18, 8, 49, 837678910, time.UTC), + uncompressedSize: 339, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8e\xbd\x8a\xc3\x30\x10\x84\x7b\x3d\xc5\xbe\xc0\x19\xae\x55\xeb\xfa\x8e\x03\x83\xfb\x3d\x79\x08\x22\xfa\x8b\x76\x1d\x08\x46\xef\x1e\xe4\x98\x10\x70\xb9\x33\xdf\xec\x0c\x17\x3f\xa3\x8a\xcf\xc9\xd2\xfd\xdb\x5c\x7d\x5a\x2c\xfd\x75\x45\x14\x49\xe7\x1c\xd6\x88\x31\xb0\x8f\x26\x42\x79\x61\x65\x6b\x88\x12\x47\x58\xda\xb6\x61\x2a\x70\xc3\xa4\xb9\xf2\x05\xc3\x2f\x47\xb4\x66\x88\x02\xff\x23\x48\x07\x89\xb8\x94\x9d\x7c\x9b\x1f\xe9\x43\x93\x02\xd7\x61\x76\x0e\x22\x3f\x79\xc1\x9e\xfd\x3a\x15\x74\x6b\xff\x51\x21\x79\xad\x0e\x47\x47\xc5\x6d\x85\xe8\x71\x11\xc9\x8b\x3f\x2f\x1c\xb9\xb0\xf3\xfa\x68\xcd\x3c\x03\x00\x00\xff\xff\x76\xbd\xed\x76\xfa\x00\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8f\x3d\x6b\x33\x31\x10\x84\xfb\xfb\x15\x53\xb8\x7c\xdf\x83\xb4\x82\x54\x6e\xe3\x24\x60\x70\xbf\xd6\x0d\x46\xb1\xbe\x22\xe9\x0c\x46\xe8\xbf\x07\xc9\x26\x31\xb8\x93\x76\x9f\x19\x9e\x95\x68\x0e\x4c\xd9\x04\xaf\x70\x79\x99\xce\xc6\x2f\x0a\x9f\x7d\x92\x0b\x7d\x39\x04\xbb\x3a\x6e\xad\x18\x37\x39\x16\x59\xa4\x88\x9a\x00\x2f\x8e\x0a\xb5\xce\xfb\x48\x3d\xef\x4b\x48\x72\xe2\xfc\x2e\x8e\xad\x4d\x80\x95\x23\x6d\xee\x20\x20\x31\x0e\xf2\x77\xf9\x90\x7e\x98\xd5\x8a\x24\xfe\x44\x6c\xce\xbc\xfe\xc3\xe6\x22\x76\x25\xd4\x2b\xe6\x8f\xe3\x17\x75\xd9\xb1\xc8\xfc\x36\x7a\xf1\x17\xe9\x30\x5a\x53\xe3\x7d\x8b\xb4\x56\x2b\xe8\x97\x4e\xe5\x48\xdd\x2d\x44\x6b\xe6\xbc\x0b\x0b\x87\xd4\xff\x27\xf3\xbe\x1a\xad\x89\x39\xac\x49\xf3\x2e\x9f\xf8\xbd\x32\x97\xfb\x0f\xc8\x37\xfe\xf9\xf4\xad\x44\xd1\xa6\x5c\x5b\x9b\x7e\x02\x00\x00\xff\xff\x94\x0f\x3d\x3d\x53\x01\x00\x00"), }, "/innerloop/route": &vfsgen۰CompressedFileInfo{ name: "route", - modTime: time.Date(2018, 8, 14, 17, 14, 16, 0, time.UTC), - uncompressedSize: 172, + modTime: time.Date(2019, 1, 22, 18, 8, 49, 833044163, time.UTC), + uncompressedSize: 261, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xcd\x31\x0e\xc2\x30\x0c\x85\xe1\x3d\xa7\xf0\x09\x82\x58\x73\x08\x06\x90\xd8\x4d\xfb\x10\x16\x4d\x6c\x25\xa6\x4b\xd5\xbb\xa3\x28\x13\xa2\xf3\xff\x3e\x3d\x36\xb9\xa3\x36\xd1\x92\xa8\xea\xc7\x11\xd5\x50\xda\x4b\x9e\x1e\x45\x4f\xeb\x39\xbc\xa5\xcc\x89\xae\xbd\x85\x0c\xe7\x99\x9d\x53\x20\x2a\x9c\x91\x68\xdb\xe2\x85\x33\xf6\x3d\x10\x2d\xfc\xc0\xd2\x7a\x23\x62\xb3\xdf\xf8\x0f\x9a\x61\xea\x63\xd7\x41\xc6\xd1\x0d\x75\x95\x09\x47\xe2\x1b\x00\x00\xff\xff\xdd\xc7\x7e\xf9\xac\x00\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x8f\xcd\x6a\xc4\x20\x18\x45\xf7\x3e\xc5\x5d\x64\x59\x2c\xdd\x0a\x7d\x83\xfe\x40\x0b\xdd\x7f\x49\x6e\x5b\x27\x89\x8a\x9a\xc0\x20\xbe\xfb\x60\xb2\x18\x06\xb2\x13\xce\x3d\x72\x3e\x09\xf6\x87\x31\x59\xef\x0c\xa2\x5f\x33\xb5\x0f\x74\xe9\xdf\xfe\x66\x6d\xfd\xf3\xf6\xa2\x26\xeb\x46\x83\xaf\xc6\xd4\xc2\x2c\xa3\x64\x31\x0a\x70\xb2\xd0\xa0\x14\xfd\x21\x0b\x6b\x55\xc0\x2c\x3d\xe7\xd4\x18\x20\x21\x3c\xc2\x33\x01\x28\x05\x51\xdc\x1f\xd1\x4d\xbc\x3e\xa1\xdb\x64\x5e\x09\xf3\x0a\xfd\xd9\x5f\x38\xe4\x77\x66\xd1\x6f\xfb\xbf\xb8\x2b\x6d\x8c\x5a\xcd\xfe\x3e\x94\x5a\x4b\x01\xdd\xd8\x56\x29\x70\x68\x15\xd9\x1f\x2d\xc7\x05\xdf\x8c\x9b\x1d\x78\x96\x72\x0b\x00\x00\xff\xff\x3f\x79\xef\x1f\x05\x01\x00\x00"), }, "/innerloop/service": &vfsgen۰CompressedFileInfo{ name: "service", - modTime: time.Date(2018, 12, 18, 10, 54, 50, 603330390, time.UTC), - uncompressedSize: 225, + modTime: time.Date(2019, 1, 22, 18, 8, 49, 839553123, time.UTC), + uncompressedSize: 314, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xce\xb1\xca\xc3\x30\x0c\x04\xe0\xdd\x4f\xa1\x17\xf8\x03\xff\xea\xb5\x7b\x09\xa4\x74\x57\x9d\xa3\x98\x3a\x96\x90\x45\x96\x90\x77\x2f\x31\x5d\x4a\xb3\x09\xdd\x7d\x70\xac\xf9\x0e\x6b\x59\x6a\xa4\xf5\x3f\xbc\x72\x9d\x23\x4d\xb0\x35\x27\x84\x05\xce\x33\x3b\xc7\x40\x54\x79\x41\xa4\x6d\x1b\xae\xbc\x60\xdf\x03\x51\xe1\x07\x4a\x3b\x32\x22\x56\xfd\x0e\x7f\x41\x53\xa4\xa3\xac\x62\xde\xd5\x5f\x3f\x7b\x65\x52\xa4\x61\x14\xf3\x8f\x55\x13\x97\x24\x25\xd2\xed\x32\xf6\x8f\xb3\x3d\xe1\xe3\x39\x68\x28\x48\x2e\x76\xb6\xe5\x1d\x00\x00\xff\xff\xe4\x1b\xba\x42\xe1\x00\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x8f\xbd\x6a\xc4\x30\x10\x84\x7b\x3f\xc5\x14\x57\x26\x86\xb4\x82\x54\x69\xf3\x63\xb8\x90\x7e\x4f\x1e\x0e\xc7\xb2\x24\xd6\x1b\x43\x10\x7a\xf7\x60\x25\x10\x0e\xdc\x0d\x9a\xf9\x46\xb3\x92\xa7\x0f\xea\x3a\xa5\xe8\xb0\x3d\x74\xf3\x14\x47\x87\x33\x75\x9b\x3c\xbb\x85\x26\xa3\x98\xb8\x0e\x88\xb2\xd0\xa1\x94\xfe\x55\x16\xd6\xda\x01\x41\x2e\x0c\xeb\xee\x01\x92\xf3\xad\x79\x04\x00\xa5\x40\x25\x5e\x89\xd3\xcc\xef\x3b\x9c\x36\x09\x5f\x84\x7b\x44\xff\x76\xf9\xa4\xb7\x17\x9a\xf4\xcf\xad\x17\xff\xc8\x1e\x46\xad\xae\xe9\x5f\xa4\xd6\x52\xc0\x38\xee\xa9\x35\xd3\xef\x2b\x72\x52\x6b\x73\xee\x9b\x6c\x7f\x9f\x33\x7d\x3f\x24\xb5\xbf\xb6\xac\xc9\x92\x4f\xc1\xe1\xfd\x69\x68\x2f\x26\x7a\xa5\x0d\xc7\xc0\xca\x40\x6f\x49\x8f\x8e\xfc\x09\x00\x00\xff\xff\xe7\xe7\x7e\xf8\x3a\x01\x00\x00"), }, "/servicecatalog": &vfsgen۰DirInfo{ name: "servicecatalog", - modTime: time.Date(2018, 11, 19, 8, 35, 54, 754265971, time.UTC), + modTime: time.Date(2018, 12, 21, 14, 56, 32, 788143503, time.UTC), }, "/servicecatalog/servicebinding": &vfsgen۰CompressedFileInfo{ name: "servicebinding", - modTime: time.Date(2018, 10, 11, 9, 25, 12, 782687771, time.UTC), + modTime: time.Date(2018, 12, 21, 14, 56, 32, 788042232, time.UTC), uncompressedSize: 273, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8f\x31\x6e\xc3\x30\x0c\x45\x77\x9d\x82\x43\x67\x15\xd9\x0a\x01\x1d\xda\x03\x64\xa8\x81\xee\x8c\xfc\x6b\x10\xb1\x69\xc1\x14\xb2\x08\xbc\x7b\x21\xb7\xa9\x9b\x51\xff\xe9\xf1\x93\xad\x3d\x29\x2f\x78\x2b\x85\xd2\x2b\xc5\x33\x2f\x20\xf7\xd0\x1a\x6d\xac\x13\x28\x0e\x05\x39\x0e\xd8\x6e\x92\x61\xe4\xce\x45\x3e\xb1\x99\xac\x9a\xc8\x7e\xe2\xcc\x95\xe7\x75\x8a\xd7\x17\x8b\xb2\x3e\xdf\x4e\x17\x54\x3e\x85\xab\xe8\x98\xe8\x57\x7d\x17\x1d\x45\xa7\xb0\xa0\xf2\xc8\x95\x53\x20\xea\xc5\x89\x5a\xdb\x5b\xdd\x03\xd1\xcc\x17\xcc\xd6\x19\x11\x97\xd2\xe1\x7d\xbd\x9d\x1f\xce\xbf\xd8\x0a\x72\x57\x44\xad\xb2\x66\x7c\xe0\x2b\x3d\xfc\x3d\xe6\x1b\xf2\x86\x7a\xbe\xe7\xc3\xdf\x73\x3f\x19\x3a\xba\x7f\x07\x00\x00\xff\xff\x85\x6f\x46\xd9\x11\x01\x00\x00"), }, "/servicecatalog/serviceinstance": &vfsgen۰CompressedFileInfo{ name: "serviceinstance", - modTime: time.Date(2018, 11, 19, 8, 35, 54, 753585081, time.UTC), + modTime: time.Date(2018, 12, 21, 14, 56, 32, 788194278, time.UTC), uncompressedSize: 333, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x90\xbd\x6a\x04\x21\x14\x85\x7b\x9f\xe2\x16\xa9\x0d\xdb\x05\x21\x45\x08\x29\x92\x62\x09\x0c\xa4\x3f\xeb\x5c\x16\x59\xe7\x8e\x78\xcd\x12\x10\xdf\x3d\xe8\xee\xe4\x87\x2d\xfd\xce\x39\x7e\x62\xad\x77\x82\x85\x9f\x52\x22\xf7\x48\x76\x8f\x85\xa9\x35\x53\x2b\x65\xc8\x91\xc9\x4e\x89\xbd\x9d\x38\x9f\x83\x67\xa5\xd6\x90\xc2\x07\x67\x0d\xab\x38\xd2\x0b\xf6\x28\x88\xeb\xd1\x9e\x1e\xd4\x86\xf5\xfe\xbc\x3b\x70\xc1\xce\x9c\x82\xcc\x8e\xae\xd3\x57\xd1\x02\xf1\x6c\x16\x2e\x98\x51\xe0\x0c\x51\x37\x3b\xaa\x75\x68\x5b\x33\x44\x11\x07\x8e\xda\x33\x22\xa4\xd4\xc3\xed\x7d\x23\xff\xdd\xfc\xc1\x9a\xd8\xf7\x89\x8f\x9f\x5a\x38\x5f\x8d\xcf\x11\xaa\x2f\x5f\x85\xb3\x20\xee\x37\xd3\xa0\xe3\xaa\xff\xed\xf7\x08\xb9\x29\x77\x38\xba\x09\x19\x0b\x17\xce\x7a\xe1\x3f\xc7\xb7\x69\x95\xf1\x5d\x2c\x73\x6b\xdf\x01\x00\x00\xff\xff\xdd\xed\x80\x29\x4d\x01\x00\x00"), diff --git a/template.go b/template.go index 2ad88d2..6a275e1 100644 --- a/template.go +++ b/template.go @@ -88,6 +88,7 @@ func ParseTemplate(tmpl string, obj *v1alpha1.Component) bytes.Buffer { func Parse(t template.Template, obj *v1alpha1.Component) bytes.Buffer { var b bytes.Buffer err := t.Execute(&b, obj) + //fmt.Println(&b, obj) if err != nil { fmt.Println("There was an error:", err.Error()) } diff --git a/tmpl/innerloop/deployment b/tmpl/innerloop/deployment index c23fded..558b99b 100644 --- a/tmpl/innerloop/deployment +++ b/tmpl/innerloop/deployment @@ -2,7 +2,8 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: {{.Name}} + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} name: {{.Name}} spec: replicas: 1 diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 83bff0f..7fb158c 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -2,7 +2,8 @@ apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: labels: - app: {{.Name}} + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} name: {{.Name}} spec: replicas: 1 diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index a13ca03..a358a4d 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -6,7 +6,8 @@ items: kind: ImageStream metadata: labels: - app: {{$nameApp}} + app: {{$nameApp}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} name: {{.Name}} spec: lookupPolicy: diff --git a/tmpl/innerloop/ingress b/tmpl/innerloop/ingress index 6e70507..ac91112 100644 --- a/tmpl/innerloop/ingress +++ b/tmpl/innerloop/ingress @@ -3,7 +3,8 @@ kind: Ingress metadata: name: {{.Name}} labels: - app: {{.Name}} + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} spec: rules: - host: {{.Name}} diff --git a/tmpl/innerloop/pvc b/tmpl/innerloop/pvc index ca5286f..421f0e2 100644 --- a/tmpl/innerloop/pvc +++ b/tmpl/innerloop/pvc @@ -5,6 +5,8 @@ metadata: labels: app: {{.Name}} name: {{.Name}} + {{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} spec: accessModes: - {{.Spec.Storage.Mode}} diff --git a/tmpl/innerloop/route b/tmpl/innerloop/route index 8da5970..8d3e505 100644 --- a/tmpl/innerloop/route +++ b/tmpl/innerloop/route @@ -5,6 +5,8 @@ metadata: labels: app: {{.Name}} name: {{.Name}} + {{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} spec: to: kind: Service diff --git a/tmpl/innerloop/service b/tmpl/innerloop/service index 92881a0..1e27f36 100644 --- a/tmpl/innerloop/service +++ b/tmpl/innerloop/service @@ -5,6 +5,8 @@ metadata: labels: app: {{.Name}} name: {{.Name}} + {{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} spec: ports: - port: {{.Spec.Port}} From cbd2136682c95bd59610384aad62718f08712dd0 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 22 Jan 2019 20:42:19 +0100 Subject: [PATCH 42/62] Fix wrong variable declaration with imagestream --- assets_vfsdata.go | 8 ++++---- tmpl/innerloop/imagestream | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 42feb56..0d92d6a 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,7 +25,7 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2019, 1, 22, 18, 11, 45, 162213374, time.UTC), + modTime: time.Date(2019, 1, 22, 19, 36, 18, 834650088, time.UTC), }, "/innerloop/deployment": &vfsgen۰CompressedFileInfo{ name: "deployment", @@ -43,10 +43,10 @@ var Assets = func() http.FileSystem { }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", - modTime: time.Date(2019, 1, 22, 18, 8, 49, 834666741, time.UTC), - uncompressedSize: 732, + modTime: time.Date(2019, 1, 22, 19, 36, 18, 833418452, time.UTC), + uncompressedSize: 756, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x51\xcb\x8a\xdc\x30\x10\xbc\xfb\x2b\x9a\x65\x8e\x19\x9b\xcd\x51\x43\x0e\x4b\x72\x09\x6c\x1e\x64\x20\xf7\xb6\x54\x9e\x68\x47\x2f\x24\x79\xc8\x60\xfc\xef\xc1\xb2\xad\xdd\xc0\x9e\x2c\xaa\xba\xaa\xab\xcb\xd3\x74\x70\x6c\xf1\x14\x02\x89\x4f\xd4\x7e\x67\x0b\x9a\x67\x0e\xfa\x37\x62\xd2\xde\x09\xba\x3d\x36\x57\xed\x94\xa0\x67\x9d\x72\xa3\x33\x6c\x12\xcd\x34\x51\x64\x77\x01\xb5\xe7\x00\xd9\x7e\xb5\x7c\x41\xa2\x79\x6e\x8e\xf4\x56\xab\x17\xbc\xf5\x01\x2e\xfd\xd1\x43\x6e\xb5\xef\x6e\x8f\x0d\xd1\x6a\x58\x54\xe7\x1c\xc1\xb6\x21\xb2\xc8\xac\x38\xb3\x68\x88\x88\x0c\xf7\x30\x69\x7d\x13\x71\x08\x82\x5e\xa3\xce\x73\xdd\x7f\xb8\xe2\xfe\x81\x0e\x37\x36\x23\xca\x05\x3f\xfa\x17\xc8\xfc\x0d\x99\xdb\xe7\xe2\xb1\xa4\x5a\x5d\xa6\xa9\x8c\xd3\x3c\x8b\xf2\x5e\x45\xc5\x0c\x4e\xed\x73\xcb\x8e\x85\x2f\x5d\x14\x2c\x05\xc8\x2d\x95\xf7\xd7\x31\xfc\xf4\x46\xcb\xfb\x9e\xcd\x78\xc9\x46\xd0\xc0\x26\xa1\x59\xd7\xe8\x81\xda\x2f\x5e\x5e\x11\xcb\x89\x9b\x71\xe6\xcb\x76\xd0\x71\x9b\x79\x72\xce\x67\xce\xda\xbb\xcf\x56\xa5\x9a\x93\x2b\x5c\x0b\x20\x92\x56\x25\x41\x0f\x71\x74\xc7\x17\xbe\xb1\xe8\xc6\x14\xbb\xb2\xbb\x4b\x1f\x75\x17\x47\x77\x5a\x38\xe7\x15\x36\x4e\xf7\xf8\x0b\xb9\xb0\x27\xe9\x6d\xd0\x06\xef\x2a\x39\x25\xd8\xde\xe0\xd4\x8f\xda\x28\xd1\x29\x04\xe3\xef\x16\x2e\xa7\xae\x40\x1c\xc2\x43\x6d\x10\x4e\xd5\x9c\x43\xf4\xf6\x35\xe0\xfa\x4f\xdf\x9c\x5d\x99\xda\xe8\x2f\x04\x5f\xd5\xda\x06\x1f\xf3\xd6\x25\x4d\x3b\xbc\x0e\x1b\xce\x48\x79\x83\x22\x06\x44\x38\x89\xff\x8b\x27\xca\xf7\x00\x41\x67\x3f\x46\xb9\x57\x5f\xf2\x6d\x9f\x7f\x01\x00\x00\xff\xff\xff\xc4\xfc\xff\xdc\x02\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x51\xcb\x8a\xdc\x30\x10\xbc\xeb\x2b\x9a\x65\x8e\x19\x9b\xcd\x51\x43\x0e\x4b\x72\x09\x6c\x1e\x64\x20\xf7\xb6\xd4\x9e\x68\x47\x2f\x24\x79\xc8\x20\xf4\xef\xc1\xb2\xac\xdd\xc0\x9e\x2c\xaa\xab\xba\xab\xca\x39\x1f\x2c\x1a\x7a\xf2\x1e\xf8\x27\x18\xbe\xa3\x21\x28\x85\xe5\x7c\xd0\x38\x91\x8e\x15\xfd\x31\xbd\x90\x48\xdf\x28\xe1\xf0\xbc\xa1\xa5\xa0\x57\xbf\x29\x44\xe5\x2c\x87\xdb\x23\xbb\x2a\x2b\x39\x3c\xab\x98\x98\x4a\x64\x22\x67\x39\x43\x40\x7b\x21\x18\xce\x9e\xc4\xf0\xd5\xe0\x85\x56\x21\x3b\xc2\x5b\xad\x5a\xf1\xc1\x79\xb2\xf1\x8f\x9a\xd3\xa0\xdc\x78\x7b\x64\x00\xdb\xc2\xaa\x3a\xa7\x40\x68\x18\x80\xa1\x84\x12\x13\x72\x06\x00\xb0\x19\xdc\xde\x00\xe8\x3d\x87\xd7\x34\xa5\xf4\xfb\x87\x2b\xdd\x3f\xc0\xe1\x86\x7a\xa1\x35\xce\x9e\xac\x94\x26\xcd\xb9\x72\xa0\x14\x5e\xdf\x1b\xb3\x6e\x20\x2b\x77\xde\xba\x78\x9d\xd7\x8e\x2a\x16\x3d\x89\x66\xc5\xb9\xeb\xe2\x7f\x3a\xad\xc4\x7d\x37\xa4\x9d\x40\xcd\x61\x46\x1d\x89\x6d\x67\xd4\x0c\xc3\x17\x27\xae\x14\x6a\xae\xb6\x38\xe1\xa5\xa5\x38\x36\xce\x93\xb5\x2e\x61\x52\xce\x7e\x36\x32\x76\x9f\xd8\xe1\x9e\x1a\x40\x18\x19\x39\x3c\x84\xc5\x1e\x5f\xf0\x86\x7c\x5c\x62\x18\xeb\xed\x31\x7e\x54\x63\x58\xec\x69\x9d\x59\x27\xa9\xcd\xd4\x44\x7f\x49\xac\xd3\x93\x70\xc6\x2b\x4d\xef\x2a\x31\x46\x32\x93\xa6\xd3\xb4\x28\x2d\xf9\x28\xc9\x6b\x77\x37\x64\x53\x1c\x2b\x84\xde\x3f\xf4\x06\xc9\xca\xee\x73\x0e\xce\xbc\x1a\xdc\x7e\xe4\x9b\xd8\x7d\xd2\x1b\xfd\x45\xde\x75\xb5\x32\xde\x85\xd4\xba\x84\xbc\xc3\x1b\x59\x63\xa2\x98\x1a\x14\x68\xa6\x40\x56\xd0\xff\xc5\x03\xa4\xbb\x27\x0e\x67\xb7\x04\xb1\x57\x5f\xfd\xb5\xcf\xbf\x00\x00\x00\xff\xff\xd3\xe2\x4c\x92\xf4\x02\x00\x00"), }, "/innerloop/ingress": &vfsgen۰CompressedFileInfo{ name: "ingress", diff --git a/tmpl/innerloop/imagestream b/tmpl/innerloop/imagestream index a358a4d..d3b3662 100644 --- a/tmpl/innerloop/imagestream +++ b/tmpl/innerloop/imagestream @@ -1,4 +1,5 @@ -{{$nameApp := .Name }}apiVersion: v1 +{{$nameApp := .Name }} +{{$labels := .ObjectMeta.Labels }}apiVersion: v1 kind: List items: {{ range .Spec.Images }} @@ -6,7 +7,7 @@ items: kind: ImageStream metadata: labels: - app: {{$nameApp}}{{ range $key, $value := .ObjectMeta.Labels }} + app: {{$nameApp}}{{ range $key, $value := $labels }} {{ $key }}: {{ $value }}{{ end }} name: {{.Name}} spec: From 63443bcf6883a820b33a857c58478316aec6ae27 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 29 Jan 2019 18:52:55 +0100 Subject: [PATCH 43/62] Update Deployment and Deploymentconfig to include k8s labels as part of the template - metadata --- assets_vfsdata.go | 14 +++++++------- tmpl/innerloop/deployment | 3 ++- tmpl/innerloop/deploymentconfig | 3 ++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 0d92d6a..7d929ed 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -25,21 +25,21 @@ var Assets = func() http.FileSystem { }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", - modTime: time.Date(2019, 1, 22, 19, 36, 18, 834650088, time.UTC), + modTime: time.Date(2019, 1, 29, 17, 50, 43, 763890747, time.UTC), }, "/innerloop/deployment": &vfsgen۰CompressedFileInfo{ name: "deployment", - modTime: time.Date(2019, 1, 22, 18, 11, 45, 160657195, time.UTC), - uncompressedSize: 1642, + modTime: time.Date(2019, 1, 29, 17, 50, 43, 763324649, time.UTC), + uncompressedSize: 1730, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x41\x4f\xdc\x3c\x10\xbd\xef\xaf\xf0\x81\xe3\x97\x58\x70\x34\xfa\x0e\xd5\xd2\x9e\x58\xba\x12\x15\xf7\x89\x33\x2c\x06\xdb\xe3\xda\x93\xd0\x28\xca\x7f\xaf\x9c\x40\x48\x60\x81\xaa\x87\xfa\xe4\x99\xf1\x7b\x7e\xe3\x37\x4a\x20\x98\x1b\x8c\xc9\x90\x57\x02\x42\x48\xb2\x3d\xdd\x3c\x18\x5f\x2b\x71\x81\xc1\x52\xe7\xd0\xf3\xc6\x21\x43\x0d\x0c\x6a\x23\x84\x85\x0a\x6d\xca\x3b\x91\x01\x4a\xf4\x7d\x79\x05\x0e\x87\xa1\xef\x45\x04\x7f\x40\x71\xf2\x80\xdd\x7f\xe2\xa4\x05\xdb\xa0\x50\xff\x8b\xf2\x7b\x75\x8f\x9a\x77\xc8\x50\x5e\x8e\x70\x31\x0c\x23\x41\xdf\x8f\x87\xc5\x30\xa8\x71\x3f\x41\x46\x2a\xf4\xf5\x74\xca\x83\xc3\xc5\x2d\x9b\x14\x50\xe7\xeb\x23\x06\x6b\x34\x24\x25\x4e\x37\x42\x24\xb4\xa8\x99\xe2\x24\xcc\x01\xeb\xbb\xcb\x85\xd2\xd7\x5a\x37\x42\x30\xba\x60\x81\xf1\x09\xb1\x68\x31\x2f\xbb\x02\x1f\x81\xe7\xf5\x5a\x5a\xce\x3d\xcb\xcb\x4b\x93\x67\x30\x1e\xe3\x4c\x54\x08\x88\x87\x05\x6d\x21\x0a\xbd\x08\x64\x0b\x51\x5a\x53\xc9\xd4\x04\x8c\xad\x49\x14\x6b\xa9\xc9\xdf\x2e\x12\x65\x8e\x67\x8c\x26\xe7\xc0\xd7\xea\x33\x92\xca\xf8\x65\x3c\x1f\x47\xdf\xbe\x60\x67\x07\xcb\xeb\x80\xba\xfc\xea\xdb\xd9\xa9\x89\xfa\x58\xc3\xd3\x1a\x9d\x1b\x4b\x37\x79\xb7\xa8\xf5\x3d\xfa\x7a\x11\x1b\x07\x07\x54\xe2\x67\x03\x5d\x69\x48\x26\x4f\x8f\x75\xa4\x20\x53\x88\xc6\x1f\x8a\x8a\x88\x8b\x74\x66\x54\xf6\x26\xf1\x1a\xb6\x6f\xac\xdd\x93\x35\xba\x53\xe2\x8b\x7d\x84\x2e\xcd\xf5\xf7\xa4\x05\x8a\xbc\x7a\xf0\xd9\x94\x3d\x45\x1e\x11\x63\xb3\x39\x5a\x75\x14\x22\x31\x69\xb2\x4a\xfc\xd8\xee\xe7\x7c\x4b\xb6\x71\xb8\xa3\xc6\xaf\x59\x5d\xce\xec\x81\xef\xd4\xd1\xf7\x5f\xf0\x4e\x42\xd3\x1d\x44\xac\x8b\x3c\x72\xef\xb0\xb0\x0b\x12\x22\x9b\x5b\xd0\x9c\xde\xe0\x9f\x65\x5f\x33\x45\x38\xe0\xba\x6b\xe3\x0d\x6f\x8f\xcc\xde\xca\xec\x67\x37\xb7\xbb\x8b\xeb\xb7\x46\xc6\xc6\x17\xf7\xd0\x82\x92\x4d\x8a\xd2\x92\x06\x2b\xd3\x99\x91\xb1\xf1\xe7\xb9\xe6\xa9\xc6\xa7\x9a\xa9\xf0\x17\xea\xb9\xaa\xc9\x05\x63\xf1\x28\x1a\x52\x42\x57\x59\x3c\xaf\x1a\x63\x6b\x25\xeb\xf9\x1b\x93\xe4\x98\x82\x10\x3e\x1f\x94\x97\x67\xfd\xbb\x21\xd1\x14\xba\xe2\x98\x39\x8c\xd1\x19\x0f\x6c\xc8\xef\x30\xa5\xcc\x35\x79\x51\x63\x2b\x17\xc5\xc2\xd2\xe1\x23\xd0\xd3\xe5\xdf\x8c\xc5\x7f\x30\x38\x13\xf3\xd2\x66\x17\xb8\xbb\x30\x51\x89\x7e\xd8\x7c\x86\x2e\xfe\x64\xa0\x84\x08\xf9\x27\x91\x18\x3d\xdf\x8c\xd7\x6d\x2d\x18\xa7\x16\xea\x74\x4e\x5c\x7d\x40\xf5\x3b\x00\x00\xff\xff\xd4\x99\x6d\x44\x6a\x06\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xc1\x4e\xdc\x30\x10\xbd\xe7\x2b\x7c\xe0\xd8\xc4\x82\xa3\x51\x0f\xd5\xd2\x9e\x58\xba\x12\x15\xf7\x89\x33\x2c\x06\xdb\xe3\xda\x4e\x68\x14\xe5\xdf\x2b\x27\x90\x3a\xb0\xb0\xa8\xaa\xea\x53\x66\xc6\xef\xf9\xbd\x99\xd1\x2e\x38\x75\x83\x3e\x28\xb2\x82\x81\x73\x81\x77\xa7\xc5\x83\xb2\x8d\x60\x17\xe8\x34\xf5\x06\x6d\x2c\x0c\x46\x68\x20\x82\x28\x18\xd3\x50\xa3\x0e\xe9\x8b\x25\x80\x60\xc3\x50\x5d\x81\xc1\x71\x1c\x06\xe6\xc1\xee\x91\x9d\x3c\x60\xff\x89\x9d\x74\xa0\x5b\x64\xe2\x33\xab\xbe\xd7\xf7\x28\xe3\x16\x23\x54\x97\x13\x9c\x8d\xe3\x44\x30\x0c\xd3\x65\x36\x8e\x62\xfa\x9e\x21\x13\x15\xda\x66\xbe\x65\xc1\x60\xf6\x4a\x11\x1c\xca\xf4\xbc\x47\xa7\x95\x84\x20\xd8\x69\xc1\x58\x40\x8d\x32\x92\x9f\x85\x19\x88\xf2\xee\x32\x53\xfa\x52\x6b\xc1\x58\x44\xe3\x34\x44\x7c\x42\x64\x16\xd3\xd1\x2b\xf0\x3f\xb0\xfa\x51\xbb\xe9\xbc\xb4\x9c\x72\xcf\xb6\xd3\x91\x64\x23\x28\x8b\x7e\x11\x58\x32\xf0\xfb\x4c\x6e\xc9\x4a\x99\x05\xbc\x03\xcf\xb5\xaa\x79\x68\x1d\xfa\x4e\x05\xf2\x0d\x97\x64\x6f\xb3\x44\x95\xe2\x05\x23\xc9\x18\xb0\x8d\x38\x46\x52\x2b\x9b\xc7\xcb\x75\xb4\x9d\xc8\x7d\xcf\xed\xaa\xae\x1d\xca\xea\xab\xed\x56\x6d\x29\x0f\x1a\x9e\xcf\xd4\xa2\xa9\x74\x93\xbe\x56\xcd\x44\xdb\x64\xb1\x32\xb0\x47\xc1\x7e\xb6\xd0\x57\x8a\x78\xb0\xf4\xd8\x78\x72\x3c\x38\xaf\xec\xbe\xac\x89\x62\x19\xce\x94\x48\x33\x0f\x71\x0d\xdb\xb5\x5a\xef\x48\x2b\xd9\x0b\xf6\x45\x3f\x42\x1f\x96\xfa\x5b\xd2\x1c\xf9\xb8\x6a\xf8\x32\x94\x1d\xf9\x38\x21\x26\xb3\x29\x5a\x39\x72\x9e\x22\x49\xd2\x82\xfd\xd8\xec\x96\x7c\x47\xba\x35\xb8\xa5\xd6\xae\x59\x4d\xca\xec\x20\xde\x89\x83\xfd\xcf\x78\x67\xa1\xe1\x0e\x3c\x36\x65\x5a\xe5\x37\x58\xa2\x71\x1c\x7c\x54\xb7\x20\x63\x78\x85\x7f\x96\x7d\x1d\xc9\xc3\x1e\xd7\xae\x95\x55\x71\x73\x60\xf7\x56\xc3\x7e\x9e\xe6\x66\x7b\x71\xfd\x7a\x90\xbe\xb5\xe5\x3d\x74\x20\x78\x1b\x3c\xd7\x24\x41\xf3\x70\xa6\xb8\x6f\xed\x79\xaa\x59\x6a\xf0\xa9\xa6\x6a\xfc\x85\x72\xa9\x4a\x32\x4e\x69\x3c\x88\x86\x10\xd0\xd4\x1a\xcf\xeb\x56\xe9\x46\xf0\x66\xf9\xed\x0a\x7c\x4a\x81\x73\xc7\x17\xe5\x4f\x5b\xff\x6e\x49\x24\xb9\xbe\x3c\x34\x9c\x88\xde\x28\x0b\x51\x91\xdd\x62\x08\x89\x6b\x9e\x45\x83\x1d\xcf\x8a\xa5\xa6\xfd\x7b\xa0\xa7\xc7\xbf\x29\x8d\xff\x61\x71\x66\xe6\x7c\xcc\xc6\xc5\xfe\x42\x79\xc1\x86\xb1\x38\x86\x2e\x3f\xb2\x50\x8c\xb9\xf4\xe7\x13\x22\xda\x78\x33\x3d\xb7\xd1\xa0\x8c\xc8\xd4\xc9\x94\xb8\x7a\x87\xea\x77\x00\x00\x00\xff\xff\x6c\x3e\x77\x40\xc2\x06\x00\x00"), }, "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2019, 1, 22, 18, 4, 45, 469034621, time.UTC), - uncompressedSize: 2146, + modTime: time.Date(2019, 1, 29, 17, 50, 43, 760462857, time.UTC), + uncompressedSize: 2234, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcd\x6e\xdb\x38\x10\xbe\xfb\x29\x88\x20\xc7\x95\x84\xec\x91\xc1\x1e\x16\xce\x2e\x50\xa0\x4e\x8d\x38\xc8\x7d\x44\x8d\x65\x26\xfc\x03\x39\x52\x2b\x08\x7e\xf7\x82\x92\x23\x53\x8e\x9d\x34\x87\x96\x27\xce\x0c\xe7\xf7\xfb\x34\x02\x27\x9f\xd0\x07\x69\x0d\x67\xe0\x5c\xc8\xad\x43\x13\x76\x72\x4b\xb9\xb4\x45\x7b\xb3\x78\x91\xa6\xe2\xec\x0e\x9d\xb2\x9d\x46\x43\x4b\x6b\xb6\xb2\x5e\x68\x24\xa8\x80\x80\x2f\x18\x53\x50\xa2\x0a\xf1\xc6\x62\x0c\xce\xfa\x3e\xbf\x07\x8d\xfb\x7d\xdf\x33\x0f\xa6\x46\x76\xfd\x82\xdd\x5f\xec\xba\x05\xd5\x20\xe3\xff\xb0\xfc\x5b\xf9\x8c\x82\x56\x48\x90\x7f\x1d\xdc\xd9\x7e\x3f\x04\xe8\xfb\xe1\x31\xdb\xef\xf9\x70\x1f\x5d\x86\x50\x68\xaa\xf1\x95\x01\x8d\x49\x96\x45\x70\x28\x62\x7a\x8f\x4e\x49\x01\x81\xb3\x9b\x05\x63\x01\x15\x0a\xb2\xfe\x5c\x61\x83\xaa\x9a\x9a\x12\x43\x53\x73\x7b\x20\x0f\x84\x75\x37\xba\x53\xe7\x90\xb3\x07\xab\x94\x34\xf5\x82\x31\x42\xed\x14\x10\x8e\xd6\x74\x1a\xf1\xa4\x13\xb9\x90\xfc\xe3\x02\xe2\x39\xed\x34\xea\x5e\xbb\x8d\x47\x58\x43\x20\x0d\xfa\x29\x59\xc6\xc0\xd7\x49\xea\x8c\x65\x22\x11\x8a\x16\x7c\xa1\x64\x59\x84\xc6\xa1\x6f\x65\xb0\xbe\x2a\x62\xf6\x44\x91\x47\x79\xf2\x11\x56\x6b\x30\x15\xff\x28\x48\x29\x4d\x2a\x4f\xcf\xd1\xb4\x47\xdf\x89\x10\xf9\xc6\xa1\xc8\xff\x33\xed\x04\xfc\x18\xfa\x5c\xc3\xe3\x19\x88\x30\x98\x9e\xe2\x2d\xb1\xf5\x3d\x9a\x2a\x91\xa5\x86\x7a\x7c\x39\x24\x79\x68\x0c\x49\x8d\x63\x40\x1e\x41\x0b\x34\x7f\xbb\x6e\x94\x5a\x5b\x25\x45\xc7\xd9\xbf\xea\x3b\x74\x61\xb2\x5f\xaa\xc7\x59\x4f\xb3\x29\x4f\x48\xac\xad\xa7\x63\xf2\x28\xcd\xda\x70\xde\x92\x15\x56\x71\xf6\xb8\x5c\x4f\xfa\xd6\xaa\x46\xe3\xca\x36\x66\x1e\x55\x47\xcd\x1a\x68\xc7\xcf\x0e\x3d\x89\x3b\x16\x1a\x76\xe0\xb1\xca\x22\x17\x2f\x44\x21\xed\x0a\xf0\x24\xb7\x20\x28\xbc\xf1\x7f\x2d\x7b\x43\xd6\x43\x8d\xf3\xae\xa5\x91\xf1\xf3\x7f\x43\xb8\x19\xc2\xaf\x10\x2e\x57\x77\x9b\xb7\xe8\xf9\xc6\x64\xcf\xd0\x02\x2f\x9a\xe0\x0b\x65\x05\xa8\x22\xfc\x2d\x0b\xdf\x98\xdb\x68\x33\xb6\xc2\x83\x4d\x96\xf8\x03\xc5\x64\x15\x56\x3b\xa9\xf0\xac\x37\x84\x80\xba\x54\x78\x5b\x36\x52\x55\xbc\x38\x7e\x57\xa1\x18\x54\xe0\xdc\x29\x3b\xae\xa6\x56\x8f\xe3\x9c\x51\xe4\xea\x93\x1c\x11\xd6\x75\xd9\x39\x6c\x3c\x06\xdb\x78\x81\x81\xb3\xfe\xc8\x04\x42\xaf\xa5\x01\x92\xd6\xac\x30\x84\x98\x61\x04\xa8\xc2\xb6\x48\x8c\x99\xb2\xf5\x7b\x4e\x87\x92\xfe\x97\x0a\xff\x00\x9b\xc6\xc8\x29\xf6\xda\x51\x77\x27\xfd\xac\xb7\x4b\xde\xd9\xaf\xb0\x8c\x31\x17\x7f\x48\x81\xd0\xd0\xd3\x90\x6e\xa9\x40\x6a\x9e\x54\x27\xa2\xe2\xfe\xfd\x50\xe4\x65\x5d\x1f\x68\x9a\x1d\xd6\xf7\x97\x08\xe4\x72\x17\x17\xd0\x62\x02\x76\x94\xd7\xe0\x41\x4f\x7d\x41\x43\x56\x03\x49\xc1\x19\xf9\x06\x4f\x97\x6d\x4c\x92\xcc\xe0\x02\xf2\x5b\x6f\x93\xaa\xc7\xff\xe8\x50\xc1\x86\x3c\x82\x7e\x84\xfa\x03\x06\x1d\x77\xd5\x6f\x6e\xe0\x74\xbd\x7d\xba\xf2\xf7\x56\xed\xcf\x00\x00\x00\xff\xff\x65\x17\x14\x0c\x62\x08\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcd\x6e\xe3\x38\x0c\xbe\xe7\x29\x84\xa2\xc7\xb5\x8d\xee\x51\xc5\x1e\x16\xe9\x2e\x30\xc0\xa4\x13\x34\x45\xef\x8c\xcc\x38\x6a\xf5\x07\x89\xf6\x8c\x61\xe4\xdd\x07\xb2\x53\x47\x4e\x93\xb4\x05\x66\x46\x27\x93\x14\x7f\xbe\x8f\x34\x05\x4e\x3e\xa1\x0f\xd2\x1a\xce\xc0\xb9\x90\x5b\x87\x26\x6c\xe5\x86\x72\x69\x8b\xe6\x66\xf6\x22\x4d\xc9\xd9\x1d\x3a\x65\x5b\x8d\x86\xe6\xd6\x6c\x64\x35\xd3\x48\x50\x02\x01\x9f\x31\xa6\x60\x8d\x2a\xc4\x2f\x16\x63\x70\xd6\x75\xf9\x3d\x68\xdc\xed\xba\x8e\x79\x30\x15\xb2\xeb\x17\x6c\xff\x62\xd7\x0d\xa8\x1a\x19\xff\x87\xe5\xdf\xd6\xcf\x28\x68\x81\x04\xf9\xd7\xde\x9d\xed\x76\x7d\x80\xae\xeb\x2f\xb3\xdd\x8e\xf7\xdf\x83\x4b\x1f\x0a\x4d\x39\xdc\x32\xa0\x31\xc9\x32\x0b\x0e\x45\x4c\xef\xd1\x29\x29\x20\x70\x76\x33\x63\x2c\xa0\x42\x41\xd6\x9f\x2a\xac\x57\x95\x23\x28\xd1\x83\x9a\xda\x03\x79\x20\xac\xda\xc1\x9d\x5a\x87\x9c\x3d\x58\xa5\xa4\xa9\x66\x8c\x11\x6a\xa7\x80\x70\xb0\xa6\x6c\xc4\x93\x32\xf2\x4b\x58\xf9\x28\x33\xc3\xb9\x0c\x2c\x9e\x63\x06\xa3\xee\x95\xc5\x78\x84\x35\x04\xd2\xa0\x1f\x41\x64\x0c\x7c\x95\x40\xca\x58\x26\x12\xa1\x68\xc0\x17\x4a\xae\x8b\x50\x3b\xf4\x8d\x0c\xd6\x97\x45\xcc\x9e\x28\xf2\x28\x8f\x3e\xc2\x6a\x0d\xa6\xe4\xef\x05\x59\x4b\x93\xca\xe3\x75\x34\x0d\x4f\xb9\x19\x28\xcd\x57\x0e\x45\xfe\x9f\x69\x26\xd4\x65\x27\x01\x0f\xa7\xa7\xb1\x37\x3d\xc5\xaf\x09\xe1\x68\xca\x44\x96\x1a\xaa\xe1\x66\x9f\xe4\xa1\x36\x24\x35\x0e\x01\x79\x1c\x86\x40\xd3\xbb\xcb\x5a\xa9\xa5\x55\x52\xb4\x9c\xfd\xab\xbe\x43\x1b\x46\xfb\xb9\x7a\x9c\xf5\x34\x61\x79\xec\xc4\xd2\x7a\x3a\x24\x8f\xd2\x04\x86\xf3\x96\xac\xb0\x8a\xb3\xc7\xf9\x72\xd4\x37\x56\xd5\x1a\x17\xb6\x36\xd3\xa8\x3a\x6a\x96\x40\x5b\x7e\x92\xf4\x24\xee\x50\x68\xd8\x82\xc7\x32\x8b\x33\x7e\x26\x0a\x69\x57\x80\x27\xb9\x01\x41\xe1\x8d\xff\x6b\xd9\x2b\xb2\x1e\x2a\x9c\xa2\x96\x46\xc6\xb5\xf2\x66\xe0\x26\x1d\x7e\x6d\xe1\x7c\x71\xb7\x7a\xdb\x3d\x5f\x9b\xec\x19\x1a\xe0\x45\x1d\x7c\xa1\xac\x00\x55\x84\xbf\x65\xe1\x6b\x73\x1b\x6d\xc6\x96\xb8\xb7\xc9\x35\xfe\x40\x31\x5a\x85\xd5\x4e\x2a\x3c\xe9\x0d\x21\xa0\x5e\x2b\xbc\x5d\xd7\x52\x95\xbc\x38\xfc\x57\xa1\xe8\x55\xe0\xdc\xf1\x74\x5c\x8d\x50\x0f\x74\x4e\x46\xe4\xea\x93\x33\x22\xac\x6b\xb3\x53\xbd\xf1\x18\x6c\xed\x05\x06\xce\xba\xc3\x24\x10\x7a\x2d\x0d\x90\xb4\x66\x81\x21\xc4\x0c\x43\x83\x4a\x6c\x8a\xc4\x98\x29\x5b\x5d\x72\xda\x97\xf4\xbf\x54\xf8\x07\xa6\x69\x88\x9c\xf6\x5e\x3b\x6a\xef\xa4\x9f\x60\x3b\xe7\x9d\x7d\x64\xca\x18\x73\xf1\xa1\x0b\x84\x86\x9e\xfa\x74\x73\x05\x52\xf3\xa4\x3a\x11\x15\xf7\x97\x43\x91\x97\x55\xb5\x1f\xd3\x6c\xff\x2c\x7c\x89\x8d\x9c\x6f\xe3\x02\x9a\x8d\x8d\x1d\xe4\x25\x78\xd0\x23\x2e\xa8\xc9\x6a\x20\x29\x38\x23\x5f\xe3\xf1\xb2\x8d\x49\x12\x0e\xce\x74\x7e\xe3\x6d\x52\xf5\xf0\x3e\xf7\x15\xac\xc8\x23\xe8\x47\xa8\xde\x99\xa0\xc3\xae\xfa\xcd\x00\x8e\xd7\xdb\xa7\x2b\xbf\xb4\x6a\x7f\x06\x00\x00\xff\xff\x15\x05\xa1\x06\xba\x08\x00\x00"), }, "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ name: "imagestream", diff --git a/tmpl/innerloop/deployment b/tmpl/innerloop/deployment index 558b99b..75e17fe 100644 --- a/tmpl/innerloop/deployment +++ b/tmpl/innerloop/deployment @@ -13,7 +13,8 @@ spec: template: metadata: labels: - app: {{.Name}} + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} name: {{.Name}} spec: containers: diff --git a/tmpl/innerloop/deploymentconfig b/tmpl/innerloop/deploymentconfig index 7fb158c..90944bc 100644 --- a/tmpl/innerloop/deploymentconfig +++ b/tmpl/innerloop/deploymentconfig @@ -15,7 +15,8 @@ spec: template: metadata: labels: - app: {{.Name}} + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} deploymentconfig: {{.Name}} name: {{.Name}} spec: From 137a1f804bfc3fb1428862ebe3858f26f020d155 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 29 Jan 2019 19:24:15 +0100 Subject: [PATCH 44/62] Add new resources to build project --- assets_vfsdata.go | 59 +++++++++++++++++++++++++++++++++++++- tmpl/outerloop/buildconfig | 38 ++++++++++++++++++++++++ tmpl/outerloop/imagestream | 4 +++ 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 tmpl/outerloop/buildconfig create mode 100644 tmpl/outerloop/imagestream diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 7d929ed..616bdad 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -21,7 +21,7 @@ var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2018, 12, 21, 14, 56, 32, 787887750, time.UTC), + modTime: time.Date(2019, 1, 29, 18, 15, 37, 81325585, time.UTC), }, "/innerloop": &vfsgen۰DirInfo{ name: "innerloop", @@ -76,6 +76,22 @@ var Assets = func() http.FileSystem { compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x8f\xbd\x6a\xc4\x30\x10\x84\x7b\x3f\xc5\x14\x57\x26\x86\xb4\x82\x54\x69\xf3\x63\xb8\x90\x7e\x4f\x1e\x0e\xc7\xb2\x24\xd6\x1b\x43\x10\x7a\xf7\x60\x25\x10\x0e\xdc\x0d\x9a\xf9\x46\xb3\x92\xa7\x0f\xea\x3a\xa5\xe8\xb0\x3d\x74\xf3\x14\x47\x87\x33\x75\x9b\x3c\xbb\x85\x26\xa3\x98\xb8\x0e\x88\xb2\xd0\xa1\x94\xfe\x55\x16\xd6\xda\x01\x41\x2e\x0c\xeb\xee\x01\x92\xf3\xad\x79\x04\x00\xa5\x40\x25\x5e\x89\xd3\xcc\xef\x3b\x9c\x36\x09\x5f\x84\x7b\x44\xff\x76\xf9\xa4\xb7\x17\x9a\xf4\xcf\xad\x17\xff\xc8\x1e\x46\xad\xae\xe9\x5f\xa4\xd6\x52\xc0\x38\xee\xa9\x35\xd3\xef\x2b\x72\x52\x6b\x73\xee\x9b\x6c\x7f\x9f\x33\x7d\x3f\x24\xb5\xbf\xb6\xac\xc9\x92\x4f\xc1\xe1\xfd\x69\x68\x2f\x26\x7a\xa5\x0d\xc7\xc0\xca\x40\x6f\x49\x8f\x8e\xfc\x09\x00\x00\xff\xff\xe7\xe7\x7e\xf8\x3a\x01\x00\x00"), }, + "/outerloop": &vfsgen۰DirInfo{ + name: "outerloop", + modTime: time.Date(2019, 1, 29, 18, 22, 58, 472447921, time.UTC), + }, + "/outerloop/buildconfig": &vfsgen۰CompressedFileInfo{ + name: "buildconfig", + modTime: time.Date(2019, 1, 29, 18, 22, 58, 469504098, time.UTC), + uncompressedSize: 837, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x52\xcd\x6e\x9b\x40\x10\xbe\xf3\x14\x23\xcb\xa7\xaa\xa6\xea\x75\xa5\x1e\x6c\x42\x6c\xd4\xc4\x58\x80\x53\xe5\x84\xc6\x78\x4c\x36\x81\x05\x2d\xb3\x56\x2d\xc4\xbb\x57\xec\xda\xad\xe3\xb4\xe5\xc2\xec\xec\xf7\xb3\xf3\x83\xad\x7c\x22\xdd\xc9\x46\x09\x38\x7e\xf5\xde\xa4\xda\x0b\x58\x18\x59\xed\x83\x46\x1d\x64\xe9\xd5\xc4\xb8\x47\x46\xe1\x01\x54\xb8\xa3\xaa\x1b\x23\x00\x6c\x5b\x01\x7d\xef\xaf\xb1\xa6\x61\xe8\x7b\xd0\xa8\x4a\x82\xe9\x1b\x9d\x3e\xc3\xf4\x88\x95\x21\x10\xdf\xc0\x8f\x77\xaf\x54\xf0\x23\x31\xfa\x0f\x96\x0e\xc3\x60\x05\xfa\xde\x82\x61\x18\x84\x8d\x1d\xc5\x4a\x91\xda\x3b\x94\xc2\x9a\xae\x5c\xbc\xae\xa5\x62\xb4\x6f\x0c\xb7\x86\xdd\x43\xb8\x71\x7f\x00\xf7\xf8\xa8\xc6\x92\x52\xd6\x84\x75\x86\xe5\xf9\xea\x46\x48\x54\xc8\xd4\xb1\x07\xd0\x35\x46\x17\xe4\x14\x4a\xc9\x17\x29\xa3\xa5\x80\x69\x9f\xc6\xdb\x24\x08\xf3\x24\xdc\xc4\x69\x94\xc5\xc9\x73\xbe\x4d\x1e\x86\x33\x46\xd3\xe1\xef\x98\x24\xbc\x77\x18\x3e\xb5\x24\x60\x29\xad\x11\x6b\x64\x2a\x4f\xce\xc1\xd9\xa6\xef\x72\x00\x07\xdd\xd4\x97\xf8\xbf\xe5\x5c\x15\x94\xb6\x54\xf8\x89\x51\x2c\x6b\xba\x2d\x6e\xfc\xa4\x2a\x34\xd5\xa4\x18\x2b\x01\xac\x0d\x9d\xf3\xa4\x8e\x17\xab\xd9\x59\xed\x71\xfe\x14\xae\xf3\x79\xb2\x4c\xf3\xf9\x66\x13\xae\xef\x7e\xbb\xd9\xd9\x08\x98\xcc\xda\x0a\xfc\xc9\x0d\x6d\x9e\x64\xd1\xfd\x3c\xc8\xf2\xbb\x28\xf9\xc0\xf0\xbf\x30\xea\x92\xf8\x9f\xa4\x20\xde\x3c\x5b\xcf\x0f\xd4\x4f\x33\xfa\x49\x85\xff\x8a\x7a\x72\xd5\xcd\xd4\x76\xce\x03\x60\x2d\xcb\x92\xb4\x5d\xc7\xd9\x38\xbb\x17\xb3\xbb\x54\xd4\x51\xa1\x89\x05\x2c\xa3\x6c\xb5\x5d\xe4\x3f\xc2\xc5\x2a\x8e\xbf\xe7\x69\x18\x24\x61\xf6\x7e\x34\x2b\xb3\xb3\x02\x2e\xe1\x96\x3e\x78\x19\x77\xd9\xa6\xe5\xd8\x7e\x77\x16\xd0\x5f\x8f\x35\xfa\x73\xf3\x2b\x00\x00\xff\xff\xf8\xe3\x2f\x62\x45\x03\x00\x00"), + }, + "/outerloop/imagestream": &vfsgen۰FileInfo{ + name: "imagestream", + modTime: time.Date(2019, 1, 29, 18, 22, 58, 471884659, time.UTC), + content: []byte("\x61\x70\x69\x56\x65\x72\x73\x69\x6f\x6e\x3a\x20\x76\x31\x0a\x6b\x69\x6e\x64\x3a\x20\x49\x6d\x61\x67\x65\x53\x74\x72\x65\x61\x6d\x0a\x6d\x65\x74\x61\x64\x61\x74\x61\x3a\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x7b\x7b\x2e\x4e\x61\x6d\x65\x7d\x7d"), + }, "/servicecatalog": &vfsgen۰DirInfo{ name: "servicecatalog", modTime: time.Date(2018, 12, 21, 14, 56, 32, 788143503, time.UTC), @@ -97,6 +113,7 @@ var Assets = func() http.FileSystem { } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/innerloop"].(os.FileInfo), + fs["/outerloop"].(os.FileInfo), fs["/servicecatalog"].(os.FileInfo), } fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ @@ -108,6 +125,10 @@ var Assets = func() http.FileSystem { fs["/innerloop/route"].(os.FileInfo), fs["/innerloop/service"].(os.FileInfo), } + fs["/outerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/outerloop/buildconfig"].(os.FileInfo), + fs["/outerloop/imagestream"].(os.FileInfo), + } fs["/servicecatalog"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/servicecatalog/servicebinding"].(os.FileInfo), fs["/servicecatalog/serviceinstance"].(os.FileInfo), @@ -136,6 +157,11 @@ func (fs vfsgen۰FS) Open(path string) (http.File, error) { vfsgen۰CompressedFileInfo: f, gr: gr, }, nil + case *vfsgen۰FileInfo: + return &vfsgen۰File{ + vfsgen۰FileInfo: f, + Reader: bytes.NewReader(f.content), + }, nil case *vfsgen۰DirInfo: return &vfsgen۰Dir{ vfsgen۰DirInfo: f, @@ -217,6 +243,37 @@ func (f *vfsgen۰CompressedFile) Close() error { return f.gr.Close() } +// vfsgen۰FileInfo is a static definition of an uncompressed file (because it's not worth gzip compressing). +type vfsgen۰FileInfo struct { + name string + modTime time.Time + content []byte +} + +func (f *vfsgen۰FileInfo) Readdir(count int) ([]os.FileInfo, error) { + return nil, fmt.Errorf("cannot Readdir from file %s", f.name) +} +func (f *vfsgen۰FileInfo) Stat() (os.FileInfo, error) { return f, nil } + +func (f *vfsgen۰FileInfo) NotWorthGzipCompressing() {} + +func (f *vfsgen۰FileInfo) Name() string { return f.name } +func (f *vfsgen۰FileInfo) Size() int64 { return int64(len(f.content)) } +func (f *vfsgen۰FileInfo) Mode() os.FileMode { return 0444 } +func (f *vfsgen۰FileInfo) ModTime() time.Time { return f.modTime } +func (f *vfsgen۰FileInfo) IsDir() bool { return false } +func (f *vfsgen۰FileInfo) Sys() interface{} { return nil } + +// vfsgen۰File is an opened file instance. +type vfsgen۰File struct { + *vfsgen۰FileInfo + *bytes.Reader +} + +func (f *vfsgen۰File) Close() error { + return nil +} + // vfsgen۰DirInfo is a static definition of a directory. type vfsgen۰DirInfo struct { name string diff --git a/tmpl/outerloop/buildconfig b/tmpl/outerloop/buildconfig new file mode 100644 index 0000000..91c0604 --- /dev/null +++ b/tmpl/outerloop/buildconfig @@ -0,0 +1,38 @@ +apiVersion: v1 +kind: BuildConfig +metadata: + labels: + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} + name: {{.Name}} +spec: + output: + to: + kind: ImageStreamTag + name: {{.Name}}:latest + source: + git: + uri: ${SOURCE_REPOSITORY_URL} + ref: ${SOURCE_REPOSITORY_REF} + type: Git + strategy: + sourceStrategy: + from: + kind: ImageStreamTag + name: {{.Spec.RuntimeName}}:latest + incremental: true + env: + - name: MAVEN_ARGS_APPEND + value: "-pl ." + - name: ARTIFACT_DIR + value: "./target" + - name: ARTIFACT_COPY_ARGS + value: "*-exec.jar" + type: Source + triggers: + - github: + secret: GITHUB_WEBHOOK_SECRET + type: GitHub + - type: ConfigChange + - imageChange: {} + type: ImageChange \ No newline at end of file diff --git a/tmpl/outerloop/imagestream b/tmpl/outerloop/imagestream new file mode 100644 index 0000000..56141c7 --- /dev/null +++ b/tmpl/outerloop/imagestream @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ImageStream +metadata: + name: {{.Name}} \ No newline at end of file From 64f547866259b2229c5a9261f10557c41d0967e9 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 29 Jan 2019 22:44:27 +0100 Subject: [PATCH 45/62] Add missing group --- assets_vfsdata.go | 8 ++++---- tmpl/outerloop/buildconfig | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 616bdad..2930ef2 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -78,14 +78,14 @@ var Assets = func() http.FileSystem { }, "/outerloop": &vfsgen۰DirInfo{ name: "outerloop", - modTime: time.Date(2019, 1, 29, 18, 22, 58, 472447921, time.UTC), + modTime: time.Date(2019, 1, 29, 21, 25, 6, 662912722, time.UTC), }, "/outerloop/buildconfig": &vfsgen۰CompressedFileInfo{ name: "buildconfig", - modTime: time.Date(2019, 1, 29, 18, 22, 58, 469504098, time.UTC), - uncompressedSize: 837, + modTime: time.Date(2019, 1, 29, 21, 25, 6, 661921490, time.UTC), + uncompressedSize: 856, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x52\xcd\x6e\x9b\x40\x10\xbe\xf3\x14\x23\xcb\xa7\xaa\xa6\xea\x75\xa5\x1e\x6c\x42\x6c\xd4\xc4\x58\x80\x53\xe5\x84\xc6\x78\x4c\x36\x81\x05\x2d\xb3\x56\x2d\xc4\xbb\x57\xec\xda\xad\xe3\xb4\xe5\xc2\xec\xec\xf7\xb3\xf3\x83\xad\x7c\x22\xdd\xc9\x46\x09\x38\x7e\xf5\xde\xa4\xda\x0b\x58\x18\x59\xed\x83\x46\x1d\x64\xe9\xd5\xc4\xb8\x47\x46\xe1\x01\x54\xb8\xa3\xaa\x1b\x23\x00\x6c\x5b\x01\x7d\xef\xaf\xb1\xa6\x61\xe8\x7b\xd0\xa8\x4a\x82\xe9\x1b\x9d\x3e\xc3\xf4\x88\x95\x21\x10\xdf\xc0\x8f\x77\xaf\x54\xf0\x23\x31\xfa\x0f\x96\x0e\xc3\x60\x05\xfa\xde\x82\x61\x18\x84\x8d\x1d\xc5\x4a\x91\xda\x3b\x94\xc2\x9a\xae\x5c\xbc\xae\xa5\x62\xb4\x6f\x0c\xb7\x86\xdd\x43\xb8\x71\x7f\x00\xf7\xf8\xa8\xc6\x92\x52\xd6\x84\x75\x86\xe5\xf9\xea\x46\x48\x54\xc8\xd4\xb1\x07\xd0\x35\x46\x17\xe4\x14\x4a\xc9\x17\x29\xa3\xa5\x80\x69\x9f\xc6\xdb\x24\x08\xf3\x24\xdc\xc4\x69\x94\xc5\xc9\x73\xbe\x4d\x1e\x86\x33\x46\xd3\xe1\xef\x98\x24\xbc\x77\x18\x3e\xb5\x24\x60\x29\xad\x11\x6b\x64\x2a\x4f\xce\xc1\xd9\xa6\xef\x72\x00\x07\xdd\xd4\x97\xf8\xbf\xe5\x5c\x15\x94\xb6\x54\xf8\x89\x51\x2c\x6b\xba\x2d\x6e\xfc\xa4\x2a\x34\xd5\xa4\x18\x2b\x01\xac\x0d\x9d\xf3\xa4\x8e\x17\xab\xd9\x59\xed\x71\xfe\x14\xae\xf3\x79\xb2\x4c\xf3\xf9\x66\x13\xae\xef\x7e\xbb\xd9\xd9\x08\x98\xcc\xda\x0a\xfc\xc9\x0d\x6d\x9e\x64\xd1\xfd\x3c\xc8\xf2\xbb\x28\xf9\xc0\xf0\xbf\x30\xea\x92\xf8\x9f\xa4\x20\xde\x3c\x5b\xcf\x0f\xd4\x4f\x33\xfa\x49\x85\xff\x8a\x7a\x72\xd5\xcd\xd4\x76\xce\x03\x60\x2d\xcb\x92\xb4\x5d\xc7\xd9\x38\xbb\x17\xb3\xbb\x54\xd4\x51\xa1\x89\x05\x2c\xa3\x6c\xb5\x5d\xe4\x3f\xc2\xc5\x2a\x8e\xbf\xe7\x69\x18\x24\x61\xf6\x7e\x34\x2b\xb3\xb3\x02\x2e\xe1\x96\x3e\x78\x19\x77\xd9\xa6\xe5\xd8\x7e\x77\x16\xd0\x5f\x8f\x35\xfa\x73\xf3\x2b\x00\x00\xff\xff\xf8\xe3\x2f\x62\x45\x03\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x52\xcd\x6e\xda\x40\x10\xbe\xfb\x29\x46\x88\x53\x55\x1c\xf5\xba\x52\x0f\xe0\x38\x60\x35\xc1\x68\x6d\x52\xe5\x64\xad\xcd\x60\x36\xb1\xd7\xd6\x7a\x16\x15\x59\x7e\xf7\xca\xbb\xd0\x12\xd2\x86\x0b\xe3\x99\xef\x67\xe7\x47\xb4\xf2\x19\x75\x27\x1b\xc5\x20\x37\xb2\xda\xf9\x4d\x8b\xaa\x3b\xc8\x3d\xf9\xb2\xb9\x3b\x7e\xf3\xde\xa4\xda\x31\x58\x8c\xb5\xa0\x51\x7b\x59\x7a\x35\x92\xd8\x09\x12\xcc\x03\xa8\x44\x8e\x55\x37\x46\x00\xa2\x6d\x19\xf4\xbd\xbf\x16\x35\x0e\x43\xdf\x83\x16\xaa\x44\x98\xbe\xe1\xe9\x2b\x4c\x8f\xa2\x32\x08\xec\x3b\xf8\x71\xfe\x8a\x05\x3d\x21\x09\xff\xd1\xd2\x61\x18\xac\x40\xdf\x5b\x30\x0c\x03\xb3\xb1\xa3\x58\x29\x54\x3b\x87\x52\xa2\xc6\x2b\x17\xaf\x6b\xb1\x18\xed\x1b\x43\xad\x21\xf7\x10\x6a\xdc\x3f\x80\x7b\x7c\x54\x8b\x12\x13\xd2\x28\xea\x54\x94\xe7\xd2\x8d\x10\xab\x04\x61\x47\x1e\x40\xd7\x18\x5d\xa0\x53\x28\x25\x5d\xa4\x8c\x96\x0c\xa6\x7d\x12\x6f\x79\x10\x66\x3c\xdc\xc4\x49\x94\xc6\xfc\x25\xdb\xf2\xc7\xe1\x8c\xd1\xb8\xff\x37\x86\x87\x0f\x0e\x43\xa7\x16\x19\x2c\xa5\x35\x22\x2d\x08\xcb\x93\x73\x70\xb6\xc9\xbb\x1c\xc0\x5e\x37\xf5\x25\xfe\xb4\x9d\xab\x86\x92\x16\x0b\x9f\x1b\x45\xb2\xc6\xdb\xe6\xc6\x9f\x54\x85\xc6\x1a\x15\x89\x8a\x01\x69\x83\xe7\x3c\xaa\xe3\xc5\x6a\x76\x56\x7b\x9a\x3f\x87\xeb\x6c\xce\x97\x49\x36\xdf\x6c\xc2\xf5\xfd\x1f\x37\xbb\x1b\x06\x93\x59\x5b\x81\x3f\xb9\xa1\xcd\x79\x1a\x3d\xcc\x83\x34\xbb\x8f\xf8\x07\x86\x7f\x47\x42\x97\x48\xff\x25\x05\xf1\xe6\xc5\x7a\x7e\xa0\x7e\x99\xe1\x2f\x2c\xfc\x57\xa1\x27\x57\xd3\x4c\xec\xe4\x3c\x00\xd2\xb2\x2c\x51\xdb\x73\x9c\x8d\xbb\x3b\x98\xfc\xd2\x51\x87\x85\x46\x62\xb0\x8c\xd2\xd5\x76\x91\xfd\x0c\x17\xab\x38\xfe\x91\x25\x61\xc0\xc3\xf4\xfd\x6a\x56\x26\xb7\x02\x2e\xe1\x8e\x3e\x38\x8c\xb7\x6c\xd3\x72\x1c\xbf\xfb\x66\xd0\x5f\xaf\x35\xfa\x5b\xf9\x1d\x00\x00\xff\xff\x3c\xe9\xf8\xa8\x58\x03\x00\x00"), }, "/outerloop/imagestream": &vfsgen۰FileInfo{ name: "imagestream", diff --git a/tmpl/outerloop/buildconfig b/tmpl/outerloop/buildconfig index 91c0604..992558f 100644 --- a/tmpl/outerloop/buildconfig +++ b/tmpl/outerloop/buildconfig @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: From 9f647c6cd0a9353fb8cca10a0335d9306be61e18 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Tue, 29 Jan 2019 22:44:53 +0100 Subject: [PATCH 46/62] Enable outerloop --- template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.go b/template.go index 6a275e1..e965a50 100644 --- a/template.go +++ b/template.go @@ -30,7 +30,7 @@ import ( var ( TemplateAssets = Assets - TemplatePath = []string{"innerloop", "servicecatalog"} + TemplatePath = []string{"innerloop", "servicecatalog","outerloop"} TemplateFiles []string Templates = make(map[string]template.Template) ) From b52e5cae4cb3f75ae632e65bd4ae6e3e8731df2d Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 10:13:25 +0100 Subject: [PATCH 47/62] Define fields using annotations keys --- tmpl/outerloop/buildconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmpl/outerloop/buildconfig b/tmpl/outerloop/buildconfig index 992558f..a1eb0fc 100644 --- a/tmpl/outerloop/buildconfig +++ b/tmpl/outerloop/buildconfig @@ -12,8 +12,8 @@ spec: name: {{.Name}}:latest source: git: - uri: ${SOURCE_REPOSITORY_URL} - ref: ${SOURCE_REPOSITORY_REF} + uri: {{ index .ObjectMeta.Annotations "app.openshift.io/git-uri" }} + ref: {{ index .ObjectMeta.Annotations "app.openshift.io/git-ref" }} type: Git strategy: sourceStrategy: @@ -23,7 +23,7 @@ spec: incremental: true env: - name: MAVEN_ARGS_APPEND - value: "-pl ." + value: "-pl {{ index .ObjectMeta.Annotations "app.openshift.io/git-dir" }}" - name: ARTIFACT_DIR value: "./target" - name: ARTIFACT_COPY_ARGS From a5d8f8744a1f89e657591bcdffcb831c5f0ada37 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 10:13:47 +0100 Subject: [PATCH 48/62] Add empty spec field --- tmpl/outerloop/imagestream | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tmpl/outerloop/imagestream b/tmpl/outerloop/imagestream index 56141c7..edd24ee 100644 --- a/tmpl/outerloop/imagestream +++ b/tmpl/outerloop/imagestream @@ -1,4 +1,5 @@ -apiVersion: v1 +apiVersion: image.openshift.io/v1 kind: ImageStream metadata: - name: {{.Name}} \ No newline at end of file + name: {{.Name}} +spec: \ No newline at end of file From b4bd3f0b3401892dc2a509be31d45a20b58763cd Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 10:40:19 +0100 Subject: [PATCH 49/62] Generate new assets --- assets_vfsdata.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 2930ef2..0907527 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -78,19 +78,19 @@ var Assets = func() http.FileSystem { }, "/outerloop": &vfsgen۰DirInfo{ name: "outerloop", - modTime: time.Date(2019, 1, 29, 21, 25, 6, 662912722, time.UTC), + modTime: time.Date(2019, 1, 30, 8, 21, 6, 783322863, time.UTC), }, "/outerloop/buildconfig": &vfsgen۰CompressedFileInfo{ name: "buildconfig", - modTime: time.Date(2019, 1, 29, 21, 25, 6, 661921490, time.UTC), - uncompressedSize: 856, + modTime: time.Date(2019, 1, 30, 8, 21, 6, 782254932, time.UTC), + uncompressedSize: 993, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x52\xcd\x6e\xda\x40\x10\xbe\xfb\x29\x46\x88\x53\x55\x1c\xf5\xba\x52\x0f\xe0\x38\x60\x35\xc1\x68\x6d\x52\xe5\x64\xad\xcd\x60\x36\xb1\xd7\xd6\x7a\x16\x15\x59\x7e\xf7\xca\xbb\xd0\x12\xd2\x86\x0b\xe3\x99\xef\x67\xe7\x47\xb4\xf2\x19\x75\x27\x1b\xc5\x20\x37\xb2\xda\xf9\x4d\x8b\xaa\x3b\xc8\x3d\xf9\xb2\xb9\x3b\x7e\xf3\xde\xa4\xda\x31\x58\x8c\xb5\xa0\x51\x7b\x59\x7a\x35\x92\xd8\x09\x12\xcc\x03\xa8\x44\x8e\x55\x37\x46\x00\xa2\x6d\x19\xf4\xbd\xbf\x16\x35\x0e\x43\xdf\x83\x16\xaa\x44\x98\xbe\xe1\xe9\x2b\x4c\x8f\xa2\x32\x08\xec\x3b\xf8\x71\xfe\x8a\x05\x3d\x21\x09\xff\xd1\xd2\x61\x18\xac\x40\xdf\x5b\x30\x0c\x03\xb3\xb1\xa3\x58\x29\x54\x3b\x87\x52\xa2\xc6\x2b\x17\xaf\x6b\xb1\x18\xed\x1b\x43\xad\x21\xf7\x10\x6a\xdc\x3f\x80\x7b\x7c\x54\x8b\x12\x13\xd2\x28\xea\x54\x94\xe7\xd2\x8d\x10\xab\x04\x61\x47\x1e\x40\xd7\x18\x5d\xa0\x53\x28\x25\x5d\xa4\x8c\x96\x0c\xa6\x7d\x12\x6f\x79\x10\x66\x3c\xdc\xc4\x49\x94\xc6\xfc\x25\xdb\xf2\xc7\xe1\x8c\xd1\xb8\xff\x37\x86\x87\x0f\x0e\x43\xa7\x16\x19\x2c\xa5\x35\x22\x2d\x08\xcb\x93\x73\x70\xb6\xc9\xbb\x1c\xc0\x5e\x37\xf5\x25\xfe\xb4\x9d\xab\x86\x92\x16\x0b\x9f\x1b\x45\xb2\xc6\xdb\xe6\xc6\x9f\x54\x85\xc6\x1a\x15\x89\x8a\x01\x69\x83\xe7\x3c\xaa\xe3\xc5\x6a\x76\x56\x7b\x9a\x3f\x87\xeb\x6c\xce\x97\x49\x36\xdf\x6c\xc2\xf5\xfd\x1f\x37\xbb\x1b\x06\x93\x59\x5b\x81\x3f\xb9\xa1\xcd\x79\x1a\x3d\xcc\x83\x34\xbb\x8f\xf8\x07\x86\x7f\x47\x42\x97\x48\xff\x25\x05\xf1\xe6\xc5\x7a\x7e\xa0\x7e\x99\xe1\x2f\x2c\xfc\x57\xa1\x27\x57\xd3\x4c\xec\xe4\x3c\x00\xd2\xb2\x2c\x51\xdb\x73\x9c\x8d\xbb\x3b\x98\xfc\xd2\x51\x87\x85\x46\x62\xb0\x8c\xd2\xd5\x76\x91\xfd\x0c\x17\xab\x38\xfe\x91\x25\x61\xc0\xc3\xf4\xfd\x6a\x56\x26\xb7\x02\x2e\xe1\x8e\x3e\x38\x8c\xb7\x6c\xd3\x72\x1c\xbf\xfb\x66\xd0\x5f\xaf\x35\xfa\x5b\xf9\x1d\x00\x00\xff\xff\x3c\xe9\xf8\xa8\x58\x03\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x53\xc1\x8e\xda\x30\x10\xbd\xe7\x2b\x46\x68\x4f\x55\xc9\xaa\x57\x4b\x3d\x04\x96\x02\x6a\x17\x10\xa1\x5b\xf5\x84\x86\x64\x08\xde\x4d\x6c\xcb\x19\xa3\x45\x51\xfe\xbd\x8a\x4d\xb6\xc0\xaa\x3d\x2c\x17\x9c\x19\xcf\x7b\x6f\xde\x78\xd0\xc8\x27\xb2\xb5\xd4\x4a\xc0\xce\xc9\x32\x8f\xb5\x21\x55\x1f\xe4\x9e\x63\xa9\xef\x8f\x5f\xa2\x17\xa9\x72\x01\xa3\x2e\x37\xd6\x6a\x2f\x8b\xa8\x22\xc6\x1c\x19\x45\x04\x50\xe2\x8e\xca\xba\x3b\x01\xa0\x31\x02\x9a\x26\x5e\x60\x45\x6d\xdb\x34\x60\x51\x15\x04\x77\x2f\x74\xfa\x0c\x77\x47\x2c\x1d\x81\xf8\x0a\xf1\x72\xf7\x4c\x19\x3f\x12\x63\xfc\xc3\x97\x43\xdb\x7a\x80\xa6\xf1\x97\xa1\x6d\x85\x3f\x87\x12\x0f\x45\x2a\x0f\xb7\x14\x56\x74\xc1\x12\xd5\x86\xb2\x8e\x5e\x3b\x36\x8e\x83\x10\xd6\xe1\x1f\x20\x88\x9f\x57\x58\x50\xca\x96\xb0\xda\x60\x71\x4e\xdd\x00\x89\x12\x99\x6a\x8e\x00\x6a\xed\x6c\x46\x01\xa1\x90\xdc\x43\x39\x2b\xbd\x2a\xa9\x72\x7a\xbd\x6a\x22\x51\x4a\x33\xb2\xd4\xaa\x86\x01\x1a\x73\x6d\x61\x21\x79\xe8\xac\x1c\xf4\x4d\x02\x58\xda\x7f\x18\xc9\xd2\xfe\x0d\x89\x4f\x86\x04\x4c\xa5\x17\xcd\x16\x99\x8a\x53\x50\x1b\x5a\x48\xaf\x62\x00\x7b\xab\xab\xfe\xfc\x5f\x6b\x2e\xcc\x49\x0d\x65\xf1\xda\x29\x96\x15\xdd\x1a\xd5\xfd\xa4\xca\x2c\x55\xa4\x18\x4b\x01\x6c\x1d\x9d\xe3\xa4\x8e\x3d\xd5\xf0\x8c\xf6\x98\x3c\x4d\x16\xdb\x64\x3d\x4d\xb7\xc9\x6a\x35\x59\x3c\xbc\xb1\xf9\x39\x0b\x18\x0c\x4d\xf9\x51\x5f\x72\x69\x3b\x5f\x06\x37\x9c\xc9\x7a\x33\xff\x96\x8c\x37\xdb\x87\xf9\xfa\x1d\x5d\x7c\xcf\x68\x0b\xe2\x7f\x16\x8d\x97\xab\xdf\x5e\xf0\xbb\xd2\x4f\x43\x7a\xa5\x2c\x7e\x46\x3b\xb8\x18\x45\xea\x6d\x8f\x00\xd8\xca\xa2\x20\xeb\xf7\x62\xd8\x3d\xa2\x83\xdb\xf5\x76\xd4\x94\x59\x62\x01\xd3\xf9\x66\xf6\x73\xb4\xfd\x35\x19\xcd\x96\xcb\xef\xdb\x74\x32\x5e\x4f\x36\xd7\x73\x9d\xb9\x9d\x07\x08\x81\xb0\x7d\xe3\x43\xb7\x54\x3e\x2c\xbb\xd9\x85\x6f\x01\xcd\xe5\x9b\x98\xff\xcd\xfc\x09\x00\x00\xff\xff\xc1\x3f\xdf\xb6\xe1\x03\x00\x00"), }, "/outerloop/imagestream": &vfsgen۰FileInfo{ name: "imagestream", - modTime: time.Date(2019, 1, 29, 18, 22, 58, 471884659, time.UTC), - content: []byte("\x61\x70\x69\x56\x65\x72\x73\x69\x6f\x6e\x3a\x20\x76\x31\x0a\x6b\x69\x6e\x64\x3a\x20\x49\x6d\x61\x67\x65\x53\x74\x72\x65\x61\x6d\x0a\x6d\x65\x74\x61\x64\x61\x74\x61\x3a\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x7b\x7b\x2e\x4e\x61\x6d\x65\x7d\x7d"), + modTime: time.Date(2019, 1, 30, 6, 46, 12, 600732750, time.UTC), + content: []byte("\x61\x70\x69\x56\x65\x72\x73\x69\x6f\x6e\x3a\x20\x69\x6d\x61\x67\x65\x2e\x6f\x70\x65\x6e\x73\x68\x69\x66\x74\x2e\x69\x6f\x2f\x76\x31\x0a\x6b\x69\x6e\x64\x3a\x20\x49\x6d\x61\x67\x65\x53\x74\x72\x65\x61\x6d\x0a\x6d\x65\x74\x61\x64\x61\x74\x61\x3a\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x7b\x7b\x2e\x4e\x61\x6d\x65\x7d\x7d\x0a\x73\x70\x65\x63\x3a"), }, "/servicecatalog": &vfsgen۰DirInfo{ name: "servicecatalog", From 2c28f7dcde791566f5029b78773b4a077800291c Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 11:25:10 +0100 Subject: [PATCH 50/62] Fix annotations to use appropriate keys --- assets_vfsdata.go | 8 ++++---- tmpl/outerloop/buildconfig | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 0907527..7be112a 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -78,14 +78,14 @@ var Assets = func() http.FileSystem { }, "/outerloop": &vfsgen۰DirInfo{ name: "outerloop", - modTime: time.Date(2019, 1, 30, 8, 21, 6, 783322863, time.UTC), + modTime: time.Date(2019, 1, 30, 9, 52, 34, 292928729, time.UTC), }, "/outerloop/buildconfig": &vfsgen۰CompressedFileInfo{ name: "buildconfig", - modTime: time.Date(2019, 1, 30, 8, 21, 6, 782254932, time.UTC), - uncompressedSize: 993, + modTime: time.Date(2019, 1, 30, 9, 52, 34, 292128427, time.UTC), + uncompressedSize: 1056, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x53\xc1\x8e\xda\x30\x10\xbd\xe7\x2b\x46\x68\x4f\x55\xc9\xaa\x57\x4b\x3d\x04\x96\x02\x6a\x17\x10\xa1\x5b\xf5\x84\x86\x64\x08\xde\x4d\x6c\xcb\x19\xa3\x45\x51\xfe\xbd\x8a\x4d\xb6\xc0\xaa\x3d\x2c\x17\x9c\x19\xcf\x7b\x6f\xde\x78\xd0\xc8\x27\xb2\xb5\xd4\x4a\xc0\xce\xc9\x32\x8f\xb5\x21\x55\x1f\xe4\x9e\x63\xa9\xef\x8f\x5f\xa2\x17\xa9\x72\x01\xa3\x2e\x37\xd6\x6a\x2f\x8b\xa8\x22\xc6\x1c\x19\x45\x04\x50\xe2\x8e\xca\xba\x3b\x01\xa0\x31\x02\x9a\x26\x5e\x60\x45\x6d\xdb\x34\x60\x51\x15\x04\x77\x2f\x74\xfa\x0c\x77\x47\x2c\x1d\x81\xf8\x0a\xf1\x72\xf7\x4c\x19\x3f\x12\x63\xfc\xc3\x97\x43\xdb\x7a\x80\xa6\xf1\x97\xa1\x6d\x85\x3f\x87\x12\x0f\x45\x2a\x0f\xb7\x14\x56\x74\xc1\x12\xd5\x86\xb2\x8e\x5e\x3b\x36\x8e\x83\x10\xd6\xe1\x1f\x20\x88\x9f\x57\x58\x50\xca\x96\xb0\xda\x60\x71\x4e\xdd\x00\x89\x12\x99\x6a\x8e\x00\x6a\xed\x6c\x46\x01\xa1\x90\xdc\x43\x39\x2b\xbd\x2a\xa9\x72\x7a\xbd\x6a\x22\x51\x4a\x33\xb2\xd4\xaa\x86\x01\x1a\x73\x6d\x61\x21\x79\xe8\xac\x1c\xf4\x4d\x02\x58\xda\x7f\x18\xc9\xd2\xfe\x0d\x89\x4f\x86\x04\x4c\xa5\x17\xcd\x16\x99\x8a\x53\x50\x1b\x5a\x48\xaf\x62\x00\x7b\xab\xab\xfe\xfc\x5f\x6b\x2e\xcc\x49\x0d\x65\xf1\xda\x29\x96\x15\xdd\x1a\xd5\xfd\xa4\xca\x2c\x55\xa4\x18\x4b\x01\x6c\x1d\x9d\xe3\xa4\x8e\x3d\xd5\xf0\x8c\xf6\x98\x3c\x4d\x16\xdb\x64\x3d\x4d\xb7\xc9\x6a\x35\x59\x3c\xbc\xb1\xf9\x39\x0b\x18\x0c\x4d\xf9\x51\x5f\x72\x69\x3b\x5f\x06\x37\x9c\xc9\x7a\x33\xff\x96\x8c\x37\xdb\x87\xf9\xfa\x1d\x5d\x7c\xcf\x68\x0b\xe2\x7f\x16\x8d\x97\xab\xdf\x5e\xf0\xbb\xd2\x4f\x43\x7a\xa5\x2c\x7e\x46\x3b\xb8\x18\x45\xea\x6d\x8f\x00\xd8\xca\xa2\x20\xeb\xf7\x62\xd8\x3d\xa2\x83\xdb\xf5\x76\xd4\x94\x59\x62\x01\xd3\xf9\x66\xf6\x73\xb4\xfd\x35\x19\xcd\x96\xcb\xef\xdb\x74\x32\x5e\x4f\x36\xd7\x73\x9d\xb9\x9d\x07\x08\x81\xb0\x7d\xe3\x43\xb7\x54\x3e\x2c\xbb\xd9\x85\x6f\x01\xcd\xe5\x9b\x98\xff\xcd\xfc\x09\x00\x00\xff\xff\xc1\x3f\xdf\xb6\xe1\x03\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x53\xc1\x8e\xda\x30\x10\xbd\xe7\x2b\x46\x68\x8f\x4d\x56\xbd\x5a\xea\x21\xcb\xd2\x05\xb5\x0b\x88\xd0\xad\x7a\x42\x43\x32\x09\xee\x26\xb6\xe5\x8c\x51\x51\x94\x7f\xaf\x62\xc3\x2e\xb0\x6a\x0f\x70\xc1\x19\x7b\xde\x7b\xf3\x66\x06\x8d\x7c\x21\xdb\x4a\xad\x04\x6c\x9d\xac\x8b\x44\x1b\x52\xed\x4e\x96\x9c\x48\x7d\xbf\xff\x1c\xbd\x4a\x55\x08\x78\x18\xee\xc6\x5a\x95\xb2\x8a\x1a\x62\x2c\x90\x51\x44\x00\x35\x6e\xa9\x6e\x87\x13\x00\x1a\x23\xa0\xeb\x92\x39\x36\xd4\xf7\x5d\x07\x16\x55\x45\x70\xf7\x4a\x87\x4f\x70\xb7\xc7\xda\x11\x88\x2f\x90\x2c\xb6\xbf\x29\xe7\x67\x62\x4c\xbe\xfb\x74\xe8\x7b\x0f\xd0\x75\xfe\x31\xf4\xbd\xf0\xe7\x90\xe2\xa1\x48\x15\xe1\x95\xc2\x86\xce\x58\xa2\xd6\x50\x3e\xd0\x6b\xc7\xc6\x71\x10\xc2\x3a\xfc\x03\x04\xf1\xb3\x06\x2b\xca\xd8\x12\x36\x6b\xac\x8e\x57\x57\x40\xa2\x46\xa6\x96\x23\x80\x56\x3b\x9b\x53\x40\xa8\x24\x9f\xa0\x9c\x95\x5e\x95\x54\x05\xfd\xb9\x28\x22\x55\x4a\x33\xb2\xd4\xaa\x85\x11\x1a\x73\x69\x61\x25\x39\x76\x56\x8e\x4e\x45\x02\x58\x2a\x6f\x46\xb2\x54\xbe\x21\xf1\xc1\x90\x80\x27\xe9\x45\xb3\x45\xa6\xea\x10\xd4\x86\x12\xb2\x8b\x18\x40\x69\x75\x73\x3a\xff\xd7\x9a\x33\x73\x32\x43\x79\xb2\x72\x8a\x65\x43\xd7\x46\x0d\x3f\xa9\x72\x4b\x0d\x29\xc6\x5a\x00\x5b\x47\xc7\x38\xa9\xfd\x89\x2a\x3e\xa2\x3d\xa7\x2f\x93\xf9\x26\x5d\x3d\x65\x9b\x74\xb9\x9c\xcc\x1f\xdf\xd8\x7c\x9f\x05\x8c\x62\x53\xdf\xea\x4b\x21\xed\xe0\xcb\xe8\x8a\x33\x5d\xad\x67\x5f\xd3\xf1\x7a\xf3\x38\x5b\x7d\xa0\x4b\xee\x19\x6d\x45\xfc\xcf\xa4\xf1\x62\xf9\xcb\x0b\xfe\x90\x7a\x83\x4a\xb4\x2c\x4b\xcc\x39\xce\xb5\x39\xc4\x68\xab\xf6\x5d\x70\xe8\x64\xe6\xbb\x16\x01\xb0\x95\x55\x45\xd6\xaf\x55\x3c\xcc\xe0\xce\x6d\x4f\x6e\xb6\x94\x5b\x62\x01\x4f\xb3\xf5\xf4\xc7\xc3\xe6\xe7\xe4\x61\xba\x58\x7c\xdb\x64\x93\xf1\x6a\xb2\xbe\x1c\x8b\xa9\xdb\x7a\x80\x10\x08\xcb\x3b\xde\x0d\x3b\xe9\xc3\x72\x68\x7d\xf8\x16\xd0\x9d\x8f\xd4\xec\xfd\xe6\x6f\x00\x00\x00\xff\xff\x1b\x8f\x58\xf7\x20\x04\x00\x00"), }, "/outerloop/imagestream": &vfsgen۰FileInfo{ name: "imagestream", diff --git a/tmpl/outerloop/buildconfig b/tmpl/outerloop/buildconfig index a1eb0fc..56729af 100644 --- a/tmpl/outerloop/buildconfig +++ b/tmpl/outerloop/buildconfig @@ -25,9 +25,9 @@ spec: - name: MAVEN_ARGS_APPEND value: "-pl {{ index .ObjectMeta.Annotations "app.openshift.io/git-dir" }}" - name: ARTIFACT_DIR - value: "./target" + value: "{{ index .ObjectMeta.Annotations "app.openshift.io/git-dir" }}/target" - name: ARTIFACT_COPY_ARGS - value: "*-exec.jar" + value: "{{ index .ObjectMeta.Annotations "app.openshift.io/artifact-copy-args" }}" type: Source triggers: - github: From a787496edf9a0ba8867afd41500b2a083fcc5eab Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 16:23:37 +0100 Subject: [PATCH 51/62] Regenerate assets --- assets_vfsdata.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/assets_vfsdata.go b/assets_vfsdata.go index 7be112a..75eb4a6 100644 --- a/assets_vfsdata.go +++ b/assets_vfsdata.go @@ -78,14 +78,21 @@ var Assets = func() http.FileSystem { }, "/outerloop": &vfsgen۰DirInfo{ name: "outerloop", - modTime: time.Date(2019, 1, 30, 9, 52, 34, 292928729, time.UTC), + modTime: time.Date(2019, 1, 30, 13, 47, 16, 317353065, time.UTC), }, "/outerloop/buildconfig": &vfsgen۰CompressedFileInfo{ name: "buildconfig", - modTime: time.Date(2019, 1, 30, 9, 52, 34, 292128427, time.UTC), - uncompressedSize: 1056, + modTime: time.Date(2019, 1, 30, 10, 18, 18, 964778128, time.UTC), + uncompressedSize: 1117, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x53\xc1\x8e\xda\x30\x10\xbd\xe7\x2b\x46\x68\x8f\x4d\x56\xbd\x5a\xea\x21\xcb\xd2\x05\xb5\x0b\x88\xd0\xad\x7a\x42\x43\x32\x09\xee\x26\xb6\xe5\x8c\x51\x51\x94\x7f\xaf\x62\xc3\x2e\xb0\x6a\x0f\x70\xc1\x19\x7b\xde\x7b\xf3\x66\x06\x8d\x7c\x21\xdb\x4a\xad\x04\x6c\x9d\xac\x8b\x44\x1b\x52\xed\x4e\x96\x9c\x48\x7d\xbf\xff\x1c\xbd\x4a\x55\x08\x78\x18\xee\xc6\x5a\x95\xb2\x8a\x1a\x62\x2c\x90\x51\x44\x00\x35\x6e\xa9\x6e\x87\x13\x00\x1a\x23\xa0\xeb\x92\x39\x36\xd4\xf7\x5d\x07\x16\x55\x45\x70\xf7\x4a\x87\x4f\x70\xb7\xc7\xda\x11\x88\x2f\x90\x2c\xb6\xbf\x29\xe7\x67\x62\x4c\xbe\xfb\x74\xe8\x7b\x0f\xd0\x75\xfe\x31\xf4\xbd\xf0\xe7\x90\xe2\xa1\x48\x15\xe1\x95\xc2\x86\xce\x58\xa2\xd6\x50\x3e\xd0\x6b\xc7\xc6\x71\x10\xc2\x3a\xfc\x03\x04\xf1\xb3\x06\x2b\xca\xd8\x12\x36\x6b\xac\x8e\x57\x57\x40\xa2\x46\xa6\x96\x23\x80\x56\x3b\x9b\x53\x40\xa8\x24\x9f\xa0\x9c\x95\x5e\x95\x54\x05\xfd\xb9\x28\x22\x55\x4a\x33\xb2\xd4\xaa\x85\x11\x1a\x73\x69\x61\x25\x39\x76\x56\x8e\x4e\x45\x02\x58\x2a\x6f\x46\xb2\x54\xbe\x21\xf1\xc1\x90\x80\x27\xe9\x45\xb3\x45\xa6\xea\x10\xd4\x86\x12\xb2\x8b\x18\x40\x69\x75\x73\x3a\xff\xd7\x9a\x33\x73\x32\x43\x79\xb2\x72\x8a\x65\x43\xd7\x46\x0d\x3f\xa9\x72\x4b\x0d\x29\xc6\x5a\x00\x5b\x47\xc7\x38\xa9\xfd\x89\x2a\x3e\xa2\x3d\xa7\x2f\x93\xf9\x26\x5d\x3d\x65\x9b\x74\xb9\x9c\xcc\x1f\xdf\xd8\x7c\x9f\x05\x8c\x62\x53\xdf\xea\x4b\x21\xed\xe0\xcb\xe8\x8a\x33\x5d\xad\x67\x5f\xd3\xf1\x7a\xf3\x38\x5b\x7d\xa0\x4b\xee\x19\x6d\x45\xfc\xcf\xa4\xf1\x62\xf9\xcb\x0b\xfe\x90\x7a\x83\x4a\xb4\x2c\x4b\xcc\x39\xce\xb5\x39\xc4\x68\xab\xf6\x5d\x70\xe8\x64\xe6\xbb\x16\x01\xb0\x95\x55\x45\xd6\xaf\x55\x3c\xcc\xe0\xce\x6d\x4f\x6e\xb6\x94\x5b\x62\x01\x4f\xb3\xf5\xf4\xc7\xc3\xe6\xe7\xe4\x61\xba\x58\x7c\xdb\x64\x93\xf1\x6a\xb2\xbe\x1c\x8b\xa9\xdb\x7a\x80\x10\x08\xcb\x3b\xde\x0d\x3b\xe9\xc3\x72\x68\x7d\xf8\x16\xd0\x9d\x8f\xd4\xec\xfd\xe6\x6f\x00\x00\x00\xff\xff\x1b\x8f\x58\xf7\x20\x04\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x53\x41\x6f\xdb\x3c\x0c\xbd\xfb\x57\x10\x41\x8f\x9f\x5d\x7c\x57\x01\x3b\xb8\x69\x96\x04\x5b\x93\x20\xce\x3a\xec\x14\x30\x36\xed\x68\xb5\x25\x41\xa6\x82\x05\x86\xff\xfb\x60\x29\x69\x93\x0c\xdb\xa1\x9b\x2f\xa6\x48\xe9\x3d\xf2\x91\x44\x23\x9f\xc9\xb6\x52\x2b\x01\x3b\x27\xeb\x22\xd1\x86\x54\xbb\x97\x25\x27\x52\xdf\x1f\xfe\x8f\x5e\xa4\x2a\x04\x3c\x0c\xb1\xb1\x56\xa5\xac\xa2\x86\x18\x0b\x64\x14\x11\x40\x8d\x3b\xaa\xdb\xc1\x02\x40\x63\x04\x74\x5d\xb2\xc0\x86\xfa\xbe\xeb\xc0\xa2\xaa\x08\xee\x5e\xe8\xf8\x1f\xdc\x1d\xb0\x76\x04\xe2\x03\x24\xcb\xdd\x77\xca\xf9\x89\x18\x93\xcf\xfe\x39\xf4\xbd\x07\xe8\x3a\x7f\x19\xfa\x5e\x78\x3b\x3c\xf1\x50\xa4\x8a\x70\x4b\x61\x43\x17\x2c\x51\x6b\x28\x1f\xe8\xb5\x63\xe3\x38\x24\xc2\x3a\xfc\x01\x42\xf2\xf3\x06\x2b\xca\xd8\x12\x36\x1b\xac\x4e\xa1\x1b\x20\x51\x23\x53\xcb\x11\x40\xab\x9d\xcd\x29\x20\x54\x92\xcf\x50\xce\x4a\x9f\x95\x54\x05\xfd\xb8\x2a\x22\x55\x4a\x33\xb2\xd4\xaa\x85\x11\x1a\x73\x2d\x61\x25\x39\x76\x56\x8e\xce\x45\x02\x58\x2a\xdf\x8d\x64\xa9\x7c\x45\xe2\xa3\x21\x01\x53\xe9\x93\x66\x8b\x4c\xd5\x31\x64\x1b\x4a\xc8\xae\x7c\x00\xa5\xd5\xcd\xd9\xfe\xa3\x34\x17\xe2\x64\x86\xf2\x64\xed\x14\xcb\x86\x6e\x85\x1a\x3e\xa9\x72\x4b\x0d\x29\xc6\x5a\x00\x5b\x47\x27\x3f\xa9\xc3\x99\x2a\x3e\xa1\x3d\xa5\xcf\x93\xc5\x36\x5d\x4f\xb3\x6d\xba\x5a\x4d\x16\x8f\xaf\x6c\xbe\xcf\x02\x46\xb1\xa9\xdf\xab\x4b\x21\xed\xa0\xcb\xe8\x86\x33\x5d\x6f\xe6\x1f\xd3\xf1\x66\xfb\x38\x5f\xff\x42\xf7\x77\x54\xf7\x8c\xb6\x22\xfe\x2d\xe3\x78\xb9\xfa\xe6\xab\xfd\x17\xbc\x68\x59\x96\x98\x73\x9c\x6b\x73\x8c\xd1\x56\xed\x5b\xb5\x61\x0c\x32\xdf\xf2\x08\x80\xad\xac\x2a\xb2\x7e\x27\xe3\x61\x80\xf7\x6e\x77\x6e\x45\x4b\xb9\x25\x16\x30\x9d\x6f\x66\x5f\x1e\xb6\x5f\x27\x0f\xb3\xe5\xf2\xd3\x36\x9b\x8c\xd7\x93\xcd\xf5\x4c\xcd\xdc\xce\x03\x04\x47\xd8\xfc\xf1\x7e\x58\x68\xef\x96\xc3\xdc\x84\xb3\x80\xee\x72\x1e\xe7\x6f\x91\x9f\x01\x00\x00\xff\xff\xe6\xc8\x1f\xfb\x5d\x04\x00\x00"), + }, + "/outerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ + name: "deploymentconfig", + modTime: time.Date(2019, 1, 30, 13, 47, 16, 316810694, time.UTC), + uncompressedSize: 1097, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\x4d\x6f\xd4\x30\x10\x86\xef\xf9\x15\xa3\xaa\x47\x12\xd4\xab\x25\x0e\x68\xe1\x80\xc4\xc7\x8a\x56\xbd\x4f\x93\xd9\xd4\xd4\x9e\xb1\xec\xd9\x15\xab\x28\xff\x1d\xd9\x2e\xdb\x64\x59\x10\x12\xcc\xc9\x5f\x33\xf3\xbe\x8f\x6d\x0c\xf6\x9e\x62\xb2\xc2\x06\x30\x84\xd4\x49\x20\x4e\x8f\x76\xa7\x9d\x95\xd7\x87\x9b\xe6\xc9\xf2\x60\xe0\x1d\x05\x27\x47\x4f\xac\x1b\xe1\x9d\x1d\x1b\x4f\x8a\x03\x2a\x9a\x06\xc0\xe1\x03\xb9\x94\x47\x90\x6b\x18\x98\xa6\xee\x33\x7a\x9a\xe7\x69\x82\x88\x3c\x12\x5c\x3f\xd1\xf1\x15\x5c\x1f\xd0\xed\x09\xcc\x1b\xe8\xbe\x3c\x7c\xa3\x5e\x3f\x91\x62\xf7\xb1\xa4\xc3\x3c\x97\x02\xd3\x54\x0e\xc3\x3c\x9b\x32\xae\x29\xa5\x14\xf1\x50\x4f\x31\x7a\x5a\x74\x69\x52\xa0\x3e\xb7\x8f\x14\x9c\xed\x31\x19\xb8\x69\x00\x12\x39\xea\x55\xe2\x25\x61\x65\x69\x38\x99\xea\x8b\xa9\xf5\x7e\xd2\x88\x4a\xe3\xb1\xa6\xeb\x31\x90\x81\xaf\xe2\x9c\xe5\xb1\x01\x50\xf2\xc1\xa1\x52\xdd\x5d\xd2\xc8\xb1\x24\xf2\x5f\xa8\xfc\x2d\x99\x1a\x7f\x36\x96\xe3\x9c\x60\x5e\xfb\x49\x31\x47\x2f\xac\x68\x99\xe2\xc9\x44\x0b\xc4\x07\xb3\x14\x53\x3d\x74\xb7\x81\xfa\xee\x3d\x1f\x56\x5a\xdb\x8b\x1d\x6a\x14\xdd\x65\xeb\x3e\x8f\x56\x0e\x89\x87\xc5\xdc\x7a\x1c\xcb\x49\xb0\x3c\xd0\xf7\x15\x9f\xb7\xcc\xa2\xa8\x56\x38\xc1\x15\x86\xb0\x7e\xb8\x71\xcf\x6a\x3d\xb5\xa5\xc2\xd5\x52\xd9\xef\x74\x05\x89\xba\xb8\xb1\xf6\x05\xc1\x56\xa2\x96\x8c\xe2\x34\xcf\x56\x76\x42\x14\x95\x5e\x9c\x81\xbb\xcd\x36\xbf\x8c\x68\xc7\xf1\x19\x5c\xfb\xfc\x6e\x3e\x64\x19\x9b\xc7\x0c\xac\x39\x19\xab\xf3\x2d\x46\xf4\xa7\xc6\xb8\x57\xf1\xa8\xb6\x37\xa0\x71\x4f\xe7\xb7\x91\x35\x2f\x6e\xe4\xdc\xc5\x2e\x8a\x7f\xb1\x50\x7f\x6e\x69\x7d\xab\x91\xd0\xdf\xe1\xf8\x0b\x86\x7f\x27\x6b\xf2\x37\x48\xfa\x23\x00\x00\xff\xff\xad\x19\x87\x0c\x49\x04\x00\x00"), }, "/outerloop/imagestream": &vfsgen۰FileInfo{ name: "imagestream", @@ -127,6 +134,7 @@ var Assets = func() http.FileSystem { } fs["/outerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/outerloop/buildconfig"].(os.FileInfo), + fs["/outerloop/deploymentconfig"].(os.FileInfo), fs["/outerloop/imagestream"].(os.FileInfo), } fs["/servicecatalog"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ From 2fb31fb19d4771c2e3606ee95136e63ec496fd12 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 16:24:12 +0100 Subject: [PATCH 52/62] Clean deploymentconfig template --- tmpl/outerloop/deploymentconfig | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tmpl/outerloop/deploymentconfig diff --git a/tmpl/outerloop/deploymentconfig b/tmpl/outerloop/deploymentconfig new file mode 100644 index 0000000..4b9b329 --- /dev/null +++ b/tmpl/outerloop/deploymentconfig @@ -0,0 +1,42 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + labels: + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} + name: {{.Name}} +spec: + replicas: 1 + selector: + app: {{.Name}} + deploymentconfig: {{.Name}} + strategy: + type: Rolling + template: + metadata: + labels: + app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} + {{ $key }}: {{ $value }}{{ end }} + deploymentconfig: {{.Name}} + name: {{.Name}} + spec: + containers: + - env: + {{ range .Spec.Envs }} + - name: {{.Name}} + value: {{.Value}} + {{end}} + image: {{ index .ObjectMeta.Annotations "app.openshift.io/runtime-image" }} + name: {{.Name}} + ports: + - containerPort: {{.Spec.Port}} + protocol: TCP + triggers: + - type: ImageChange + imageChangeParams: + automatic: true + containerNames: + - {{.Name}} + from: + kind: ImageStreamTag + name: {{ index .ObjectMeta.Annotations "app.openshift.io/runtime-image" }}:latest \ No newline at end of file From c905304448fab3d16dcfdcdf1b3911afdf87f878 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 16:27:29 +0100 Subject: [PATCH 53/62] Add new function to create RuntimeObject from template --- template.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/template.go b/template.go index e965a50..578d51e 100644 --- a/template.go +++ b/template.go @@ -23,6 +23,8 @@ import ( "github.com/shurcooL/httpfs/vfsutil" log "github.com/sirupsen/logrus" "github.com/snowdrop/component-operator/pkg/apis/component/v1alpha1" + "github.com/snowdrop/component-operator/pkg/util/kubernetes" + "k8s.io/apimachinery/pkg/runtime" "os" "strings" "text/template" @@ -96,6 +98,15 @@ func Parse(t template.Template, obj *v1alpha1.Component) bytes.Buffer { return b } +func ParseTemplateToRuntimeObject(template template.Template, component *v1alpha1.Component) (runtime.Object, error) { + b := Parse(template, component) + r, err := kubernetes.PopulateKubernetesObjectFromYaml(b.String()) + if err != nil { + return nil, err + } + return r, nil +} + // func GetTemplateFullName(artifact string) string { return strings.Join([]string{"java", artifact}, "/") From 1553843a254559566dd8cac60bbe442d7e7f0691 Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 16:51:52 +0100 Subject: [PATCH 54/62] Rename template to tmpl --- template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template.go b/template.go index 578d51e..2fdb3c0 100644 --- a/template.go +++ b/template.go @@ -98,8 +98,8 @@ func Parse(t template.Template, obj *v1alpha1.Component) bytes.Buffer { return b } -func ParseTemplateToRuntimeObject(template template.Template, component *v1alpha1.Component) (runtime.Object, error) { - b := Parse(template, component) +func ParseTemplateToRuntimeObject(tmpl template.Template, component *v1alpha1.Component) (runtime.Object, error) { + b := Parse(tmpl, component) r, err := kubernetes.PopulateKubernetesObjectFromYaml(b.String()) if err != nil { return nil, err From ac975b7b99f223f6387f5d607e71e9af309df53e Mon Sep 17 00:00:00 2001 From: Charles Moulliard Date: Wed, 30 Jan 2019 20:51:33 +0100 Subject: [PATCH 55/62] Inner to outer build works. Service should be updated to switch --- template.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template.go b/template.go index 2fdb3c0..8345fce 100644 --- a/template.go +++ b/template.go @@ -23,8 +23,8 @@ import ( "github.com/shurcooL/httpfs/vfsutil" log "github.com/sirupsen/logrus" "github.com/snowdrop/component-operator/pkg/apis/component/v1alpha1" - "github.com/snowdrop/component-operator/pkg/util/kubernetes" - "k8s.io/apimachinery/pkg/runtime" + // "github.com/snowdrop/component-operator/pkg/util/kubernetes" + // "k8s.io/apimachinery/pkg/runtime" "os" "strings" "text/template" @@ -98,14 +98,14 @@ func Parse(t template.Template, obj *v1alpha1.Component) bytes.Buffer { return b } -func ParseTemplateToRuntimeObject(tmpl template.Template, component *v1alpha1.Component) (runtime.Object, error) { +/*func ParseTemplateToRuntimeObject(tmpl template.Template, component *v1alpha1.Component) (runtime.Object, error) { b := Parse(tmpl, component) r, err := kubernetes.PopulateKubernetesObjectFromYaml(b.String()) if err != nil { return nil, err } return r, nil -} +}*/ // func GetTemplateFullName(artifact string) string { From 7256dd318d2081d4f21e646eb4b9969e68ed1605 Mon Sep 17 00:00:00 2001 From: Corinne Krych Date: Fri, 1 Mar 2019 11:06:23 +0100 Subject: [PATCH 56/62] enhance README and MAkefile with local dev environment --- Gopkg.lock | 2 + Makefile | 38 ++++++ README.md | 85 +++++++------ .../clusterregistry_v1alpha1_cluster_crd.yaml | 12 +- .../components_v1alpha1_component_cr.yaml | 7 ++ .../components_v1alpha1_component_crd.yaml | 33 +++++ ...opsconsole_v1alpha1_envdeployment_crd.yaml | 41 ++---- ...evopsconsole_v1alpha1_environment_crd.yaml | 38 ++---- deploy/role.yaml | 6 + pkg/apis/addtoscheme_components_v1alpha1.go | 10 ++ .../components/v1alpha1/component_types.go | 49 ++++++++ pkg/apis/components/v1alpha1/doc.go | 4 + pkg/apis/components/v1alpha1/register.go | 19 +++ .../v1alpha1/zz_generated.deepcopy.go | 118 ++++++++++++++++++ .../v1alpha1/zz_generated.defaults.go | 32 +++++ .../v1alpha1/zz_generated.openapi.go | 90 +++++++++++++ pkg/controller/add_component.go | 10 ++ .../component/component_controller.go | 91 ++++++++++++++ 18 files changed, 583 insertions(+), 102 deletions(-) create mode 100644 deploy/crds/components_v1alpha1_component_cr.yaml create mode 100644 deploy/crds/components_v1alpha1_component_crd.yaml create mode 100644 pkg/apis/addtoscheme_components_v1alpha1.go create mode 100644 pkg/apis/components/v1alpha1/component_types.go create mode 100644 pkg/apis/components/v1alpha1/doc.go create mode 100644 pkg/apis/components/v1alpha1/register.go create mode 100644 pkg/apis/components/v1alpha1/zz_generated.deepcopy.go create mode 100644 pkg/apis/components/v1alpha1/zz_generated.defaults.go create mode 100644 pkg/apis/components/v1alpha1/zz_generated.openapi.go create mode 100644 pkg/controller/add_component.go create mode 100644 pkg/controller/component/component_controller.go diff --git a/Gopkg.lock b/Gopkg.lock index 55e3346..2572689 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -842,6 +842,7 @@ analyzer-name = "dep" analyzer-version = 1 input-imports = [ + "github.com/go-openapi/spec", "github.com/operator-framework/operator-sdk/pkg/k8sutil", "github.com/operator-framework/operator-sdk/pkg/leader", "github.com/operator-framework/operator-sdk/pkg/ready", @@ -863,6 +864,7 @@ "k8s.io/code-generator/cmd/lister-gen", "k8s.io/code-generator/cmd/openapi-gen", "k8s.io/gengo/args", + "k8s.io/kube-openapi/pkg/common", "sigs.k8s.io/controller-runtime/pkg/client", "sigs.k8s.io/controller-runtime/pkg/client/config", "sigs.k8s.io/controller-runtime/pkg/controller", diff --git a/Makefile b/Makefile index 88b6652..5099d1f 100644 --- a/Makefile +++ b/Makefile @@ -269,4 +269,42 @@ clean: $(CLEAN_TARGETS) ## Build the operator build: prebuild-check deps @echo "building $(BINARY_SERVER_BIN)..." + operator-sdk generate k8s + operator-sdk generate openapi go build -v -o $(BINARY_SERVER_BIN) cmd/manager/main.go + +# ------------------------------------------------------------------- +# deploy +# ------------------------------------------------------------------- +APP_NAMESPACE ?= myproject +.PHONY: local +## Run Operator locally +local: deploy-rbac build deploy-crd + @-oc new-project $(APP_NAMESPACE) + operator-sdk up local --namespace=$(APP_NAMESPACE) + +.PHONY: deploy-rbac +## Setup service account and deploy RBAC +deploy-rbac: + @-oc login -u system:admin + @-oc create -f deploy/service_account.yaml + @-oc create -f deploy/role.yaml + @-oc create -f deploy/role_binding.yaml + +.PHONY: deploy-crd +## Deploy CRD +deploy-crd: + @-oc apply -f deploy/crds/components_v1alpha1_component_crd.yaml + @-oc apply -f deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml + +.PHONY: deploy-operator +## Deploy Operator +deploy-operator: deploy-crd + oc create -f deploy/operator.yaml + +.PHONY: deploy-cr +## Deploy a CR as test +deploy-test: + #@-oc delete ... TODO clean all created resource + oc create -f deploy/crds/components_v1alpha1_component_cr.yaml + diff --git a/README.md b/README.md index 4319bbb..7d8203a 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,56 @@ -## Quick Start +# DevOpsConsole -Install the operator-sdk CLI: +This repository was initially bootstrapped using [CoreOS operator](https://github.com/operator-framework/operator-sdk). -```sh -$ mkdir -p $GOPATH/src/github.com/operator-framework -$ cd $GOPATH/src/github.com/operator-framework -$ git clone https://github.com/operator-framework/operator-sdk -$ cd operator-sdk -$ git checkout master -$ make dep -$ make install -``` +## Build -Add a new API for the custom resource AppService +### Pre-requisites +- [operator-sdk v0.5.0](https://github.com/operator-framework/operator-sdk#quick-start) +- [dep][dep_tool] version v0.5.0+. +- [git][git_tool] +- [go][go_tool] version v1.10+. +- [docker][docker_tool] version 17.03+. +- [kubectl][kubectl_tool] version v1.11.0+ or [oc] version 3.11 +- Access to a kubernetes v.1.11.0+ cluster or openshift cluster version 3.11 -```sh -$ operator-sdk add api --api-version=devopsconsole.openshift.io/v1alpha1 --kind=AppService +### Build ``` - -Add a new controller that watches for AppService - -```sh -$ operator-sdk add controller --api-version=devopsconsole.openshift.io/v1alpha1 --kind=AppService +make build ``` +## Deployment -Apply the app-operator CRD. - -```sh -$ kubectl apply -f deploy/crds/app_v1alpha1_appservice_crd.yaml +### Set up Minishift (one-off) +* create a new profile to test the operator ``` - -Set the OPERATOR_NAME variable - -```sh -$ export OPERATOR_NAME=app-operator +minishift profile set devopsconsole ``` - -Run the operator from outside the Minishift environment. - -```sh -$ operator-sdk up local --namespace myproject +* enable the admin-user add-on +``` +minishift addon enable admin-user +``` +* optionally, configure the VM ``` +minishift config set cpus 4 +minishift config set memory 8GB +minishift config set vm-driver virtualbox +``` +* start the instance +``` +minishift start +``` +> NOTE: this setup should be deprecated in favor of [OCP4 install](). -Your operator is now watching for the existence of an object that matches: GroupVersionKind(app.example.com/v1alpha1, Kind=App) +### Deploy the operator -Apply the provided CR.yaml to your cluster. This should trigger the default logic specified in the handler. +In dev mode, simply run your operator locally: +``` +make local +``` -```sh -$ kubectl create -f deploy/examples/app_v1alpha1_appservice_cr.yaml +### Deploy the CR for testing +Make sure minishift is running: +``` +make deploy-cr ``` ## Directory layout @@ -63,3 +66,11 @@ Please consult [the documentation](https://github.com/operator-framework/operato | deploy | Contains various YAML manifests for registering CRDs, setting up [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/), and deploying the operator as a Deployment.| | Gopkg.toml Gopkg.lock | The [dep](https://github.com/golang/dep) manifests that describe the external dependencies of this operator.| | vendor | The golang [Vendor](https://golang.org/cmd/go/#hdr-Vendor_Directories) folder that contains the local copies of the external dependencies that satisfy the imports of this project. [dep](https://github.com/golang/dep) manages the vendor directly.| + + + +[dep_tool]:https://golang.github.io/dep/docs/installation.html +[git_tool]:https://git-scm.com/downloads +[go_tool]:https://golang.org/dl/ +[docker_tool]:https://docs.docker.com/install/ +[kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/ \ No newline at end of file diff --git a/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml b/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml index 70b3baf..69d6223 100644 --- a/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml +++ b/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml @@ -10,8 +10,12 @@ spec: group: clusterregistry.k8s.io names: kind: Cluster + listKind: ClusterList plural: clusters + singular: cluster scope: Namespaced + subresources: + status: {} validation: openAPIV3Schema: properties: @@ -80,9 +84,13 @@ spec: type: type: string required: - - type - - status + - type + - status type: object type: array type: object version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/crds/components_v1alpha1_component_cr.yaml b/deploy/crds/components_v1alpha1_component_cr.yaml new file mode 100644 index 0000000..346386a --- /dev/null +++ b/deploy/crds/components_v1alpha1_component_cr.yaml @@ -0,0 +1,7 @@ +apiVersion: components.devopsconsole.openshift.io/v1alpha1 +kind: Component +metadata: + name: example-component +spec: + # Add fields here + size: 3 diff --git a/deploy/crds/components_v1alpha1_component_crd.yaml b/deploy/crds/components_v1alpha1_component_crd.yaml new file mode 100644 index 0000000..a857dcc --- /dev/null +++ b/deploy/crds/components_v1alpha1_component_crd.yaml @@ -0,0 +1,33 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: components.components.devopsconsole.openshift.io +spec: + group: components.devopsconsole.openshift.io + names: + kind: Component + listKind: ComponentList + plural: components + singular: component + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + status: + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml b/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml index e3fd875..4049581 100644 --- a/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml +++ b/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml @@ -1,6 +1,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: + creationTimestamp: null name: envdeployments.devopsconsole.openshift.io spec: group: devopsconsole.openshift.io @@ -9,37 +10,11 @@ spec: listKind: EnvDeploymentList plural: envdeployments singular: envdeployment - shortNames: - - envdeploy scope: Namespaced - validation: - # openAPIV3Schema is the schema for validating custom objects. - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - environmentRef: - type: object - properties: - kind: - type: string - name: - type: string - apiGroup: - type: string - deploymentRef: - type: object - properties: - kind: - type: string - name: - type: string - apiGroup: - type: string - version: v1alpha1 \ No newline at end of file + subresources: + status: {} + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml b/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml index 362a6fb..ddcb094 100644 --- a/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml +++ b/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml @@ -1,6 +1,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: + creationTimestamp: null name: environments.devopsconsole.openshift.io spec: group: devopsconsole.openshift.io @@ -9,34 +10,11 @@ spec: listKind: EnvironmentList plural: environments singular: environment - shortNames: - - env scope: Namespaced - validation: - # openAPIV3Schema is the schema for validating custom objects. - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - type: - type: string - enum: - - 'deploy' - namespace: - type: string - clusterRef: - type: object - properties: - kind: - type: string - name: - type: string - apiGroup: - type: string - version: v1alpha1 \ No newline at end of file + subresources: + status: {} + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/role.yaml b/deploy/role.yaml index bbdf76a..a73468f 100644 --- a/deploy/role.yaml +++ b/deploy/role.yaml @@ -45,3 +45,9 @@ rules: - '*' verbs: - '*' +- apiGroups: + - components.devopsconsole.openshift.io + resources: + - '*' + verbs: + - '*' diff --git a/pkg/apis/addtoscheme_components_v1alpha1.go b/pkg/apis/addtoscheme_components_v1alpha1.go new file mode 100644 index 0000000..c593c30 --- /dev/null +++ b/pkg/apis/addtoscheme_components_v1alpha1.go @@ -0,0 +1,10 @@ +package apis + +import ( + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1" +) + +func init() { + // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back + AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) +} diff --git a/pkg/apis/components/v1alpha1/component_types.go b/pkg/apis/components/v1alpha1/component_types.go new file mode 100644 index 0000000..b90c46c --- /dev/null +++ b/pkg/apis/components/v1alpha1/component_types.go @@ -0,0 +1,49 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// ComponentSpec defines the desired state of Component +// +k8s:openapi-gen=true +type ComponentSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file + // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html +} + +// ComponentStatus defines the observed state of Component +// +k8s:openapi-gen=true +type ComponentStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file + // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Component is the Schema for the components API +// +k8s:openapi-gen=true +type Component struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ComponentSpec `json:"spec,omitempty"` + Status ComponentStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ComponentList contains a list of Component +type ComponentList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Component `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Component{}, &ComponentList{}) +} diff --git a/pkg/apis/components/v1alpha1/doc.go b/pkg/apis/components/v1alpha1/doc.go new file mode 100644 index 0000000..cebe39b --- /dev/null +++ b/pkg/apis/components/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Package v1alpha1 contains API Schema definitions for the components v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=components.devopsconsole.openshift.io +package v1alpha1 diff --git a/pkg/apis/components/v1alpha1/register.go b/pkg/apis/components/v1alpha1/register.go new file mode 100644 index 0000000..3faa9cc --- /dev/null +++ b/pkg/apis/components/v1alpha1/register.go @@ -0,0 +1,19 @@ +// NOTE: Boilerplate only. Ignore this file. + +// Package v1alpha1 contains API Schema definitions for the components v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=components.devopsconsole.openshift.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" +) + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: "components.devopsconsole.openshift.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} +) diff --git a/pkg/apis/components/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/components/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..fda0e08 --- /dev/null +++ b/pkg/apis/components/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,118 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Component) DeepCopyInto(out *Component) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component. +func (in *Component) DeepCopy() *Component { + if in == nil { + return nil + } + out := new(Component) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Component) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentList) DeepCopyInto(out *ComponentList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Component, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentList. +func (in *ComponentList) DeepCopy() *ComponentList { + if in == nil { + return nil + } + out := new(ComponentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ComponentList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec. +func (in *ComponentSpec) DeepCopy() *ComponentSpec { + if in == nil { + return nil + } + out := new(ComponentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus. +func (in *ComponentStatus) DeepCopy() *ComponentStatus { + if in == nil { + return nil + } + out := new(ComponentStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/apis/components/v1alpha1/zz_generated.defaults.go b/pkg/apis/components/v1alpha1/zz_generated.defaults.go new file mode 100644 index 0000000..dd621a3 --- /dev/null +++ b/pkg/apis/components/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/pkg/apis/components/v1alpha1/zz_generated.openapi.go b/pkg/apis/components/v1alpha1/zz_generated.openapi.go new file mode 100644 index 0000000..02a9dc1 --- /dev/null +++ b/pkg/apis/components/v1alpha1/zz_generated.openapi.go @@ -0,0 +1,90 @@ +// +build !ignore_autogenerated + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v1alpha1 + +import ( + spec "github.com/go-openapi/spec" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.Component": schema_pkg_apis_components_v1alpha1_Component(ref), + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentSpec": schema_pkg_apis_components_v1alpha1_ComponentSpec(ref), + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentStatus": schema_pkg_apis_components_v1alpha1_ComponentStatus(ref), + } +} + +func schema_pkg_apis_components_v1alpha1_Component(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Component is the Schema for the components API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentSpec", "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_components_v1alpha1_ComponentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ComponentSpec defines the desired state of Component", + Type: []string{"object"}, + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + } +} + +func schema_pkg_apis_components_v1alpha1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ComponentStatus defines the observed state of Component", + Type: []string{"object"}, + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + } +} diff --git a/pkg/controller/add_component.go b/pkg/controller/add_component.go new file mode 100644 index 0000000..72d4676 --- /dev/null +++ b/pkg/controller/add_component.go @@ -0,0 +1,10 @@ +package controller + +import ( + "github.com/redhat-developer/devopsconsole-operator/pkg/controller/component" +) + +func init() { + // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. + AddToManagerFuncs = append(AddToManagerFuncs, component.Add) +} diff --git a/pkg/controller/component/component_controller.go b/pkg/controller/component/component_controller.go new file mode 100644 index 0000000..e8826b6 --- /dev/null +++ b/pkg/controller/component/component_controller.go @@ -0,0 +1,91 @@ +package component + +import ( + "context" + "fmt" + "strconv" + + componentsv1alpha1 "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller" + "sigs.k8s.io/controller-runtime/pkg/handler" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + "sigs.k8s.io/controller-runtime/pkg/source" +) + +var log = logf.Log.WithName("controller_component") + +// Add creates a new Component Controller and adds it to the Manager. The Manager will set fields on the Controller +// and Start it when the Manager is Started. +func Add(mgr manager.Manager) error { + return add(mgr, newReconciler(mgr)) +} + +// newReconciler returns a new reconcile.Reconciler +func newReconciler(mgr manager.Manager) reconcile.Reconciler { + return &ReconcileComponent{client: mgr.GetClient(), scheme: mgr.GetScheme()} +} + +// add adds a new Controller to mgr with r as the reconcile.Reconciler +func add(mgr manager.Manager, r reconcile.Reconciler) error { + // Create a new controller + c, err := controller.New("component-controller", mgr, controller.Options{Reconciler: r}) + if err != nil { + return err + } + + // Watch for changes to primary resource Component + err = c.Watch(&source.Kind{Type: &componentsv1alpha1.Component{}}, &handler.EnqueueRequestForObject{}) + if err != nil { + return err + } + + return nil +} + +var _ reconcile.Reconciler = &ReconcileComponent{} + +// ReconcileComponent reconciles a Component object +type ReconcileComponent struct { + // This client, initialized using mgr.Client() above, is a split client + // that reads objects from the cache and writes to the apiserver + client client.Client + scheme *runtime.Scheme +} + +// Reconcile reads that state of the cluster for a Component object and makes changes based on the state read +// and what is in the Component.Spec +func (r *ReconcileComponent) Reconcile(request reconcile.Request) (reconcile.Result, error) { + reqLogger := log.WithValues("Request.Namespace", request.Namespace, "Request.Name", request.Name) + reqLogger.Info("Reconciling Component") + + // Fetch the Component instance + instance := &componentsv1alpha1.Component{} + err := r.client.Get(context.TODO(), request.NamespacedName, instance) + if err != nil { + if errors.IsNotFound(err) { + // Request object not found, could have been deleted after reconcile request. + // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. + // Return and don't requeue + return reconcile.Result{}, nil + } + // Error reading the object - requeue the request. + return reconcile.Result{}, err + } + + log.Info("============================================================") + log.Info(fmt.Sprintf("***** Reconciling Component %s, namespace %s", request.Name, request.Namespace)) + log.Info(fmt.Sprintf("** Creation time : %s", instance.ObjectMeta.CreationTimestamp)) + log.Info(fmt.Sprintf("** Resource version : %s", instance.ObjectMeta.ResourceVersion)) + log.Info(fmt.Sprintf("** Generation version : %s", strconv.FormatInt(instance.ObjectMeta.Generation, 10))) + log.Info(fmt.Sprintf("** Deletion time : %s", instance.ObjectMeta.DeletionTimestamp)) + log.Info("============================================================") + + return reconcile.Result{}, nil +} + From c01474efe1818b75c34e7143a4b97a7d589f2c74 Mon Sep 17 00:00:00 2001 From: Corinne Krych Date: Mon, 4 Mar 2019 10:47:47 +0100 Subject: [PATCH 57/62] move template directory under pkg folder --- assets.go => pkg/util/template/assets.go | 0 assets_vfsdata.go => pkg/util/template/assets_vfsdata.go | 0 doc.go => pkg/util/template/doc.go | 0 template.go => pkg/util/template/template.go | 0 {tmpl => pkg/util/template/tmpl}/innerloop/deployment | 0 {tmpl => pkg/util/template/tmpl}/innerloop/deploymentconfig | 0 {tmpl => pkg/util/template/tmpl}/innerloop/imagestream | 0 {tmpl => pkg/util/template/tmpl}/innerloop/ingress | 0 {tmpl => pkg/util/template/tmpl}/innerloop/pvc | 0 {tmpl => pkg/util/template/tmpl}/innerloop/route | 0 {tmpl => pkg/util/template/tmpl}/innerloop/service | 0 {tmpl => pkg/util/template/tmpl}/outerloop/buildconfig | 0 {tmpl => pkg/util/template/tmpl}/outerloop/deploymentconfig | 0 {tmpl => pkg/util/template/tmpl}/outerloop/imagestream | 0 {tmpl => pkg/util/template/tmpl}/servicecatalog/servicebinding | 0 {tmpl => pkg/util/template/tmpl}/servicecatalog/serviceinstance | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename assets.go => pkg/util/template/assets.go (100%) rename assets_vfsdata.go => pkg/util/template/assets_vfsdata.go (100%) rename doc.go => pkg/util/template/doc.go (100%) rename template.go => pkg/util/template/template.go (100%) rename {tmpl => pkg/util/template/tmpl}/innerloop/deployment (100%) rename {tmpl => pkg/util/template/tmpl}/innerloop/deploymentconfig (100%) rename {tmpl => pkg/util/template/tmpl}/innerloop/imagestream (100%) rename {tmpl => pkg/util/template/tmpl}/innerloop/ingress (100%) rename {tmpl => pkg/util/template/tmpl}/innerloop/pvc (100%) rename {tmpl => pkg/util/template/tmpl}/innerloop/route (100%) rename {tmpl => pkg/util/template/tmpl}/innerloop/service (100%) rename {tmpl => pkg/util/template/tmpl}/outerloop/buildconfig (100%) rename {tmpl => pkg/util/template/tmpl}/outerloop/deploymentconfig (100%) rename {tmpl => pkg/util/template/tmpl}/outerloop/imagestream (100%) rename {tmpl => pkg/util/template/tmpl}/servicecatalog/servicebinding (100%) rename {tmpl => pkg/util/template/tmpl}/servicecatalog/serviceinstance (100%) diff --git a/assets.go b/pkg/util/template/assets.go similarity index 100% rename from assets.go rename to pkg/util/template/assets.go diff --git a/assets_vfsdata.go b/pkg/util/template/assets_vfsdata.go similarity index 100% rename from assets_vfsdata.go rename to pkg/util/template/assets_vfsdata.go diff --git a/doc.go b/pkg/util/template/doc.go similarity index 100% rename from doc.go rename to pkg/util/template/doc.go diff --git a/template.go b/pkg/util/template/template.go similarity index 100% rename from template.go rename to pkg/util/template/template.go diff --git a/tmpl/innerloop/deployment b/pkg/util/template/tmpl/innerloop/deployment similarity index 100% rename from tmpl/innerloop/deployment rename to pkg/util/template/tmpl/innerloop/deployment diff --git a/tmpl/innerloop/deploymentconfig b/pkg/util/template/tmpl/innerloop/deploymentconfig similarity index 100% rename from tmpl/innerloop/deploymentconfig rename to pkg/util/template/tmpl/innerloop/deploymentconfig diff --git a/tmpl/innerloop/imagestream b/pkg/util/template/tmpl/innerloop/imagestream similarity index 100% rename from tmpl/innerloop/imagestream rename to pkg/util/template/tmpl/innerloop/imagestream diff --git a/tmpl/innerloop/ingress b/pkg/util/template/tmpl/innerloop/ingress similarity index 100% rename from tmpl/innerloop/ingress rename to pkg/util/template/tmpl/innerloop/ingress diff --git a/tmpl/innerloop/pvc b/pkg/util/template/tmpl/innerloop/pvc similarity index 100% rename from tmpl/innerloop/pvc rename to pkg/util/template/tmpl/innerloop/pvc diff --git a/tmpl/innerloop/route b/pkg/util/template/tmpl/innerloop/route similarity index 100% rename from tmpl/innerloop/route rename to pkg/util/template/tmpl/innerloop/route diff --git a/tmpl/innerloop/service b/pkg/util/template/tmpl/innerloop/service similarity index 100% rename from tmpl/innerloop/service rename to pkg/util/template/tmpl/innerloop/service diff --git a/tmpl/outerloop/buildconfig b/pkg/util/template/tmpl/outerloop/buildconfig similarity index 100% rename from tmpl/outerloop/buildconfig rename to pkg/util/template/tmpl/outerloop/buildconfig diff --git a/tmpl/outerloop/deploymentconfig b/pkg/util/template/tmpl/outerloop/deploymentconfig similarity index 100% rename from tmpl/outerloop/deploymentconfig rename to pkg/util/template/tmpl/outerloop/deploymentconfig diff --git a/tmpl/outerloop/imagestream b/pkg/util/template/tmpl/outerloop/imagestream similarity index 100% rename from tmpl/outerloop/imagestream rename to pkg/util/template/tmpl/outerloop/imagestream diff --git a/tmpl/servicecatalog/servicebinding b/pkg/util/template/tmpl/servicecatalog/servicebinding similarity index 100% rename from tmpl/servicecatalog/servicebinding rename to pkg/util/template/tmpl/servicecatalog/servicebinding diff --git a/tmpl/servicecatalog/serviceinstance b/pkg/util/template/tmpl/servicecatalog/serviceinstance similarity index 100% rename from tmpl/servicecatalog/serviceinstance rename to pkg/util/template/tmpl/servicecatalog/serviceinstance From 549476e9ef26eefaaaeaaf5d34606a9223db6c6c Mon Sep 17 00:00:00 2001 From: Shoubhik Bose Date: Wed, 20 Feb 2019 14:54:58 -0500 Subject: [PATCH 58/62] Update CRD templates to use new operator name. (#5) Use devopsconsole.openshift.io/v1alpha1 --- ...psconsole_v1alpha1_envdeployment_crd.yaml} | 2 +- ...vopsconsole_v1alpha1_environment_crd.yaml} | 2 +- .../v1alpha1/zz_generated.defaults.go | 32 ++++++ .../v1alpha1/zz_generated.openapi.go | 15 +++ .../v1alpha1/zz_generated.defaults.go | 32 ++++++ .../v1alpha1/zz_generated.openapi.go | 107 ++++++++++++++++++ 6 files changed, 188 insertions(+), 2 deletions(-) rename deploy/crds/{devconsole_v1alpha1_envdeployment_crd.yaml => devopsconsole_v1alpha1_envdeployment_crd.yaml} (98%) rename deploy/crds/{devconsole_v1alpha1_environment_crd.yaml => devopsconsole_v1alpha1_environment_crd.yaml} (98%) create mode 100644 pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go create mode 100644 pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go create mode 100644 pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.defaults.go create mode 100644 pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.openapi.go diff --git a/deploy/crds/devconsole_v1alpha1_envdeployment_crd.yaml b/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml similarity index 98% rename from deploy/crds/devconsole_v1alpha1_envdeployment_crd.yaml rename to deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml index 48ee6d6..e3fd875 100644 --- a/deploy/crds/devconsole_v1alpha1_envdeployment_crd.yaml +++ b/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml @@ -42,4 +42,4 @@ spec: type: string apiGroup: type: string - version: v1alpha1 + version: v1alpha1 \ No newline at end of file diff --git a/deploy/crds/devconsole_v1alpha1_environment_crd.yaml b/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml similarity index 98% rename from deploy/crds/devconsole_v1alpha1_environment_crd.yaml rename to deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml index e9482e5..362a6fb 100644 --- a/deploy/crds/devconsole_v1alpha1_environment_crd.yaml +++ b/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml @@ -39,4 +39,4 @@ spec: type: string apiGroup: type: string - version: v1alpha1 + version: v1alpha1 \ No newline at end of file diff --git a/pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go b/pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go new file mode 100644 index 0000000..dd621a3 --- /dev/null +++ b/pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go b/pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go new file mode 100644 index 0000000..d573a7e --- /dev/null +++ b/pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go @@ -0,0 +1,15 @@ +// +build !ignore_autogenerated + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v1alpha1 + +import ( + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{} +} diff --git a/pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.defaults.go b/pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.defaults.go new file mode 100644 index 0000000..dd621a3 --- /dev/null +++ b/pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.openapi.go b/pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.openapi.go new file mode 100644 index 0000000..b03064f --- /dev/null +++ b/pkg/apis/devopsconsole-operator/v1alpha1/zz_generated.openapi.go @@ -0,0 +1,107 @@ +// +build !ignore_autogenerated + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v1alpha1 + +import ( + spec "github.com/go-openapi/spec" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvDeployment": schema_pkg_apis_devopsconsole_operator_v1alpha1_EnvDeployment(ref), + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.Environment": schema_pkg_apis_devopsconsole_operator_v1alpha1_Environment(ref), + } +} + +func schema_pkg_apis_devopsconsole_operator_v1alpha1_EnvDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EnvDeployment is the Schema for the envdeployments API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvDeploymentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvDeploymentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvDeploymentSpec", "github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvDeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_devopsconsole_operator_v1alpha1_Environment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Environment is the Schema for the environments API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvironmentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvironmentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvironmentSpec", "github.com/redhat-developer/devopsconsole-operator/pkg/apis/devopsconsole-operator/v1alpha1.EnvironmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} From a69ee1b107ffa39965cabc33677c358e60bec97e Mon Sep 17 00:00:00 2001 From: Michael Kleinhenz Date: Thu, 28 Feb 2019 17:42:44 +0100 Subject: [PATCH 59/62] Makefile setup, test stubs (#3) * Added stub tests and makefile setup. * Exposed more targets, removed windows make code, checked coverage, minor fixes. --- .gitignore | 97 ++--- Dockerfile.builder | 37 ++ Dockerfile.deploy | 18 + Dockerfile.deploy.rhel | 19 + Dockerfile.dev | 7 + Gopkg.lock | 109 ++++++ Gopkg.toml | 8 + Makefile | 272 ++++++++++++++ cmd/manager/main.go | 14 +- deploy/test/global-manifests.yaml | 38 ++ deploy/test/namespace-manifests.yaml | 99 +++++ make/Makefile.dev | 87 +++++ make/docker.mk | 108 ++++++ make/gofmt_exclude | 1 + make/test.mk | 347 ++++++++++++++++++ .../envdeployment_controller_test.go | 16 + test/README.md | 25 ++ test/e2e/example_test.go | 26 ++ test/e2e/main_test.go | 11 + 19 files changed, 1268 insertions(+), 71 deletions(-) create mode 100644 Dockerfile.builder create mode 100644 Dockerfile.deploy create mode 100644 Dockerfile.deploy.rhel create mode 100644 Dockerfile.dev create mode 100644 Makefile create mode 100644 deploy/test/global-manifests.yaml create mode 100644 deploy/test/namespace-manifests.yaml create mode 100644 make/Makefile.dev create mode 100644 make/docker.mk create mode 100644 make/gofmt_exclude create mode 100644 make/test.mk create mode 100644 pkg/controller/envdeployment/envdeployment_controller_test.go create mode 100644 test/README.md create mode 100644 test/e2e/example_test.go create mode 100644 test/e2e/main_test.go diff --git a/.gitignore b/.gitignore index 39bfe06..979c7cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,55 +1,10 @@ -# Temporary Build Files -build/_output -build/_test -# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode -### Emacs ### -# -*- mode: gitignore; -*- -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* -# Org-mode -.org-id-locations -*_archive -# flymake-mode -*_flymake.* -# eshell files -/eshell/history -/eshell/lastdir -# elpa packages -/elpa/ -# reftex files -*.rel -# AUCTeX auto folder -/auto/ -# cask packages -.cask/ -dist/ -# Flycheck -flycheck_*.el -# server auth directory -/server/ -# projectiles files -.projectile -projectile-bookmarks.eld -# directory configuration -.dir-locals.el -# saveplace -places -# url cache -url/cache/ -# cedet -ede-projects.el -# smex -smex-items -# company-statistics -company-statistics-cache.el -# anaconda-mode -anaconda-mode/ +### IntelliJ ### +.idea/ +*.iws +*.iml +/out/ +.idea_modules/ + ### Go ### # Binaries for programs and plugins *.exe @@ -57,26 +12,30 @@ anaconda-mode/ *.dll *.so *.dylib -# Test binary, build with 'go test -c' + +# Test binary, built with `go test -c` *.test + # Output of the go coverage tool, specifically when used with LiteIDE *.out -### Vim ### -# swap -.sw[a-p] -.*.sw[a-p] -# session -Session.vim -# temporary -.netrwhist -# auto-generated tag files -tags + +### Go Patch ### +/vendor/ +/Godeps/ + ### VisualStudioCode ### .vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### VisualStudioCode Patch ### +# Ignore all local history of files .history -# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode -### IDEA ### -.idea/* -### MISC ### -bin/* -vendor/* \ No newline at end of file + +# devconsole-operator binaries +bin/ +tmp/ + +# Generated assets diff --git a/Dockerfile.builder b/Dockerfile.builder new file mode 100644 index 0000000..05c72a3 --- /dev/null +++ b/Dockerfile.builder @@ -0,0 +1,37 @@ +FROM centos:7 +LABEL maintainer "Devtools " +LABEL author "Devtools " +ENV LANG=en_US.utf8 +ARG USE_GO_VERSION_FROM_WEBSITE=0 + +# Some packages might seem weird but they are required by the RVM installer. +RUN yum install epel-release -y \ + && yum --enablerepo=centosplus --enablerepo=epel install -y \ + findutils \ + git \ + $(test "$USE_GO_VERSION_FROM_WEBSITE" != 1 && echo "golang") \ + make \ + procps-ng \ + tar \ + wget \ + which \ + && yum clean all + +RUN if [[ "$USE_GO_VERSION_FROM_WEBSITE" = 1 ]]; then cd /tmp \ + && wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz \ + && echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.10.linux-amd64.tar.gz" > checksum \ + && sha256sum -c checksum \ + && tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz \ + && rm -f go1.10.linux-amd64.tar.gz; \ + fi +ENV PATH=$PATH:/usr/local/go/bin + +# Get dep for Go package management and make sure the directory has full rwz permissions for non-root users +ENV GOPATH /tmp/go +RUN mkdir -p $GOPATH/bin && chmod a+rwx $GOPATH +RUN cd $GOPATH/bin \ + curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o dep \ + echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep" > dep-linux-amd64.sha256 \ + sha256sum -c dep-linux-amd64.sha256 + +ENTRYPOINT ["/bin/bash"] diff --git a/Dockerfile.deploy b/Dockerfile.deploy new file mode 100644 index 0000000..a34ec95 --- /dev/null +++ b/Dockerfile.deploy @@ -0,0 +1,18 @@ +FROM centos:7 +LABEL maintainer "Devtools " +LABEL author "Devtools " +ENV LANG=en_US.utf8 +ENV INSTALL_PREFIX=/usr/local/devconsole-operator + +# Create a non-root user and a group with the same name: "devconsole-operator" +ENV F8_USER_NAME=devconsole-operator +RUN useradd --no-create-home -s /bin/bash ${F8_USER_NAME} + +COPY bin/devconsole-operator ${INSTALL_PREFIX}/bin/devconsole-operator + +# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user +USER ${F8_USER_NAME} + +WORKDIR ${INSTALL_PREFIX} + +ENTRYPOINT [ "bin/devconsole-operator" ] diff --git a/Dockerfile.deploy.rhel b/Dockerfile.deploy.rhel new file mode 100644 index 0000000..7dd5f4e --- /dev/null +++ b/Dockerfile.deploy.rhel @@ -0,0 +1,19 @@ +FROM quay.io/openshiftio/rhel-base-golang:latest + +LABEL maintainer "Devtools " +LABEL author "Devtools " +ENV LANG=en_US.utf8 +ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator + +# Create a non-root user and a group with the same name: "devconsole-operator" +ENV F8_USER_NAME=devconsole-operator +RUN useradd --no-create-home -s /bin/bash ${F8_USER_NAME} + +COPY bin/devconsole-operator ${F8_INSTALL_PREFIX}/bin/devconsole-operator + +# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user +USER ${F8_USER_NAME} + +WORKDIR ${F8_INSTALL_PREFIX} + +ENTRYPOINT [ "bin/devconsole-operator" ] diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..1d9db20 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,7 @@ +# TODO: change this to a sane base image +FROM quay.io/openshiftio/toolchain-operator:faab15e + +ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator + +COPY bin/devconsole-operator ${F8_INSTALL_PREFIX}/bin/devconsole-operator +RUN echo chmod +x ${F8_INSTALL_PREFIX}/bin/devconsole-operator \ No newline at end of file diff --git a/Gopkg.lock b/Gopkg.lock index b3fa14d..55e3346 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -9,6 +9,14 @@ revision = "28a4bc8c44b3acbcc482cff0cdf7de29a4688b61" version = "v0.35.1" +[[projects]] + digest = "1:75d2b55b13298745ec068057251d05d65bbae0a668201fe45ad6986551a55601" + name = "github.com/BurntSushi/toml" + packages = ["."] + pruneopts = "NT" + revision = "3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005" + version = "v0.3.1" + [[projects]] digest = "1:d8ebbd207f3d3266d4423ce4860c9f3794956306ded6c7ba312ecc69cdfbf04c" name = "github.com/PuerkitoBio/purell" @@ -100,6 +108,14 @@ revision = "1d29f06aebd59ccdf11ae04aa0334ded96e2d909" version = "v0.18.0" +[[projects]] + digest = "1:9059915429f7f3a5f18cfa6b7cab9a28721d7ac6db4079a62044aa229eb7f2a8" + name = "github.com/gobuffalo/envy" + packages = ["."] + pruneopts = "NT" + revision = "fa0dfdc10b5366ce365b7d9d1755a03e4e797bc5" + version = "v1.6.15" + [[projects]] digest = "1:932970e69f16e127aa0653b8263ae588cd127fa53273e19ba44332902c9826f2" name = "github.com/gogo/protobuf" @@ -207,6 +223,14 @@ revision = "7c29201646fa3de8506f701213473dd407f19646" version = "v0.3.7" +[[projects]] + digest = "1:f5b9328966ccea0970b1d15075698eff0ddb3e75889560aad2e9f76b289b536a" + name = "github.com/joho/godotenv" + packages = ["."] + pruneopts = "NT" + revision = "23d116af351c84513e1946b527c88823e476be13" + version = "v1.3.0" + [[projects]] digest = "1:1d39c063244ad17c4b18e8da1551163b6ffb52bd1640a49a8ec5c3b7bf4dbd5d" name = "github.com/json-iterator/go" @@ -215,6 +239,14 @@ revision = "1624edc4454b8682399def8740d46db5e4362ba4" version = "v1.1.5" +[[projects]] + digest = "1:4059c14e87a2de3a434430340521b5feece186c1469eff0834c29a63870de3ed" + name = "github.com/konsorten/go-windows-terminal-sequences" + packages = ["."] + pruneopts = "NT" + revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242" + version = "v1.0.1" + [[projects]] branch = "master" digest = "1:7d9fcac7f1228470c4ea0ee31cdfb662a758c44df691e39b3e76c11d3e12ba8f" @@ -227,6 +259,14 @@ pruneopts = "NT" revision = "60711f1a8329503b04e1c88535f419d0bb440bff" +[[projects]] + digest = "1:56dbf15e091bf7926cb33a57cb6bdfc658fc6d3498d2f76f10a97ce7856f1fde" + name = "github.com/markbates/inflect" + packages = ["."] + pruneopts = "NT" + revision = "24b83195037b3bc61fcda2d28b7b0518bce293b6" + version = "v1.0.4" + [[projects]] branch = "master" digest = "1:0e9bfc47ab9941ecc3344e580baca5deb4091177e84dd9773b48b38ec26b93d5" @@ -255,9 +295,14 @@ digest = "1:b186c2fcf87d05c5129ad0d89ea062853b0bdf6d6bca1ed4a22157962f2ad8dd" name = "github.com/operator-framework/operator-sdk" packages = [ + "internal/util/fileutil", + "internal/util/k8sutil", "pkg/k8sutil", "pkg/leader", "pkg/ready", + "pkg/scaffold", + "pkg/scaffold/input", + "pkg/test", "version", ] pruneopts = "NT" @@ -288,6 +333,45 @@ revision = "5f041e8faa004a95c88a202771f4cc3e991971e6" version = "v2.0.1" +[[projects]] + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + pruneopts = "NT" + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + digest = "1:fcef1ce61da6f8f6f115154fb0e0e5b159fe11656839ba1e6061372711c013ee" + name = "github.com/rogpeppe/go-internal" + packages = [ + "modfile", + "module", + "semver", + ] + pruneopts = "NT" + revision = "1cf9852c553c5b7da2d5a4a091129a7822fed0c9" + version = "v1.2.2" + +[[projects]] + digest = "1:1f84287a4ca2c8f729d8155ba4c45915f5854ebbd214e406070779753da68422" + name = "github.com/sirupsen/logrus" + packages = ["."] + pruneopts = "NT" + revision = "e1e72e9de974bd926e5c56f83753fba2df402ce5" + version = "v1.3.0" + +[[projects]] + digest = "1:1bc08ec221c4fb25e6f2c019b23fe989fb44573c696983d8e403a3b76cc378e1" + name = "github.com/spf13/afero" + packages = [ + ".", + "mem", + ] + pruneopts = "NT" + revision = "f4711e4db9e9a1d3887343acb72b2bbfc2f686f5" + version = "v1.2.1" + [[projects]] digest = "1:9d8420bbf131d1618bde6530af37c3799340d3762cc47210c1d9532a4c3a2779" name = "github.com/spf13/pflag" @@ -296,6 +380,17 @@ revision = "298182f68c66c05229eb03ac171abe6e309ee79a" version = "v1.0.3" +[[projects]] + digest = "1:8e8fc2cb42cfa0a18fda0c9c4034092faa7aac773da5efdde8828eb4b96c001d" + name = "github.com/stretchr/testify" + packages = [ + "assert", + "require", + ] + pruneopts = "NT" + revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" + version = "v1.3.0" + [[projects]] digest = "1:22f696cee54865fb8e9ff91df7b633f6b8f22037a8015253c6b6a71ca82219c7" name = "go.uber.org/atomic" @@ -501,6 +596,17 @@ pruneopts = "NT" revision = "2d6f90ab1293a1fb871cf149423ebb72aa7423aa" +[[projects]] + digest = "1:117a407949aaaad9f7fbe3da8d6c2055f2c223ac0cbebd39f47ff71899622a91" + name = "k8s.io/apiextensions-apiserver" + packages = [ + "pkg/apis/apiextensions", + "pkg/apis/apiextensions/v1beta1", + "pkg/client/clientset/clientset/scheme", + ] + pruneopts = "NT" + revision = "408db4a50408e2149acbd657bceb2480c13cb0a4" + [[projects]] digest = "1:b07bf863262aae765494d60f0d524483f211b29f9bb27d445a79c13af8676bf2" name = "k8s.io/apimachinery" @@ -556,6 +662,7 @@ name = "k8s.io/client-go" packages = [ "discovery", + "discovery/cached", "dynamic", "kubernetes", "kubernetes/scheme", @@ -738,7 +845,9 @@ "github.com/operator-framework/operator-sdk/pkg/k8sutil", "github.com/operator-framework/operator-sdk/pkg/leader", "github.com/operator-framework/operator-sdk/pkg/ready", + "github.com/operator-framework/operator-sdk/pkg/test", "github.com/operator-framework/operator-sdk/version", + "github.com/stretchr/testify/require", "k8s.io/api/core/v1", "k8s.io/apimachinery/pkg/api/errors", "k8s.io/apimachinery/pkg/apis/meta/v1", diff --git a/Gopkg.toml b/Gopkg.toml index cbc6a98..18679e3 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -52,3 +52,11 @@ required = [ [[prune.project]] name = "k8s.io/code-generator" non-go = false + +[[constraint]] + name = "github.com/stretchr/testify" + version = "1.3.0" + +[[constraint]] + branch = "master" + name = "github.com/wadey/gocovmerge" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..88b6652 --- /dev/null +++ b/Makefile @@ -0,0 +1,272 @@ +PROJECT_NAME=devopsconsole-operator +PACKAGE_NAME:=github.com/redhat-developer/$(PROJECT_NAME) +CUR_DIR=$(shell pwd) +TMP_PATH=$(CUR_DIR)/tmp +INSTALL_PREFIX=$(CUR_DIR)/bin +VENDOR_DIR=vendor +INCLUDE_DIR=make +SOURCE_DIR ?= . +SOURCES := $(shell find $(SOURCE_DIR) -path $(SOURCE_DIR)/vendor -prune -o -name '*.go' -print) + +BINARY_SERVER_BIN=$(INSTALL_PREFIX)/devconsole-operator +GO_BIN_NAME=go +GIT_BIN_NAME=git +DEP_BIN_NAME=dep +DOCKER_BIN_NAME=docker +UNAME_S=$(shell uname -s) +GOCOV_BIN=$(VENDOR_DIR)/github.com/axw/gocov/gocov/gocov +GOCOVMERGE_BIN=$(VENDOR_DIR)/github.com/wadey/gocovmerge/gocovmerge +GOCYCLO_DIR=$(VENDOR_DIR)/github.com/fzipp/gocyclo +GOCYCLO_BIN=$(GOCYCLO_DIR)/gocyclo +GOLANGCI_LINT_BIN_NAME:=golangci-lint + +# declares variable that are OS-sensitive +include ./$(INCLUDE_DIR)/test.mk +include ./$(INCLUDE_DIR)/Makefile.dev + +DOCKER_BIN := $(shell command -v $(DOCKER_BIN_NAME) 2> /dev/null) +include ./$(INCLUDE_DIR)/docker.mk + +# This is a fix for a non-existing user in passwd file when running in a docker +# container and trying to clone repos of dependencies +GIT_COMMITTER_NAME ?= "user" +GIT_COMMITTER_EMAIL ?= "user@example.com" +export GIT_COMMITTER_NAME +export GIT_COMMITTER_EMAIL + +COMMIT=$(shell git rev-parse HEAD 2>/dev/null) +GITUNTRACKEDCHANGES := $(shell git status --porcelain --untracked-files=no) +ifneq ($(GITUNTRACKEDCHANGES),) + COMMIT := $(COMMIT)-dirty +endif +BUILD_TIME=`date -u '+%Y-%m-%dT%H:%M:%SZ'` + +.DEFAULT_GOAL := help + +# Call this function with $(call log-info,"Your message") +define log-info = + @echo "INFO: $(1)" +endef + +# ------------------------------------------------------------------- +# Docker build +# ------------------------------------------------------------------- +BUILD_DIR = bin +REGISTRY_URI = quay.io +REGISTRY_NS = ${PROJECT_NAME} +REGISTRY_IMAGE = ${PROJECT_NAME} + +ifeq ($(TARGET),rhel) + REGISTRY_URL := ${REGISTRY_URI}/openshiftio/rhel-${REGISTRY_NS}-${REGISTRY_IMAGE} + DOCKERFILE := Dockerfile.rhel +else + REGISTRY_URL := ${REGISTRY_URI}/openshiftio/${REGISTRY_NS}-${REGISTRY_IMAGE} + DOCKERFILE := Dockerfile +endif + +$(BUILD_DIR): + mkdir $(BUILD_DIR) + +.PHONY: build-linux $(BUILD_DIR) +build-linux: makefiles prebuild-check deps ## Builds the Linux binary for the container image into bin/ folder + CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -v $(LDFLAGS) -o $(BUILD_DIR)/$(PROJECT_NAME) + +image: clean-artifacts build-linux + docker build -t $(REGISTRY_URL) \ + --build-arg BUILD_DIR=$(BUILD_DIR)\ + --build-arg PROJECT_NAME=$(PROJECT_NAME)\ + -f $(VENDOR_DIR)/github.com/fabric8-services/fabric8-common/makefile/$(DOCKERFILE) . + +# ------------------------------------------------------------------- +# help! +# ------------------------------------------------------------------- + +.PHONY: help +# Based on https://gist.github.com/rcmachado/af3db315e31383502660 +## Display this help text +help:/ + $(info Available targets) + $(info -----------------) + @awk '/^[a-zA-Z\-\_0-9]+:/ { \ + helpMessage = match(lastLine, /^## (.*)/); \ + helpCommand = substr($$1, 0, index($$1, ":")-1); \ + if (helpMessage) { \ + helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ + gsub(/##/, "\n ", helpMessage); \ + printf "%-35s - %s\n", helpCommand, helpMessage; \ + lastLine = "" \ + } \ + } \ + { hasComment = match(lastLine, /^## (.*)/); \ + if(hasComment) { \ + lastLine=lastLine$$0; \ + } \ + else { \ + lastLine = $$0 \ + } \ + }' $(MAKEFILE_LIST) +# ------------------------------------------------------------------- +# required tools +# ------------------------------------------------------------------- + +# Find all required tools: +GIT_BIN := $(shell command -v $(GIT_BIN_NAME) 2> /dev/null) +TMP_BIN_DIR := $(TMP_PATH)/bin +DEP_BIN := $(TMP_BIN_DIR)/$(DEP_BIN_NAME) +DEP_VERSION=v0.5.0 +GOLANGCI_LINT_VERSION=1.12 +GOLANGCI_LINT_BIN=$(TMP_BIN_DIR)/$(GOLANGCI_LINT_BIN_NAME) +GO_BIN := $(shell command -v $(GO_BIN_NAME) 2> /dev/null) + +$(INSTALL_PREFIX): + mkdir -p $(INSTALL_PREFIX) +$(TMP_PATH): + mkdir -p $(TMP_PATH) + +.PHONY: prebuild-check +prebuild-check: $(TMP_PATH) $(INSTALL_PREFIX) +# Check that all tools where found +ifndef GIT_BIN + $(error The "$(GIT_BIN_NAME)" executable could not be found in your PATH) +endif +ifndef DEP_BIN + $(error The "$(DEP_BIN_NAME)" executable could not be found in your PATH) +endif +ifndef GO_BIN + $(error The "$(GO_BIN_NAME)" executable could not be found in your PATH) +endif + +# ------------------------------------------------------------------- +# deps +# ------------------------------------------------------------------- + +.PHONY: deps +## Download build dependencies +deps: $(DEP_BIN) $(VENDOR_DIR) + +# install dep in a the tmp/bin dir of the repo +$(DEP_BIN): + @echo "Installing 'dep' $(DEP_VERSION) at '$(TMP_BIN_DIR)'..." + mkdir -p $(TMP_BIN_DIR) +ifeq ($(UNAME_S),Darwin) + @curl -L -s https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-darwin-amd64 -o $(DEP_BIN) + @cd $(TMP_BIN_DIR) && \ + curl -L -s https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-darwin-amd64.sha256 -o $(TMP_BIN_DIR)/dep-darwin-amd64.sha256 && \ + echo "1a7bdb0d6c31ecba8b3fd213a1170adf707657123e89dff234871af9e0498be2 dep" > dep-darwin-amd64.sha256 && \ + shasum -a 256 --check dep-darwin-amd64.sha256 +else + @curl -L -s https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-linux-amd64 -o $(DEP_BIN) + @cd $(TMP_BIN_DIR) && \ + echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep" > dep-linux-amd64.sha256 && \ + sha256sum -c dep-linux-amd64.sha256 +endif + @chmod +x $(DEP_BIN) + +$(VENDOR_DIR): Gopkg.toml + @echo "checking dependencies with $(DEP_BIN_NAME)" + @$(DEP_BIN) ensure -v + +# ------------------------------------------------------------------- +# Code format/check +# ------------------------------------------------------------------- +GOFORMAT_FILES := $(shell find . -name '*.go' | grep -vEf $(INCLUDE_DIR)/gofmt_exclude) + +.PHONY: check-go-format +## Exits with an error if there are files that do not match formatting defined by gofmt +check-go-format: prebuild-check deps + @gofmt -s -l ${GOFORMAT_FILES} 2>&1 \ + | tee /tmp/gofmt-errors \ + | read \ + && echo "ERROR: These files differ from gofmt's style (run 'make format-go-code' to fix this):" \ + && cat /tmp/gofmt-errors \ + && exit 1 \ + || true + +.PHONY: analyze-go-code +## Run golangci analysis over the code +analyze-go-code: deps + $(info >>--- RESULTS: GOLANGCI CODE ANALYSIS ---<<) + @go get -u github.com/golangci/golangci-lint/cmd/golangci-lint + @golangci-lint run + +.PHONY: format-go-code +## Formats any go file that does not match formatting defined by gofmt +format-go-code: prebuild-check + @gofmt -s -l -w ${GOFORMAT_FILES} + +# ------------------------------------------------------------------- +# Code format/check with golangci-lint +# ------------------------------------------------------------------- +.PHONY: check-go-code +## Checks the code with golangci-lint +check-go-code: $(GOLANGCI_LINT_BIN) + @echo "checking code..." + $(GOLANGCI_LINT_BIN) run + +# install golangci-lint in the 'tmp/bin' dir of the repo +$(GOLANGCI_LINT_BIN): + @echo "Installing 'golang-ci-lint' $(GOLANGCI_LINT_VERSION) at '$(TMP_BIN_DIR)' ..." + mkdir -p $(TMP_BIN_DIR) +ifeq ($(UNAME_S),Darwin) + @curl -L -s https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_LINT_VERSION)/golangci-lint-$(GOLANGCI_LINT_VERSION)-darwin-amd64.tar.gz -o $(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VERSION)-darwin-amd64.tar.gz && \ + cd $(TMP_BIN_DIR) && curl -L -s https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_LINT_VERSION)/golangci-lint-$(GOLANGCI_LINT_VERSION)-checksums.txt -o golangci-lint-$(GOLANGCI_LINT_VERSION)-checksums.txt && \ + grep "darwin-amd64" golangci-lint-$(GOLANGCI_LINT_VERSION)-checksums.txt > golangci-lint-$(GOLANGCI_LINT_VERSION)-checksum-darwin-amd64.txt && \ + shasum -a 256 --check golangci-lint-$(GOLANGCI_LINT_VERSION)-checksum-darwin-amd64.txt && \ + tar xvf $(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VERSION)-darwin-amd64.tar.gz -C $(TMP_BIN_DIR) && \ + mv $(TMP_BIN_DIR)/golangci-lint-$(GOLANGCI_LINT_VERSION)-darwin-amd64/golangci-lint $(GOLANGCI_LINT_BIN) +else + @curl -L -s https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_LINT_VERSION)/golangci-lint-$(GOLANGCI_LINT_VERSION)-linux-amd64.tar.gz -o $(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VERSION)-linux-amd64.tar.gz && \ + cd $(TMP_BIN_DIR) && curl -L -s https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_LINT_VERSION)/golangci-lint-$(GOLANGCI_LINT_VERSION)-checksums.txt -o golangci-lint-$(GOLANGCI_LINT_VERSION)-checksums.txt && \ + grep "linux-amd64" golangci-lint-$(GOLANGCI_LINT_VERSION)-checksums.txt > golangci-lint-$(GOLANGCI_LINT_VERSION)-checksum-linux-amd64.txt && \ + sha256sum -c golangci-lint-$(GOLANGCI_LINT_VERSION)-checksum-linux-amd64.txt && \ + tar xvf $(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VERSION)-linux-amd64.tar.gz -C $(TMP_BIN_DIR) && \ + mv $(TMP_BIN_DIR)/golangci-lint-$(GOLANGCI_LINT_VERSION)-linux-amd64/golangci-lint $(GOLANGCI_LINT_BIN) +endif + @chmod +x $(GOLANGCI_LINT_BIN) + + +# ------------------------------------------------------------------- +# clean +# ------------------------------------------------------------------- + +# For the global "clean" target all targets in this variable will be executed +CLEAN_TARGETS = + +CLEAN_TARGETS += clean-artifacts +.PHONY: clean-artifacts +# Removes the ./bin directory. +clean-artifacts: + -rm -rf $(INSTALL_PREFIX) + +CLEAN_TARGETS += clean-object-files +.PHONY: clean-object-files +# Runs go clean to remove any executables or other object files. +clean-object-files: + go clean ./... + +CLEAN_TARGETS += clean-vendor +.PHONY: clean-vendor +# Removes the ./vendor directory. +clean-vendor: + -rm -rf $(VENDOR_DIR) + +CLEAN_TARGETS += clean-tmp +.PHONY: clean-tmp +# Removes the ./vendor directory. +clean-tmp: + -rm -rf $(TMP_PATH) + +# Keep this "clean" target here after all `clean-*` sub tasks +.PHONY: clean +## Cleans the project, removes all generated code/bins and vendor packages +clean: $(CLEAN_TARGETS) + +# ------------------------------------------------------------------- +# build the binary executable (to ship in prod) +# ------------------------------------------------------------------- + +.PHONY: build +## Build the operator +build: prebuild-check deps + @echo "building $(BINARY_SERVER_BIN)..." + go build -v -o $(BINARY_SERVER_BIN) cmd/manager/main.go diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 0ddb594..f43d103 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -53,7 +53,11 @@ func main() { } // Become the leader before proceeding - leader.Become(context.TODO(), "devopsconsole-operator-lock") + err = leader.Become(context.TODO(), "devopsconsole-operator-lock") + if err != nil { + log.Error(err, "") + os.Exit(1) + } r := ready.NewFileReady() err = r.Set() @@ -61,7 +65,13 @@ func main() { log.Error(err, "") os.Exit(1) } - defer r.Unset() + defer func() { + err := r.Unset() + if err != nil { + log.Error(err, "") + os.Exit(1) + } + }() // Create a new Cmd to provide shared dependencies and start components mgr, err := manager.New(cfg, manager.Options{Namespace: namespace}) diff --git a/deploy/test/global-manifests.yaml b/deploy/test/global-manifests.yaml new file mode 100644 index 0000000..27e4e03 --- /dev/null +++ b/deploy/test/global-manifests.yaml @@ -0,0 +1,38 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envdeployments.devconsole.openshift.io +spec: + group: devconsole.openshift.io + names: + kind: DevConsole + listKind: DevConsoleList + plural: envdeployments + singular: envdeployment + scope: Namespaced + version: v1alpha1 +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: devconsole +rules: +- apiGroups: + - codeready.io + resources: + - devconsole/finalizers + verbs: + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: devconsole +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: devconsole +subjects: +- kind: ServiceAccount + name: devconsole + namespace: devconsole-e2e-test \ No newline at end of file diff --git a/deploy/test/namespace-manifests.yaml b/deploy/test/namespace-manifests.yaml new file mode 100644 index 0000000..221e13d --- /dev/null +++ b/deploy/test/namespace-manifests.yaml @@ -0,0 +1,99 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: devconsole + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + creationTimestamp: null + name: devconsole +rules: +- apiGroups: + - "" + resources: + - pods + - services + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + verbs: + - '*' +- apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - '*' +- apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create +- apiGroups: + - devconsole.openshift.io + resources: + - '*' + - envdeployments + verbs: + - '*' +- apiGroups: + - clusterregistry.k8s.io + resources: + - '*' + verbs: + - '*' + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: devconsole +spec: + replicas: 1 + selector: + matchLabels: + name: devconsole + template: + metadata: + labels: + name: devconsole + spec: + serviceAccountName: devconsole + containers: + - name: devconsole + # Replace this with the built image name + image: REPLACE_IMAGE + ports: + - containerPort: 60000 + name: metrics + command: + - devconsole + imagePullPolicy: Always + readinessProbe: + exec: + command: + - stat + - /tmp/operator-sdk-ready + initialDelaySeconds: 4 + periodSeconds: 10 + failureThreshold: 1 + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: "devconsole" diff --git a/make/Makefile.dev b/make/Makefile.dev new file mode 100644 index 0000000..51e9731 --- /dev/null +++ b/make/Makefile.dev @@ -0,0 +1,87 @@ +DOCKER_REPO?=quay.io/openshiftio +IMAGE_NAME?=devconsole-operator +SHORT_COMMIT=$(shell git rev-parse --short HEAD) +ifneq ($(GITUNTRACKEDCHANGES),) +SHORT_COMMIT := $(SHORT_COMMIT)-dirty +endif + +TIMESTAMP:=$(shell date +%s) +TAG?=$(SHORT_COMMIT)-$(TIMESTAMP) + +DEPLOY_DIR:=deploy + +.PHONY: create-resources +create-resources: + @echo "Logging using system:admin..." + @oc login -u system:admin + @echo "Creating sub resources..." + @echo "Creating CRDs..." + @oc create -f $(DEPLOY_DIR)/crds/devconsole_v1alpha1_envdeployment_crd.yaml + @echo "Creating Namespace" + @oc create -f $(DEPLOY_DIR)/namespace.yaml + @echo "oc project codeready-devconsole" + @oc project codeready-devconsole + @echo "Creating Service Account" + @oc create -f $(DEPLOY_DIR)/service_account.yaml + @echo "Creating Role" + @oc create -f $(DEPLOY_DIR)/role.yaml + @echo "Creating RoleBinding" + @oc create -f $(DEPLOY_DIR)/role_binding.yaml + @echo "Creating Cluster Role" + @oc create -f $(DEPLOY_DIR)/cluster_role.yaml + @echo "Creating ClusterRoleBinding" + @oc create -f $(DEPLOY_DIR)/cluster_role_binding.yaml + +.PHONY: create-cr +create-cr: + @echo "Creating Custom Resource..." + @oc create -f $(DEPLOY_DIR)/crds/devconsole_v1alpha1_envdeployment_crd.yaml + +.PHONY: build-image +build-image: + docker build -t $(DOCKER_REPO)/$(IMAGE_NAME):$(TAG) -f Dockerfile.dev . + docker tag $(DOCKER_REPO)/$(IMAGE_NAME):$(TAG) $(DOCKER_REPO)/$(IMAGE_NAME):test + +.PHONY: deploy-operator-only +deploy-operator-only: + @echo "Creating Deployment for Operator" + @cat minishift/operator.yaml | sed s/\:dev/:$(TAG)/ | oc create -f - + +.PHONY: clean-all +clean-all: clean-operator clean-resources + +.PHONY: clean-operator +clean-operator: + @echo "Deleting Deployment for Operator" + @cat minishift/operator.yaml | sed s/\:dev/:$(TAG)/ | oc delete -f - || true + +.PHONY: clean-resources +clean-resources: + @echo "Deleting sub resources..." + @echo "Deleting RoleBinding" + @oc delete -f $(DEPLOY_DIR)/role_binding.yaml || true + @echo "Deleting ClusterRoleBinding" + @oc delete -f $(DEPLOY_DIR)/cluster_role_binding.yaml || true + @echo "Deleting Role" + @oc delete -f $(DEPLOY_DIR)/role.yaml || true + @echo "Deleting ClusterRole" + @oc delete -f $(DEPLOY_DIR)/cluster_role.yaml || true + @echo "Deleting Service Account" + @oc delete -f $(DEPLOY_DIR)/service_account.yaml || true + @echo "Deleting Custom Resources..." + @oc delete -f $(DEPLOY_DIR)/crds/devconsole_v1alpha1_envdeployment_crd.yaml|| true + @echo "Deleting Namespace" + @oc delete -f $(DEPLOY_DIR)/namespace.yaml || true + @echo "Deleting Custom Resource Definitions..." + @oc delete -f $(DEPLOY_DIR)/crds/devconsole_v1alpha1_envdeployment_crd.yaml || true + +.PHONY: deploy-operator +deploy-operator: build build-image deploy-operator-only + +.PHONY: minishift-start +minishift-start: + minishift start --cpus 4 --memory 8GB + -eval `minishift docker-env` && oc login -u system:admin + +.PHONY: deploy-all +deploy-all: clean-resources create-resources deps prebuild-check deploy-operator create-cr diff --git a/make/docker.mk b/make/docker.mk new file mode 100644 index 0000000..84e5322 --- /dev/null +++ b/make/docker.mk @@ -0,0 +1,108 @@ +DOCKER_IMAGE_CORE := $(PROJECT_NAME) +DOCKER_IMAGE_DEPLOY := $(PROJECT_NAME)-deploy + +ifeq ($(TARGET),rhel) + DOCKERFILE_DEPLOY := Dockerfile.deploy.rhel +else + DOCKERFILE_DEPLOY := Dockerfile.deploy +endif + +# If running in Jenkins we don't allow for interactively running the container +ifneq ($(BUILD_TAG),) + DOCKER_RUN_INTERACTIVE_SWITCH := +else + DOCKER_RUN_INTERACTIVE_SWITCH := -i +endif + +# The workspace environment is set by Jenkins and defaults to /tmp if not set +WORKSPACE ?= /tmp +DOCKER_BUILD_DIR := $(WORKSPACE)/$(PROJECT_NAME)-build + +# The BUILD_TAG environment variable will be set by jenkins +# to reflect jenkins-${JOB_NAME}-${BUILD_NUMBER} +BUILD_TAG ?= $(PROJECT_NAME)-local-build +DOCKER_CONTAINER_NAME := $(BUILD_TAG) + +# Where is the GOPATH inside the build container? +GOPATH_IN_CONTAINER=/tmp/go +PACKAGE_PATH=$(GOPATH_IN_CONTAINER)/src/$(PACKAGE_NAME) + +.PHONY: docker-image-builder +## Builds the docker image used to build the software +docker-image-builder: + @echo "Building docker image $(DOCKER_IMAGE_CORE)" + docker build --build-arg USE_GO_VERSION_FROM_WEBSITE=$(USE_GO_VERSION_FROM_WEBSITE) -t $(DOCKER_IMAGE_CORE) -f $(CUR_DIR)/Dockerfile.builder $(CUR_DIR) + +.PHONY: docker-image-deploy +## Creates a runnable image using the artifacts from the bin directory +docker-image-deploy: + docker build -t $(DOCKER_IMAGE_DEPLOY) -f $(CUR_DIR)/$(DOCKERFILE_DEPLOY) $(CUR_DIR) + +.PHONY: docker-build-dir +# Creates the docker build directory. +docker-build-dir: + @echo "Creating build directory $(BUILD_DIR)" + mkdir -p $(DOCKER_BUILD_DIR) + +CLEAN_TARGETS += clean-docker-build-container +.PHONY: clean-docker-build-container +# Removes any existing container used to build the software (if any). +clean-docker-build-container: + @echo "Removing container named \"$(DOCKER_CONTAINER_NAME)\" (if any)" +ifneq ($(strip $(shell docker ps -qa --filter "name=$(DOCKER_CONTAINER_NAME)" 2>/dev/null)),) + @docker rm -f $(DOCKER_CONTAINER_NAME) +else + @echo "No container named \"$(DOCKER_CONTAINER_NAME)\" to remove" +endif + +CLEAN_TARGETS += clean-docker-build-dir +.PHONY: clean-docker-build-dir +# Removes the docker build directory. +clean-docker-build-dir: + @echo "Cleaning build directory $(BUILD_DIR)" + -rm -rf $(DOCKER_BUILD_DIR) + +.PHONY: docker-start +## Starts the docker build container in the background (detached mode). +## After calling this command you can invoke all the make targets from the +## normal Makefile (e.g. deps, build) inside the build container +## by prefixing them with "docker-". For example to execute "make deps" +## inside the build container, just run "make docker-deps". +## To remove the container when no longer needed, call "make docker-rm". +docker-start: docker-build-dir docker-image-builder +ifneq ($(strip $(shell docker ps -qa --filter "name=$(DOCKER_CONTAINER_NAME)" 2>/dev/null)),) + @echo "Docker container \"$(DOCKER_CONTAINER_NAME)\" already exists. To recreate, run \"make docker-rm\"." +else + docker run \ + --detach=true \ + -t \ + $(DOCKER_RUN_INTERACTIVE_SWITCH) \ + --name="$(DOCKER_CONTAINER_NAME)" \ + -e ADMIN_POSTGRES_PORT=5432 \ + -v $(CUR_DIR):$(PACKAGE_PATH):Z \ + -u $(shell id -u $(USER)):$(shell id -g $(USER)) \ + -e GOPATH=$(GOPATH_IN_CONTAINER) \ + -w $(PACKAGE_PATH) \ + $(DOCKER_IMAGE_CORE) + @echo "Docker container \"$(DOCKER_CONTAINER_NAME)\" created. Continue with \"make docker-deps\"." +endif + +.PHONY: docker-rm +# Removes the docker build container, if any (see "make docker-start"). +docker-rm: +ifneq ($(strip $(shell docker ps -qa --filter "name=$(DOCKER_CONTAINER_NAME)" 2>/dev/null)),) + docker rm -f "$(DOCKER_CONTAINER_NAME)" +else + @echo "No container named \"$(DOCKER_CONTAINER_NAME)\" to remove." +endif + +# This is a wildcard target to let you call any make target from the normal makefile +# but it will run inside the docker container. This target will only get executed if +# there's no specialized form available. For example if you call "make docker-start" +# not this target gets executed but the "docker-start" target. +docker-%: + $(eval makecommand:=$(subst docker-,,$@)) +ifeq ($(strip $(shell docker ps -qa --filter "name=$(DOCKER_CONTAINER_NAME)" 2>/dev/null)),) + $(error No container name "$(DOCKER_CONTAINER_NAME)" exists to run the command "make $(makecommand)") +endif + docker exec -t $(DOCKER_RUN_INTERACTIVE_SWITCH) "$(DOCKER_CONTAINER_NAME)" bash -ec 'make $(makecommand)' diff --git a/make/gofmt_exclude b/make/gofmt_exclude new file mode 100644 index 0000000..6d03c3e --- /dev/null +++ b/make/gofmt_exclude @@ -0,0 +1 @@ +vendor/.* diff --git a/make/test.mk b/make/test.mk new file mode 100644 index 0000000..bd1fc5c --- /dev/null +++ b/make/test.mk @@ -0,0 +1,347 @@ +#=============================================================================== +# Testing has become a rather big and interconnected topic and that's why it +# has arrived in it's own file. +# +# We have to types of tests available: +# +# 1. unit tests +# +# The unit tests can be executed fairly simply be running `go test` +# +# Usage +# ----- +# If you want to run the unit tests, type +# +# $ make test-unit +# +# To run all tests, type +# +# $ make test-all +# +# To output unit-test coverage profile information for each function, type +# +# $ make coverage-unit +# +# To generate unit-test HTML representation of coverage profile (opens a browser), type +# +# $ make coverage-unit-html +# +# To output all coverage profile information for each function, type +# +# $ make coverage-all +# +# Artifacts and coverage modes +# ---------------------------- +# Each package generates coverage outputs under tmp/coverage/$(PACKAGE) where +# $(PACKAGE) resolves to the Go package. Here's an example of a coverage file +# for the package "github.com/fabric8-services/fabric8-auth/models" with coverage mode +# "set" generated by the unit tests: +# +# tmp/coverage/github.com/fabric8-services/fabric8-auth/models/coverage.unit.mode-set +# +# For unit-tests all results are combined into this file: +# +# tmp/coverage.unit.mode-$(COVERAGE_MODE) +# +# +# The overall coverage gets combined into this file: +# +# tmp/coverage.mode-$(COVERAGE_MODE) +# +# The $(COVERAGE_MODE) in each filename indicates what coverage mode was used. +# +# These are possible coverage modes (see https://blog.golang.org/cover): +# +# set: did each statement run? (default) +# count: how many times did each statement run? +# atomic: like count, but counts precisely in parallel programs +# +# To choose another coverage mode, simply prefix the invovation of `make`: +# +# $ COVERAGE_MODE=count make test-unit +#=============================================================================== + +# mode can be: set, count, or atomic +COVERAGE_MODE ?= set + +# By default no go test calls will use the -v switch when running tests. +# But if you want you can enable that by setting GO_TEST_VERBOSITY_FLAG=-v +GO_TEST_VERBOSITY_FLAG ?= + + +# By default reduce the amount of log output from tests +ADMIN_LOG_LEVEL ?= error + +# Output directory for coverage information +COV_DIR = $(TMP_PATH)/coverage + +# Files that combine package coverages for unit tests separately +COV_PATH_UNIT = $(TMP_PATH)/coverage.unit.mode-$(COVERAGE_MODE) + +# File that stores overall coverge for all packages and unit-tests +COV_PATH_OVERALL = $(TMP_PATH)/coverage.mode-$(COVERAGE_MODE) + +# This pattern excludes some folders from the coverage calculation (see grep -v) +ALL_PKGS_EXCLUDE_PATTERN = 'vendor\|app\|tool\/cli\|design\|client\|test' + +# This pattern excludes some folders from the go code analysis +GOANALYSIS_PKGS_EXCLUDE_PATTERN="vendor|app|client|tool/cli" +GOANALYSIS_DIRS=$(shell go list -f {{.Dir}} ./... | grep -v -E $(GOANALYSIS_PKGS_EXCLUDE_PATTERN)) + +#------------------------------------------------------------------------------- +# Normal test targets +# +# These test targets are the ones that will be invoked from the outside. If +# they are called and the artifacts already exist, then the artifacts will +# first be cleaned and recreated. This ensures that the tests are always +# executed. +#------------------------------------------------------------------------------- + +.PHONY: test-all +## Runs the unit tests and e2e tests +test-all: prebuild-check test-unit test-e2e + +# Runs the unit tests and produces coverage files for each package. +.PHONY: test-unit-with-coverage +test-unit-with-coverage: prebuild-check clean-coverage-unit $(COV_PATH_UNIT) + +.PHONY: test-unit +## Runs the unit tests without coverage +test-unit: prebuild-check $(SOURCES) + $(call log-info,"Running test: $@") + $(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN))) + ADMIN_LOG_LEVEL=$(ADMIN_LOG_LEVEL) go test -vet off $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES) + +.PHONY: test-e2e +## Runs the e2e tests without coverage +test-e2e: build build-image e2e-setup + $(call log-info,"Running E2E test: $@") + go test ./test/e2e/... -root=$(PWD) -kubeconfig=$(HOME)/.kube/config -globalMan deploy/test/global-manifests.yaml -namespacedMan deploy/test/namespace-manifests.yaml -v -parallel=1 -singleNamespace + +.PHONY: e2e-setup +e2e-setup: e2e-cleanup + oc new-project devconsole-e2e-test || true + +.PHONY: e2e-cleanup +e2e-cleanup: + oc login -u system:admin + oc delete project devconsole-e2e-test || true + +#------------------------------------------------------------------------------- +# Inspect coverage of unit tests, integration tests in either pure +# console mode or in a browser (*-html). +# +# If the test coverage files to be evaluated already exist, then no new +# tests are executed. If they don't exist, we first run the tests. +#------------------------------------------------------------------------------- + +# Prints the total coverage of a given package. +# The total coverage is printed as the last argument in the +# output of "go tool cover". If the requested test name (first argument) +# Is *, then unit, integration tests will be combined +define print-package-coverage +$(eval TEST_NAME:=$(1)) +$(eval PACKAGE_NAME:=$(2)) +$(eval COV_FILE:="$(COV_DIR)/$(PACKAGE_NAME)/coverage.$(TEST_NAME).mode-$(COVERAGE_MODE)") + @if [ "$(TEST_NAME)" == "*" ]; then \ + UNIT_FILE=`echo $(COV_FILE) | sed 's/*/unit/'`; \ + INTEGRATON_FILE=`echo $(COV_FILE) | sed 's/*/integration/'`; \ + COV_FILE=`echo $(COV_FILE) | sed 's/*/combined/'`; \ + if [ ! -e $${UNIT_FILE} ]; then \ + COV_FILE=$${INTEGRATION_FILE}; \ + else \ + if [ ! -e $${INTEGRATION_FILE} ]; then \ + COV_FILE=$${UNIT_FILE}; \ + else \ + $(GOCOVMERGE_BIN) $${UNIT_FILE} $${INTEGRATION_FILE} > $${COV_FILE}; \ + fi; \ + fi; \ +else \ + COV_FILE=$(COV_FILE); \ +fi; \ +if [ -e "$${COV_FILE}" ]; then \ + VAL=`go tool cover -func=$${COV_FILE} \ + | grep '^total:' \ + | grep '\S\+$$' -o \ + | sed 's/%//'`; \ + printf "%-80s %#5.2f%%\n" "$(PACKAGE_NAME)" "$${VAL}"; \ +else \ + printf "%-80s %6s\n" "$(PACKAGE_NAME)" "n/a"; \ +fi +endef + +# Iterates over every package and prints its test coverage +# for a given test name ("unit"). +define package-coverage +$(eval TEST_NAME:=$(1)) +@printf "\n\nPackage coverage:\n" +$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN))) +$(foreach package, $(TEST_PACKAGES), $(call print-package-coverage,$(TEST_NAME),$(package))) +endef + +$(COV_PATH_OVERALL): $(GOCOVMERGE_BIN) + @$(GOCOVMERGE_BIN) $(COV_PATH_UNIT) > $(COV_PATH_OVERALL) + +# Console coverage output: + +# First parameter: file to do in-place replacement with. +define cleanup-coverage-file +@sed -i '/.*\/sqlbindata\.go.*/d' $(1) +@sed -i '/.*\/confbindata\.go.*/d' $(1) +endef + +# Output coverage profile information for each function (only based on unit-tests). +# Re-runs unit-tests if coverage information is outdated. +.PHONY: coverage-unit +## Runs the unit tests with producing coverage files for each package +coverage-unit: prebuild-check $(COV_PATH_UNIT) + $(call cleanup-coverage-file,$(COV_PATH_UNIT)) + @go tool cover -func=$(COV_PATH_UNIT) + $(call package-coverage,unit) + + +.PHONY: coverage-all +# Output coverage profile information for each function. +# Re-runs unit- and integration-tests if coverage information is outdated. +coverage-all: prebuild-check clean-coverage-overall $(COV_PATH_OVERALL) + $(call cleanup-coverage-file,$(COV_PATH_OVERALL)) + @go tool cover -func=$(COV_PATH_OVERALL) + $(call package-coverage,*) + +# HTML coverage output: + +# Generate HTML representation (and show in browser) of coverage profile (based on unit tests). +# Re-runs unit tests if coverage information is outdated. +.PHONY: coverage-unit-html +## Runs the unit tests with producing coverage html for each package +coverage-unit-html: prebuild-check $(COV_PATH_UNIT) + $(call cleanup-coverage-file,$(COV_PATH_UNIT)) + @go tool cover -html=$(COV_PATH_UNIT) + +.PHONY: coverage-all-html +# Output coverage profile information for each function. +# Re-runs unit if coverage information is outdated. +coverage-all-html: prebuild-check clean-coverage-overall $(COV_PATH_OVERALL) + $(call cleanup-coverage-file,$(COV_PATH_OVERALL)) + @go tool cover -html=$(COV_PATH_OVERALL) + +# Experimental: + +.PHONY: gocov-unit-annotate +# (EXPERIMENTAL) Show actual code and how it is covered with unit tests. +# This target only runs the tests if the coverage file does exist. +gocov-unit-annotate: prebuild-check $(GOCOV_BIN) $(COV_PATH_UNIT) + $(call cleanup-coverage-file,$(COV_PATH_UNIT)) + @$(GOCOV_BIN) convert $(COV_PATH_UNIT) | $(GOCOV_BIN) annotate - + +.PHONY: .gocov-unit-report +.gocov-unit-report: prebuild-check $(GOCOV_BIN) $(COV_PATH_UNIT) + $(call cleanup-coverage-file,$(COV_PATH_UNIT)) + @$(GOCOV_BIN) convert $(COV_PATH_UNIT) | $(GOCOV_BIN) report + + +#------------------------------------------------------------------------------- +# Test artifacts are coverage files for unit and integration tests. +#------------------------------------------------------------------------------- + +# The test-package function executes tests for a package and saves the collected +# coverage output to a directory. After storing the coverage information it is +# also appended to a file of choice (without the "mode"-line) +# +# Parameters: +# 1. Test name (e.g. "unit" or "integration") +# 2. package name "github.com/fabric8-services/fabric8-auth/model" +# 3. File in which to combine the output +# 4. Path to file in which to store names of packages that failed testing +# 5. Environment variable (in the form VAR=VALUE) to be specified for running +# the test. For multiple environment variables, pass "VAR1=VAL1 VAR2=VAL2". +define test-package +$(eval TEST_NAME := $(1)) +$(eval PACKAGE_NAME := $(2)) +$(eval COMBINED_OUT_FILE := $(3)) +$(eval ERRORS_FILE := $(4)) +$(eval ENV_VAR := $(5)) +$(eval ALL_PKGS_COMMA_SEPARATED := $(6)) +@mkdir -p $(COV_DIR)/$(PACKAGE_NAME); +$(eval COV_OUT_FILE := $(COV_DIR)/$(PACKAGE_NAME)/coverage.$(TEST_NAME).mode-$(COVERAGE_MODE)) +@$(ENV_VAR) ADMIN_LOG_LEVEL=$(ADMIN_LOG_LEVEL) \ + go test -vet off $(PACKAGE_NAME) \ + $(GO_TEST_VERBOSITY_FLAG) \ + -coverprofile $(COV_OUT_FILE) \ + -coverpkg $(ALL_PKGS_COMMA_SEPARATED) \ + -covermode=$(COVERAGE_MODE) \ + -timeout 10m \ + $(EXTRA_TEST_PARAMS) \ + || echo $(PACKAGE_NAME) >> $(ERRORS_FILE) + +@if [ -e "$(COV_OUT_FILE)" ]; then \ + if [ ! -e "$(COMBINED_OUT_FILE)" ]; then \ + cp $(COV_OUT_FILE) $(COMBINED_OUT_FILE); \ + else \ + cp $(COMBINED_OUT_FILE) $(COMBINED_OUT_FILE).tmp; \ + $(GOCOVMERGE_BIN) $(COV_OUT_FILE) $(COMBINED_OUT_FILE).tmp > $(COMBINED_OUT_FILE); \ + fi \ +fi +endef + +# Exits the makefile with an error if the file (first parameter) exists. +# Before exiting, the contents of the passed file is printed. +define check-test-results +$(eval ERRORS_FILE := $(1)) +@if [ -e "$(ERRORS_FILE)" ]; then \ +echo ""; \ +echo "ERROR: The following packages did not pass the tests:"; \ +echo "-----------------------------------------------------"; \ +cat $(ERRORS_FILE); \ +echo "-----------------------------------------------------"; \ +echo ""; \ +exit 1; \ +fi +endef + +# NOTE: We don't have prebuild-check as a dependency here because it would cause +# the recipe to be always executed. +$(COV_PATH_UNIT): $(SOURCES) $(GOCOVMERGE_BIN) + $(eval TEST_NAME := unit) + $(eval ERRORS_FILE := $(TMP_PATH)/errors.$(TEST_NAME)) + $(call log-info,"Running test: $(TEST_NAME)") + @mkdir -p $(COV_DIR) + @echo "mode: $(COVERAGE_MODE)" > $(COV_PATH_UNIT) + @-rm -f $(ERRORS_FILE) + $(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN))) + $(eval ALL_PKGS_COMMA_SEPARATED:=$(shell echo $(TEST_PACKAGES) | tr ' ' ,)) + $(foreach package, $(TEST_PACKAGES), $(call test-package,$(TEST_NAME),$(package),$(COV_PATH_UNIT),$(ERRORS_FILE),,$(ALL_PKGS_COMMA_SEPARATED))) + $(call check-test-results,$(ERRORS_FILE)) + +#------------------------------------------------------------------------------- +# Additional tools to build +#------------------------------------------------------------------------------- + +$(GOCOV_BIN): prebuild-check + @cd $(VENDOR_DIR)/github.com/axw/gocov/gocov/ && go build + +$(GOCOVMERGE_BIN): prebuild-check + @cd $(VENDOR_DIR)/github.com/wadey/gocovmerge && go build + + +#------------------------------------------------------------------------------- +# Clean targets +#------------------------------------------------------------------------------- + +CLEAN_TARGETS += clean-coverage +.PHONY: clean-coverage +# Removes all coverage files +clean-coverage: clean-coverage-unit clean-coverage-overall + -@rm -rf $(COV_DIR) + +CLEAN_TARGETS += clean-coverage-overall +.PHONY: clean-coverage-overall +# Removes overall coverage file +clean-coverage-overall: + -@rm -f $(COV_PATH_OVERALL) + +CLEAN_TARGETS += clean-coverage-unit +.PHONY: clean-coverage-unit +# Removes unit test coverage file +clean-coverage-unit: + -@rm -f $(COV_PATH_UNIT) diff --git a/pkg/controller/envdeployment/envdeployment_controller_test.go b/pkg/controller/envdeployment/envdeployment_controller_test.go new file mode 100644 index 0000000..b7b9943 --- /dev/null +++ b/pkg/controller/envdeployment/envdeployment_controller_test.go @@ -0,0 +1,16 @@ +package envdeployment + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestExample(t *testing.T) { + + require.True(t, true) + + t.Run("subtest example", func(t *testing.T) { + require.True(t, true) + }) +} diff --git a/test/README.md b/test/README.md new file mode 100644 index 0000000..6f48e4e --- /dev/null +++ b/test/README.md @@ -0,0 +1,25 @@ +## E2E Tests + +### How to Run + +#### TL;DR + +``` +make minishift-start +eval $(minishift docker-env) +make test-e2e +``` + +Make sure that you have minishift running. you can check it using `minishift status`. If not then start it using `make minishift-start` target. + +After successfully starting minishift, configure your shell to use docker daemon from minishift using `eval $(minishift docker-env)`. + +Now it's time to run E2E tests for `devopsconsole-operator` which will create it's required resources from `deploy/test/` on OpenShift use following command: + +``` +make test-e2e +``` + +This make target is building new docker image `$(DOCKER_REPO)/$(IMAGE_NAME):test`(e.g. `quay.io/openshiftio/devopsconsole-operator:test`) which is used in the operator's deployment manifests in e2e tests. + +Also remember that it uses the `system:admin` account for creating all required resources from `deploy/test` directory. \ No newline at end of file diff --git a/test/e2e/example_test.go b/test/e2e/example_test.go new file mode 100644 index 0000000..e43815e --- /dev/null +++ b/test/e2e/example_test.go @@ -0,0 +1,26 @@ +package e2e + +import ( + "testing" + + //framework "github.com/operator-framework/operator-sdk/pkg/test" + //"github.com/operator-framework/operator-sdk/pkg/test/e2eutil" + //"github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + //"golang.org/x/net/context" + //metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestExample(t *testing.T) { + + require.True(t, true) + + // get global framework variables + //f := framework.Global + + // this is a unit test stub, add tests here + + t.Run("subtest example", func(t *testing.T) { + require.True(t, true) + }) +} diff --git a/test/e2e/main_test.go b/test/e2e/main_test.go new file mode 100644 index 0000000..35d5c41 --- /dev/null +++ b/test/e2e/main_test.go @@ -0,0 +1,11 @@ +package e2e + +import ( + "testing" + + framework "github.com/operator-framework/operator-sdk/pkg/test" +) + +func TestMain(m *testing.M) { + framework.MainEntry(m) +} From 863fbf62d153f9f355508879c82c857675aea796 Mon Sep 17 00:00:00 2001 From: Tina Kurian Date: Thu, 28 Feb 2019 17:46:14 -0500 Subject: [PATCH 60/62] renaming f8 variables (#9) --- Dockerfile.deploy | 6 +++--- Dockerfile.deploy.rhel | 12 ++++++------ Dockerfile.dev | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile.deploy b/Dockerfile.deploy index a34ec95..b0cdc81 100644 --- a/Dockerfile.deploy +++ b/Dockerfile.deploy @@ -5,13 +5,13 @@ ENV LANG=en_US.utf8 ENV INSTALL_PREFIX=/usr/local/devconsole-operator # Create a non-root user and a group with the same name: "devconsole-operator" -ENV F8_USER_NAME=devconsole-operator -RUN useradd --no-create-home -s /bin/bash ${F8_USER_NAME} +ENV USER_NAME=devconsole-operator +RUN useradd --no-create-home -s /bin/bash ${USER_NAME} COPY bin/devconsole-operator ${INSTALL_PREFIX}/bin/devconsole-operator # From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user -USER ${F8_USER_NAME} +USER ${USER_NAME} WORKDIR ${INSTALL_PREFIX} diff --git a/Dockerfile.deploy.rhel b/Dockerfile.deploy.rhel index 7dd5f4e..cf1dd0e 100644 --- a/Dockerfile.deploy.rhel +++ b/Dockerfile.deploy.rhel @@ -3,17 +3,17 @@ FROM quay.io/openshiftio/rhel-base-golang:latest LABEL maintainer "Devtools " LABEL author "Devtools " ENV LANG=en_US.utf8 -ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator +ENV INSTALL_PREFIX=/usr/local/devconsole-operator # Create a non-root user and a group with the same name: "devconsole-operator" -ENV F8_USER_NAME=devconsole-operator -RUN useradd --no-create-home -s /bin/bash ${F8_USER_NAME} +ENV USER_NAME=devconsole-operator +RUN useradd --no-create-home -s /bin/bash ${USER_NAME} -COPY bin/devconsole-operator ${F8_INSTALL_PREFIX}/bin/devconsole-operator +COPY bin/devconsole-operator ${INSTALL_PREFIX}/bin/devconsole-operator # From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user -USER ${F8_USER_NAME} +USER ${USER_NAME} -WORKDIR ${F8_INSTALL_PREFIX} +WORKDIR ${INSTALL_PREFIX} ENTRYPOINT [ "bin/devconsole-operator" ] diff --git a/Dockerfile.dev b/Dockerfile.dev index 1d9db20..adbb6bc 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,7 +1,7 @@ # TODO: change this to a sane base image FROM quay.io/openshiftio/toolchain-operator:faab15e -ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator +ENV INSTALL_PREFIX=/usr/local/devconsole-operator -COPY bin/devconsole-operator ${F8_INSTALL_PREFIX}/bin/devconsole-operator -RUN echo chmod +x ${F8_INSTALL_PREFIX}/bin/devconsole-operator \ No newline at end of file +COPY bin/devconsole-operator ${INSTALL_PREFIX}/bin/devconsole-operator +RUN echo chmod +x ${INSTALL_PREFIX}/bin/devconsole-operator \ No newline at end of file From 1e86a7b5d4bc505f6a1a14b8d407f943d416d2bf Mon Sep 17 00:00:00 2001 From: Corinne Krych Date: Fri, 1 Mar 2019 11:06:23 +0100 Subject: [PATCH 61/62] enhance README and MAkefile with local dev environment --- Gopkg.lock | 2 + Makefile | 38 ++++++ README.md | 85 +++++++------ .../clusterregistry_v1alpha1_cluster_crd.yaml | 12 +- .../components_v1alpha1_component_cr.yaml | 7 ++ .../components_v1alpha1_component_crd.yaml | 33 +++++ ...opsconsole_v1alpha1_envdeployment_crd.yaml | 41 ++---- ...evopsconsole_v1alpha1_environment_crd.yaml | 38 ++---- deploy/role.yaml | 6 + pkg/apis/addtoscheme_components_v1alpha1.go | 10 ++ .../components/v1alpha1/component_types.go | 49 ++++++++ pkg/apis/components/v1alpha1/doc.go | 4 + pkg/apis/components/v1alpha1/register.go | 19 +++ .../v1alpha1/zz_generated.deepcopy.go | 118 ++++++++++++++++++ .../v1alpha1/zz_generated.defaults.go | 32 +++++ .../v1alpha1/zz_generated.openapi.go | 90 +++++++++++++ pkg/controller/add_component.go | 10 ++ .../component/component_controller.go | 91 ++++++++++++++ 18 files changed, 583 insertions(+), 102 deletions(-) create mode 100644 deploy/crds/components_v1alpha1_component_cr.yaml create mode 100644 deploy/crds/components_v1alpha1_component_crd.yaml create mode 100644 pkg/apis/addtoscheme_components_v1alpha1.go create mode 100644 pkg/apis/components/v1alpha1/component_types.go create mode 100644 pkg/apis/components/v1alpha1/doc.go create mode 100644 pkg/apis/components/v1alpha1/register.go create mode 100644 pkg/apis/components/v1alpha1/zz_generated.deepcopy.go create mode 100644 pkg/apis/components/v1alpha1/zz_generated.defaults.go create mode 100644 pkg/apis/components/v1alpha1/zz_generated.openapi.go create mode 100644 pkg/controller/add_component.go create mode 100644 pkg/controller/component/component_controller.go diff --git a/Gopkg.lock b/Gopkg.lock index 55e3346..2572689 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -842,6 +842,7 @@ analyzer-name = "dep" analyzer-version = 1 input-imports = [ + "github.com/go-openapi/spec", "github.com/operator-framework/operator-sdk/pkg/k8sutil", "github.com/operator-framework/operator-sdk/pkg/leader", "github.com/operator-framework/operator-sdk/pkg/ready", @@ -863,6 +864,7 @@ "k8s.io/code-generator/cmd/lister-gen", "k8s.io/code-generator/cmd/openapi-gen", "k8s.io/gengo/args", + "k8s.io/kube-openapi/pkg/common", "sigs.k8s.io/controller-runtime/pkg/client", "sigs.k8s.io/controller-runtime/pkg/client/config", "sigs.k8s.io/controller-runtime/pkg/controller", diff --git a/Makefile b/Makefile index 88b6652..5099d1f 100644 --- a/Makefile +++ b/Makefile @@ -269,4 +269,42 @@ clean: $(CLEAN_TARGETS) ## Build the operator build: prebuild-check deps @echo "building $(BINARY_SERVER_BIN)..." + operator-sdk generate k8s + operator-sdk generate openapi go build -v -o $(BINARY_SERVER_BIN) cmd/manager/main.go + +# ------------------------------------------------------------------- +# deploy +# ------------------------------------------------------------------- +APP_NAMESPACE ?= myproject +.PHONY: local +## Run Operator locally +local: deploy-rbac build deploy-crd + @-oc new-project $(APP_NAMESPACE) + operator-sdk up local --namespace=$(APP_NAMESPACE) + +.PHONY: deploy-rbac +## Setup service account and deploy RBAC +deploy-rbac: + @-oc login -u system:admin + @-oc create -f deploy/service_account.yaml + @-oc create -f deploy/role.yaml + @-oc create -f deploy/role_binding.yaml + +.PHONY: deploy-crd +## Deploy CRD +deploy-crd: + @-oc apply -f deploy/crds/components_v1alpha1_component_crd.yaml + @-oc apply -f deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml + +.PHONY: deploy-operator +## Deploy Operator +deploy-operator: deploy-crd + oc create -f deploy/operator.yaml + +.PHONY: deploy-cr +## Deploy a CR as test +deploy-test: + #@-oc delete ... TODO clean all created resource + oc create -f deploy/crds/components_v1alpha1_component_cr.yaml + diff --git a/README.md b/README.md index 4319bbb..7d8203a 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,56 @@ -## Quick Start +# DevOpsConsole -Install the operator-sdk CLI: +This repository was initially bootstrapped using [CoreOS operator](https://github.com/operator-framework/operator-sdk). -```sh -$ mkdir -p $GOPATH/src/github.com/operator-framework -$ cd $GOPATH/src/github.com/operator-framework -$ git clone https://github.com/operator-framework/operator-sdk -$ cd operator-sdk -$ git checkout master -$ make dep -$ make install -``` +## Build -Add a new API for the custom resource AppService +### Pre-requisites +- [operator-sdk v0.5.0](https://github.com/operator-framework/operator-sdk#quick-start) +- [dep][dep_tool] version v0.5.0+. +- [git][git_tool] +- [go][go_tool] version v1.10+. +- [docker][docker_tool] version 17.03+. +- [kubectl][kubectl_tool] version v1.11.0+ or [oc] version 3.11 +- Access to a kubernetes v.1.11.0+ cluster or openshift cluster version 3.11 -```sh -$ operator-sdk add api --api-version=devopsconsole.openshift.io/v1alpha1 --kind=AppService +### Build ``` - -Add a new controller that watches for AppService - -```sh -$ operator-sdk add controller --api-version=devopsconsole.openshift.io/v1alpha1 --kind=AppService +make build ``` +## Deployment -Apply the app-operator CRD. - -```sh -$ kubectl apply -f deploy/crds/app_v1alpha1_appservice_crd.yaml +### Set up Minishift (one-off) +* create a new profile to test the operator ``` - -Set the OPERATOR_NAME variable - -```sh -$ export OPERATOR_NAME=app-operator +minishift profile set devopsconsole ``` - -Run the operator from outside the Minishift environment. - -```sh -$ operator-sdk up local --namespace myproject +* enable the admin-user add-on +``` +minishift addon enable admin-user +``` +* optionally, configure the VM ``` +minishift config set cpus 4 +minishift config set memory 8GB +minishift config set vm-driver virtualbox +``` +* start the instance +``` +minishift start +``` +> NOTE: this setup should be deprecated in favor of [OCP4 install](). -Your operator is now watching for the existence of an object that matches: GroupVersionKind(app.example.com/v1alpha1, Kind=App) +### Deploy the operator -Apply the provided CR.yaml to your cluster. This should trigger the default logic specified in the handler. +In dev mode, simply run your operator locally: +``` +make local +``` -```sh -$ kubectl create -f deploy/examples/app_v1alpha1_appservice_cr.yaml +### Deploy the CR for testing +Make sure minishift is running: +``` +make deploy-cr ``` ## Directory layout @@ -63,3 +66,11 @@ Please consult [the documentation](https://github.com/operator-framework/operato | deploy | Contains various YAML manifests for registering CRDs, setting up [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/), and deploying the operator as a Deployment.| | Gopkg.toml Gopkg.lock | The [dep](https://github.com/golang/dep) manifests that describe the external dependencies of this operator.| | vendor | The golang [Vendor](https://golang.org/cmd/go/#hdr-Vendor_Directories) folder that contains the local copies of the external dependencies that satisfy the imports of this project. [dep](https://github.com/golang/dep) manages the vendor directly.| + + + +[dep_tool]:https://golang.github.io/dep/docs/installation.html +[git_tool]:https://git-scm.com/downloads +[go_tool]:https://golang.org/dl/ +[docker_tool]:https://docs.docker.com/install/ +[kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/ \ No newline at end of file diff --git a/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml b/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml index 70b3baf..69d6223 100644 --- a/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml +++ b/deploy/crds/clusterregistry_v1alpha1_cluster_crd.yaml @@ -10,8 +10,12 @@ spec: group: clusterregistry.k8s.io names: kind: Cluster + listKind: ClusterList plural: clusters + singular: cluster scope: Namespaced + subresources: + status: {} validation: openAPIV3Schema: properties: @@ -80,9 +84,13 @@ spec: type: type: string required: - - type - - status + - type + - status type: object type: array type: object version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/crds/components_v1alpha1_component_cr.yaml b/deploy/crds/components_v1alpha1_component_cr.yaml new file mode 100644 index 0000000..346386a --- /dev/null +++ b/deploy/crds/components_v1alpha1_component_cr.yaml @@ -0,0 +1,7 @@ +apiVersion: components.devopsconsole.openshift.io/v1alpha1 +kind: Component +metadata: + name: example-component +spec: + # Add fields here + size: 3 diff --git a/deploy/crds/components_v1alpha1_component_crd.yaml b/deploy/crds/components_v1alpha1_component_crd.yaml new file mode 100644 index 0000000..a857dcc --- /dev/null +++ b/deploy/crds/components_v1alpha1_component_crd.yaml @@ -0,0 +1,33 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: components.components.devopsconsole.openshift.io +spec: + group: components.devopsconsole.openshift.io + names: + kind: Component + listKind: ComponentList + plural: components + singular: component + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + status: + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml b/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml index e3fd875..4049581 100644 --- a/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml +++ b/deploy/crds/devopsconsole_v1alpha1_envdeployment_crd.yaml @@ -1,6 +1,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: + creationTimestamp: null name: envdeployments.devopsconsole.openshift.io spec: group: devopsconsole.openshift.io @@ -9,37 +10,11 @@ spec: listKind: EnvDeploymentList plural: envdeployments singular: envdeployment - shortNames: - - envdeploy scope: Namespaced - validation: - # openAPIV3Schema is the schema for validating custom objects. - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - environmentRef: - type: object - properties: - kind: - type: string - name: - type: string - apiGroup: - type: string - deploymentRef: - type: object - properties: - kind: - type: string - name: - type: string - apiGroup: - type: string - version: v1alpha1 \ No newline at end of file + subresources: + status: {} + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml b/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml index 362a6fb..ddcb094 100644 --- a/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml +++ b/deploy/crds/devopsconsole_v1alpha1_environment_crd.yaml @@ -1,6 +1,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: + creationTimestamp: null name: environments.devopsconsole.openshift.io spec: group: devopsconsole.openshift.io @@ -9,34 +10,11 @@ spec: listKind: EnvironmentList plural: environments singular: environment - shortNames: - - env scope: Namespaced - validation: - # openAPIV3Schema is the schema for validating custom objects. - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - type: - type: string - enum: - - 'deploy' - namespace: - type: string - clusterRef: - type: object - properties: - kind: - type: string - name: - type: string - apiGroup: - type: string - version: v1alpha1 \ No newline at end of file + subresources: + status: {} + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/role.yaml b/deploy/role.yaml index bbdf76a..a73468f 100644 --- a/deploy/role.yaml +++ b/deploy/role.yaml @@ -45,3 +45,9 @@ rules: - '*' verbs: - '*' +- apiGroups: + - components.devopsconsole.openshift.io + resources: + - '*' + verbs: + - '*' diff --git a/pkg/apis/addtoscheme_components_v1alpha1.go b/pkg/apis/addtoscheme_components_v1alpha1.go new file mode 100644 index 0000000..c593c30 --- /dev/null +++ b/pkg/apis/addtoscheme_components_v1alpha1.go @@ -0,0 +1,10 @@ +package apis + +import ( + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1" +) + +func init() { + // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back + AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) +} diff --git a/pkg/apis/components/v1alpha1/component_types.go b/pkg/apis/components/v1alpha1/component_types.go new file mode 100644 index 0000000..b90c46c --- /dev/null +++ b/pkg/apis/components/v1alpha1/component_types.go @@ -0,0 +1,49 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// ComponentSpec defines the desired state of Component +// +k8s:openapi-gen=true +type ComponentSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file + // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html +} + +// ComponentStatus defines the observed state of Component +// +k8s:openapi-gen=true +type ComponentStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file + // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Component is the Schema for the components API +// +k8s:openapi-gen=true +type Component struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ComponentSpec `json:"spec,omitempty"` + Status ComponentStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ComponentList contains a list of Component +type ComponentList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Component `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Component{}, &ComponentList{}) +} diff --git a/pkg/apis/components/v1alpha1/doc.go b/pkg/apis/components/v1alpha1/doc.go new file mode 100644 index 0000000..cebe39b --- /dev/null +++ b/pkg/apis/components/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Package v1alpha1 contains API Schema definitions for the components v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=components.devopsconsole.openshift.io +package v1alpha1 diff --git a/pkg/apis/components/v1alpha1/register.go b/pkg/apis/components/v1alpha1/register.go new file mode 100644 index 0000000..3faa9cc --- /dev/null +++ b/pkg/apis/components/v1alpha1/register.go @@ -0,0 +1,19 @@ +// NOTE: Boilerplate only. Ignore this file. + +// Package v1alpha1 contains API Schema definitions for the components v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=components.devopsconsole.openshift.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" +) + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: "components.devopsconsole.openshift.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} +) diff --git a/pkg/apis/components/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/components/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..fda0e08 --- /dev/null +++ b/pkg/apis/components/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,118 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Component) DeepCopyInto(out *Component) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component. +func (in *Component) DeepCopy() *Component { + if in == nil { + return nil + } + out := new(Component) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Component) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentList) DeepCopyInto(out *ComponentList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Component, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentList. +func (in *ComponentList) DeepCopy() *ComponentList { + if in == nil { + return nil + } + out := new(ComponentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ComponentList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec. +func (in *ComponentSpec) DeepCopy() *ComponentSpec { + if in == nil { + return nil + } + out := new(ComponentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus. +func (in *ComponentStatus) DeepCopy() *ComponentStatus { + if in == nil { + return nil + } + out := new(ComponentStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/apis/components/v1alpha1/zz_generated.defaults.go b/pkg/apis/components/v1alpha1/zz_generated.defaults.go new file mode 100644 index 0000000..dd621a3 --- /dev/null +++ b/pkg/apis/components/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/pkg/apis/components/v1alpha1/zz_generated.openapi.go b/pkg/apis/components/v1alpha1/zz_generated.openapi.go new file mode 100644 index 0000000..02a9dc1 --- /dev/null +++ b/pkg/apis/components/v1alpha1/zz_generated.openapi.go @@ -0,0 +1,90 @@ +// +build !ignore_autogenerated + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v1alpha1 + +import ( + spec "github.com/go-openapi/spec" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.Component": schema_pkg_apis_components_v1alpha1_Component(ref), + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentSpec": schema_pkg_apis_components_v1alpha1_ComponentSpec(ref), + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentStatus": schema_pkg_apis_components_v1alpha1_ComponentStatus(ref), + } +} + +func schema_pkg_apis_components_v1alpha1_Component(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Component is the Schema for the components API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentSpec", "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_components_v1alpha1_ComponentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ComponentSpec defines the desired state of Component", + Type: []string{"object"}, + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + } +} + +func schema_pkg_apis_components_v1alpha1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ComponentStatus defines the observed state of Component", + Type: []string{"object"}, + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + } +} diff --git a/pkg/controller/add_component.go b/pkg/controller/add_component.go new file mode 100644 index 0000000..72d4676 --- /dev/null +++ b/pkg/controller/add_component.go @@ -0,0 +1,10 @@ +package controller + +import ( + "github.com/redhat-developer/devopsconsole-operator/pkg/controller/component" +) + +func init() { + // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. + AddToManagerFuncs = append(AddToManagerFuncs, component.Add) +} diff --git a/pkg/controller/component/component_controller.go b/pkg/controller/component/component_controller.go new file mode 100644 index 0000000..e8826b6 --- /dev/null +++ b/pkg/controller/component/component_controller.go @@ -0,0 +1,91 @@ +package component + +import ( + "context" + "fmt" + "strconv" + + componentsv1alpha1 "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller" + "sigs.k8s.io/controller-runtime/pkg/handler" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + "sigs.k8s.io/controller-runtime/pkg/source" +) + +var log = logf.Log.WithName("controller_component") + +// Add creates a new Component Controller and adds it to the Manager. The Manager will set fields on the Controller +// and Start it when the Manager is Started. +func Add(mgr manager.Manager) error { + return add(mgr, newReconciler(mgr)) +} + +// newReconciler returns a new reconcile.Reconciler +func newReconciler(mgr manager.Manager) reconcile.Reconciler { + return &ReconcileComponent{client: mgr.GetClient(), scheme: mgr.GetScheme()} +} + +// add adds a new Controller to mgr with r as the reconcile.Reconciler +func add(mgr manager.Manager, r reconcile.Reconciler) error { + // Create a new controller + c, err := controller.New("component-controller", mgr, controller.Options{Reconciler: r}) + if err != nil { + return err + } + + // Watch for changes to primary resource Component + err = c.Watch(&source.Kind{Type: &componentsv1alpha1.Component{}}, &handler.EnqueueRequestForObject{}) + if err != nil { + return err + } + + return nil +} + +var _ reconcile.Reconciler = &ReconcileComponent{} + +// ReconcileComponent reconciles a Component object +type ReconcileComponent struct { + // This client, initialized using mgr.Client() above, is a split client + // that reads objects from the cache and writes to the apiserver + client client.Client + scheme *runtime.Scheme +} + +// Reconcile reads that state of the cluster for a Component object and makes changes based on the state read +// and what is in the Component.Spec +func (r *ReconcileComponent) Reconcile(request reconcile.Request) (reconcile.Result, error) { + reqLogger := log.WithValues("Request.Namespace", request.Namespace, "Request.Name", request.Name) + reqLogger.Info("Reconciling Component") + + // Fetch the Component instance + instance := &componentsv1alpha1.Component{} + err := r.client.Get(context.TODO(), request.NamespacedName, instance) + if err != nil { + if errors.IsNotFound(err) { + // Request object not found, could have been deleted after reconcile request. + // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. + // Return and don't requeue + return reconcile.Result{}, nil + } + // Error reading the object - requeue the request. + return reconcile.Result{}, err + } + + log.Info("============================================================") + log.Info(fmt.Sprintf("***** Reconciling Component %s, namespace %s", request.Name, request.Namespace)) + log.Info(fmt.Sprintf("** Creation time : %s", instance.ObjectMeta.CreationTimestamp)) + log.Info(fmt.Sprintf("** Resource version : %s", instance.ObjectMeta.ResourceVersion)) + log.Info(fmt.Sprintf("** Generation version : %s", strconv.FormatInt(instance.ObjectMeta.Generation, 10))) + log.Info(fmt.Sprintf("** Deletion time : %s", instance.ObjectMeta.DeletionTimestamp)) + log.Info("============================================================") + + return reconcile.Result{}, nil +} + From 0dbf46caae381472430a54fbecd69048571b40da Mon Sep 17 00:00:00 2001 From: Corinne Krych Date: Mon, 4 Mar 2019 19:30:17 +0100 Subject: [PATCH 62/62] focus on creating outteloop imagestream, buildconfig --- Gopkg.lock | 116 ++++++++----- Makefile | 14 +- .../components_v1alpha1_component_cr.yaml | 2 +- .../v1alpha1/zz_generated.openapi.go | 4 - .../component/component_controller.go | 163 +++++++++++++++++- pkg/util/template/assets_vfsdata.go | 96 +---------- pkg/util/template/doc.go | 2 +- pkg/util/template/template.go | 21 +-- pkg/util/template/tmpl/innerloop/deployment | 59 ------- .../template/tmpl/innerloop/deploymentconfig | 80 --------- pkg/util/template/tmpl/innerloop/imagestream | 29 ---- pkg/util/template/tmpl/innerloop/ingress | 16 -- pkg/util/template/tmpl/innerloop/pvc | 15 -- pkg/util/template/tmpl/innerloop/route | 13 -- pkg/util/template/tmpl/innerloop/service | 16 -- .../tmpl/servicecatalog/servicebinding | 13 -- .../tmpl/servicecatalog/serviceinstance | 13 -- 17 files changed, 256 insertions(+), 416 deletions(-) rename {deploy/crds => examples}/components_v1alpha1_component_cr.yaml (82%) delete mode 100644 pkg/util/template/tmpl/innerloop/deployment delete mode 100644 pkg/util/template/tmpl/innerloop/deploymentconfig delete mode 100644 pkg/util/template/tmpl/innerloop/imagestream delete mode 100644 pkg/util/template/tmpl/innerloop/ingress delete mode 100644 pkg/util/template/tmpl/innerloop/pvc delete mode 100644 pkg/util/template/tmpl/innerloop/route delete mode 100644 pkg/util/template/tmpl/innerloop/service delete mode 100644 pkg/util/template/tmpl/servicecatalog/servicebinding delete mode 100644 pkg/util/template/tmpl/servicecatalog/serviceinstance diff --git a/Gopkg.lock b/Gopkg.lock index 2572689..cbfd9b6 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,12 +2,12 @@ [[projects]] - digest = "1:315ee4e58738f41b338a701e8acb4e991f6d30737c2ae757d2087a1d28d72810" + digest = "1:2173c429b0c4654deb4f3e8d1f503c374f93a6b5549d74f9cba797c1e787f8e4" name = "cloud.google.com/go" packages = ["compute/metadata"] pruneopts = "NT" - revision = "28a4bc8c44b3acbcc482cff0cdf7de29a4688b61" - version = "v0.35.1" + revision = "c9474f2f8deb81759839474b6bd1726bbfe1c1c4" + version = "v0.36.0" [[projects]] digest = "1:75d2b55b13298745ec068057251d05d65bbae0a668201fe45ad6986551a55601" @@ -18,12 +18,12 @@ version = "v0.3.1" [[projects]] - digest = "1:d8ebbd207f3d3266d4423ce4860c9f3794956306ded6c7ba312ecc69cdfbf04c" + digest = "1:0a111edd8693fd977f42a0c4f199a0efb13c20aec9da99ad8830c7bb6a87e8d6" name = "github.com/PuerkitoBio/purell" packages = ["."] pruneopts = "NT" - revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" - version = "v1.1.0" + revision = "44968752391892e1b0d0b821ee79e9a85fa13049" + version = "v1.1.1" [[projects]] branch = "master" @@ -42,15 +42,15 @@ version = "v1.1.1" [[projects]] - digest = "1:3f718788c59f3ec687bcc963cb6034a132327387784c8c04392abaaea9ad7498" + digest = "1:2453249730493850718f891fb40b8f1bc932a0265384fc85b269dc04a01d4673" name = "github.com/emicklei/go-restful" packages = [ ".", "log", ] pruneopts = "NT" - revision = "e37671aced663c8d3a395bd301857e26dcf4340c" - version = "v2.8.1" + revision = "85d198d05a92d31823b852b4a5928114912e8949" + version = "v2.9.0" [[projects]] digest = "1:81466b4218bf6adddac2572a30ac733a9255919bc2f470b4827a317bd4ee1756" @@ -117,15 +117,15 @@ version = "v1.6.15" [[projects]] - digest = "1:932970e69f16e127aa0653b8263ae588cd127fa53273e19ba44332902c9826f2" + digest = "1:0b39706cfa32c1ba9e14435b5844d04aef81b60f44b6077e61e0607d56692603" name = "github.com/gogo/protobuf" packages = [ "proto", "sortkeys", ] pruneopts = "NT" - revision = "4cbf7e384e768b4e01799441fdf2a706a5635ae7" - version = "v1.2.0" + revision = "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" + version = "v1.2.1" [[projects]] branch = "master" @@ -144,7 +144,7 @@ revision = "5b532d6fd5efaf7fa130d4e859a2fde0fc3a9e1b" [[projects]] - digest = "1:d7cb4458ea8782e6efacd8f4940796ec559c90833509c436f40c4085b98156dd" + digest = "1:2bac1ab777481a7ef169837f0eeac25a1a6628ac93aef853168681dfec4a653c" name = "github.com/golang/protobuf" packages = [ "proto", @@ -154,8 +154,8 @@ "ptypes/timestamp", ] pruneopts = "NT" - revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" - version = "v1.2.0" + revision = "c823c79ea1570fb5ff454033735a8e68575d1d0f" + version = "v1.3.0" [[projects]] branch = "master" @@ -174,12 +174,12 @@ revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" [[projects]] - digest = "1:56a1f3949ebb7fa22fa6b4e4ac0fe0f77cc4faee5b57413e6fa9199a8458faf1" + digest = "1:ab3ec1fe3e39bac4b3ab63390767766622be35b7cab03f47f787f9ec60522a53" name = "github.com/google/uuid" packages = ["."] pruneopts = "NT" - revision = "9b3b1e0f5f99ae461456d768e7d301a7acdaa2d8" - version = "v1.1.0" + revision = "0cd6bf5da1e1c83f8b45653022c74f71af0538a4" + version = "v1.1.1" [[projects]] digest = "1:289332c13b80edfefc88397cce5266c16845dcf204fa2f6ac7e464ee4c7f6e96" @@ -195,25 +195,25 @@ [[projects]] branch = "master" - digest = "1:97972f03fbf34ec4247ddc78ddb681389c468c020492aa32b109744a54fc0c14" + digest = "1:bb7bd892abcb75ef819ce2efab9d54d22b7e38dc05ffac55428bb0578b52912b" name = "github.com/gregjones/httpcache" packages = [ ".", "diskcache", ] pruneopts = "NT" - revision = "c63ab54fda8f77302f8d414e19933f2b6026a089" + revision = "3befbb6ad0cc97d4c25d851e9528915809e1a22f" [[projects]] - digest = "1:b42cde0e1f3c816dd57f57f7bbcf05ca40263ad96f168714c130c611fc0856a6" + digest = "1:52094d0f8bdf831d1a2401e9b6fee5795fdc0b2a2d1f8bb1980834c289e79129" name = "github.com/hashicorp/golang-lru" packages = [ ".", "simplelru", ] pruneopts = "NT" - revision = "20f1fb78b0740ba8c3cb143a61e86ba5c8669768" - version = "v0.5.0" + revision = "7087cb70de9f7a8bc0a10c375cb0d2280a8edf9c" + version = "v0.5.1" [[projects]] digest = "1:aaa38889f11896ee3644d77e17dc7764cc47f5f3d3b488268df2af2b52541c5f" @@ -240,16 +240,16 @@ version = "v1.1.5" [[projects]] - digest = "1:4059c14e87a2de3a434430340521b5feece186c1469eff0834c29a63870de3ed" + digest = "1:58999a98719fddbac6303cb17e8d85b945f60b72f48e3a2df6b950b97fa926f1" name = "github.com/konsorten/go-windows-terminal-sequences" packages = ["."] pruneopts = "NT" - revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242" - version = "v1.0.1" + revision = "f55edac94c9bbba5d6182a4be46d86a2c9b5b50e" + version = "v1.0.2" [[projects]] branch = "master" - digest = "1:7d9fcac7f1228470c4ea0ee31cdfb662a758c44df691e39b3e76c11d3e12ba8f" + digest = "1:4925ec3736ef6c299cfcf61597782e3d66ec13114f7476019d04c742a7be55d0" name = "github.com/mailru/easyjson" packages = [ "buffer", @@ -257,7 +257,7 @@ "jwriter", ] pruneopts = "NT" - revision = "60711f1a8329503b04e1c88535f419d0bb440bff" + revision = "6243d8e04c3f819e79757e8bc3faa15c3cb27003" [[projects]] digest = "1:56dbf15e091bf7926cb33a57cb6bdfc658fc6d3498d2f76f10a97ce7856f1fde" @@ -291,6 +291,20 @@ revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" version = "1.0.1" +[[projects]] + digest = "1:8bc8f43d2332d035857c92581df240f247c287629d5f60c751df609f9b6215c5" + name = "github.com/openshift/api" + packages = [ + "apps/v1", + "build/v1", + "image/docker10", + "image/dockerpre012", + "image/v1", + ] + pruneopts = "NT" + revision = "0d921e363e951d89f583292c60d013c318df64dc" + version = "v3.9.0" + [[projects]] digest = "1:b186c2fcf87d05c5129ad0d89ea062853b0bdf6d6bca1ed4a22157962f2ad8dd" name = "github.com/operator-framework/operator-sdk" @@ -353,6 +367,14 @@ revision = "1cf9852c553c5b7da2d5a4a091129a7822fed0c9" version = "v1.2.2" +[[projects]] + branch = "master" + digest = "1:234a9257b46016ef9d71bf8f2f691daf5a765e4596c86b7993aef7082fcb9863" + name = "github.com/shurcooL/httpfs" + packages = ["vfsutil"] + pruneopts = "NT" + revision = "74dc9339e414ad069a8d04bba7e7aafd08043a25" + [[projects]] digest = "1:1f84287a4ca2c8f729d8155ba4c45915f5854ebbd214e406070779753da68422" name = "github.com/sirupsen/logrus" @@ -424,15 +446,15 @@ [[projects]] branch = "master" - digest = "1:23e299b9877c8592668486c61668132f954875f29633269874c592c3ea94ee92" + digest = "1:36842fdff18922e24986fdb929c44eaa322860ad3f5eb5936ce91ceda3da124f" name = "golang.org/x/crypto" packages = ["ssh/terminal"] pruneopts = "NT" - revision = "ccddf3741a0cfcee0a62d34c18c2c5417a3761af" + revision = "8dd112bcdc25174059e45e07517d9fc663123347" [[projects]] branch = "master" - digest = "1:4010b78f0ab4fcc3ff81e30e6dba92fa68b8520df8dd21b393481fd791360b21" + digest = "1:2aba4494bdd4f05b0d931d6f31f77cef5d7854e9d1f4ae29a7813d694d1fd27c" name = "golang.org/x/net" packages = [ "context", @@ -443,11 +465,11 @@ "idna", ] pruneopts = "NT" - revision = "d26f9f9a57f3fab6a695bec0d84433c2c50f8bbf" + revision = "16b79f2e4e95ea23b2bf9903c9809ff7b013ce85" [[projects]] branch = "master" - digest = "1:9a9a8b8635685e9e4ff68c80bebf00726f5019fb41da508a56df54e6e7277eeb" + digest = "1:3418b2325cb0e56bb54774c4e484a2d8829b1fe4bad1c5f077cfd08d138a9a9f" name = "golang.org/x/oauth2" packages = [ ".", @@ -457,18 +479,18 @@ "jwt", ] pruneopts = "NT" - revision = "5dab4167f31cbd76b407f1486c86b40748bc5073" + revision = "e64efc72b421e893cbf63f17ba2221e7d6d0b0f3" [[projects]] branch = "master" - digest = "1:680783030e10a31a8c2deb6f0860f13878295b5458908f4395868e1dbbfe6a87" + digest = "1:27c238c1b2e8ab67f312b2ceec175c2ae254eb85f6535fea9922370473947cff" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "NT" - revision = "302c3dd5f1cc82baae8e44d9c3178e89b6e2b345" + revision = "e844e0132e93db857c984c24fd4fc86815e43be3" [[projects]] digest = "1:8c74f97396ed63cc2ef04ebb5fc37bb032871b8fd890a25991ed40974b00cd2a" @@ -504,7 +526,7 @@ [[projects]] branch = "master" - digest = "1:9f9a9dbf521c3a339ac0b595f8718191a0b36929ff8ca05714d6863fcef088ec" + digest = "1:0b083fc0b8ae5ed0e625d855d02ed4dfb374cd22f2f6aa589a94cb8a9a72b510" name = "golang.org/x/tools" packages = [ "go/ast/astutil", @@ -521,7 +543,7 @@ "internal/semver", ] pruneopts = "NT" - revision = "9cefa6771f8f3c72b346adb1995b7432464d4038" + revision = "589c23e65e65055d47b9ad4a99723bc389136265" [[projects]] digest = "1:902ffa11f1d8c19c12b05cabffe69e1a16608ad03a8899ebcb9c6bde295660ae" @@ -781,16 +803,16 @@ revision = "0689ccc1d7d65d9dd1bedcc3b0b1ed7df91ba266" [[projects]] - digest = "1:f3b42f307c7f49a1a7276c48d4b910db76e003220e88797f7acd41e3a9277ddf" + digest = "1:29f93bb84d907a2c035e729e19d66fe52165d8c905cb3ef1920140d76ae6afaf" name = "k8s.io/klog" packages = ["."] pruneopts = "NT" - revision = "a5bc97fbc634d635061f3146511332c7e313a55a" - version = "v0.1.0" + revision = "71442cd4037d612096940ceb0f3fec3f7fff66e0" + version = "v0.2.0" [[projects]] branch = "master" - digest = "1:653cd4cf804493513d5ec945e687639e5fe9a1f7adbcf2db5cd21da31a96674e" + digest = "1:949a39613b79e62f3f761a32b0cb0ca51305030c6311eb890eed119ccd479fd4" name = "k8s.io/kube-openapi" packages = [ "cmd/openapi-gen/args", @@ -801,7 +823,7 @@ "pkg/util/sets", ] pruneopts = "NT" - revision = "ced9eb3070a5f1c548ef46e8dfe2a97c208d9f03" + revision = "b3a7cee44a305be0a69e1b9ac03018307287e1b0" [[projects]] digest = "1:a8fb38656b3b59a487e3f74c7d9ad4d90c4f7a3b45413284311f9751b6905448" @@ -843,18 +865,26 @@ analyzer-version = 1 input-imports = [ "github.com/go-openapi/spec", + "github.com/openshift/api/apps/v1", + "github.com/openshift/api/build/v1", + "github.com/openshift/api/image/v1", "github.com/operator-framework/operator-sdk/pkg/k8sutil", "github.com/operator-framework/operator-sdk/pkg/leader", "github.com/operator-framework/operator-sdk/pkg/ready", "github.com/operator-framework/operator-sdk/pkg/test", "github.com/operator-framework/operator-sdk/version", + "github.com/shurcooL/httpfs/vfsutil", + "github.com/sirupsen/logrus", "github.com/stretchr/testify/require", "k8s.io/api/core/v1", "k8s.io/apimachinery/pkg/api/errors", "k8s.io/apimachinery/pkg/apis/meta/v1", + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "k8s.io/apimachinery/pkg/runtime", "k8s.io/apimachinery/pkg/runtime/schema", + "k8s.io/apimachinery/pkg/runtime/serializer", "k8s.io/apimachinery/pkg/types", + "k8s.io/apimachinery/pkg/util/yaml", "k8s.io/client-go/plugin/pkg/client/auth/gcp", "k8s.io/code-generator/cmd/client-gen", "k8s.io/code-generator/cmd/conversion-gen", diff --git a/Makefile b/Makefile index 5099d1f..e9d4080 100644 --- a/Makefile +++ b/Makefile @@ -306,5 +306,17 @@ deploy-operator: deploy-crd ## Deploy a CR as test deploy-test: #@-oc delete ... TODO clean all created resource - oc create -f deploy/crds/components_v1alpha1_component_cr.yaml + oc create -f examples/components_v1alpha1_component_cr.yaml +# ------------------------------------------------------------------- +# generate template +# ------------------------------------------------------------------- + +$(GOPATH)/bin/vfsgendev: + go get -u github.com/shurcooL/httpfs/vfsutil + go get -u github.com/shurcooL/vfsgen/cmd/vfsgendev + +.PHONY: assets +assets: $(GOPATH)/bin/vfsgendev + @echo ">> writing assets" + cd pkg/util/template && go generate \ No newline at end of file diff --git a/deploy/crds/components_v1alpha1_component_cr.yaml b/examples/components_v1alpha1_component_cr.yaml similarity index 82% rename from deploy/crds/components_v1alpha1_component_cr.yaml rename to examples/components_v1alpha1_component_cr.yaml index 346386a..1bbbe64 100644 --- a/deploy/crds/components_v1alpha1_component_cr.yaml +++ b/examples/components_v1alpha1_component_cr.yaml @@ -1,7 +1,7 @@ apiVersion: components.devopsconsole.openshift.io/v1alpha1 kind: Component metadata: - name: example-component + name: mycomponent spec: # Add fields here size: 3 diff --git a/pkg/apis/components/v1alpha1/zz_generated.openapi.go b/pkg/apis/components/v1alpha1/zz_generated.openapi.go index 02a9dc1..d917682 100644 --- a/pkg/apis/components/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/components/v1alpha1/zz_generated.openapi.go @@ -69,10 +69,8 @@ func schema_pkg_apis_components_v1alpha1_ComponentSpec(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "ComponentSpec defines the desired state of Component", Type: []string{"object"}, - Properties: map[string]spec.Schema{}, }, }, - Dependencies: []string{}, } } @@ -82,9 +80,7 @@ func schema_pkg_apis_components_v1alpha1_ComponentStatus(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "ComponentStatus defines the observed state of Component", Type: []string{"object"}, - Properties: map[string]spec.Schema{}, }, }, - Dependencies: []string{}, } } diff --git a/pkg/controller/component/component_controller.go b/pkg/controller/component/component_controller.go index e8826b6..454566b 100644 --- a/pkg/controller/component/component_controller.go +++ b/pkg/controller/component/component_controller.go @@ -3,9 +3,23 @@ package component import ( "context" "fmt" + tmpl "github.com/redhat-developer/devopsconsole-operator/pkg/util/template" + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/yaml" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "strconv" + "strings" + "text/template" componentsv1alpha1 "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1" + deploymentconfig "github.com/openshift/api/apps/v1" + build "github.com/openshift/api/build/v1" + image "github.com/openshift/api/image/v1" + route "github.com/openshift/api/route/v1" + cgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -18,8 +32,24 @@ import ( "sigs.k8s.io/controller-runtime/pkg/source" ) -var log = logf.Log.WithName("controller_component") - +var ( + scheme = runtime.NewScheme() + codecs = serializer.NewCodecFactory(scheme) + decoderFunc = decoder + log = logf.Log.WithName("controller_component") +) +func init() { + // Add the standard kubernetes [GVK:Types] type registry + // e.g (v1,Pods):&v1.Pod{} + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + cgoscheme.AddToScheme(scheme) + + //add openshift types + deploymentconfig.AddToScheme(scheme) + image.AddToScheme(scheme) + route.AddToScheme(scheme) + build.AddToScheme(scheme) +} // Add creates a new Component Controller and adds it to the Manager. The Manager will set fields on the Controller // and Start it when the Manager is Started. func Add(mgr manager.Manager) error { @@ -86,6 +116,135 @@ func (r *ReconcileComponent) Reconcile(request reconcile.Request) (reconcile.Res log.Info(fmt.Sprintf("** Deletion time : %s", instance.ObjectMeta.DeletionTimestamp)) log.Info("============================================================") + templateObj, ok := tmpl.Templates["outerloop/imagestream"] + if ok { + err := CreateResource(templateObj, instance, r.client, r.scheme) + if err != nil { + return reconcile.Result{}, err + } + log.Info("***** Created Imagestream used as target image to run the application") + } + + templateObj, ok = tmpl.Templates["outerloop/buildconfig"] + if ok { + err := CreateResource(templateObj, instance, r.client, r.scheme) + if err != nil { + return reconcile.Result{}, err + } + log.Info("***** Created Buildconfig") + } + return reconcile.Result{}, nil } +// TODO move the code outside controller into util + +func CreateResource(templateObj template.Template, component *componentsv1alpha1.Component, c client.Client, scheme *runtime.Scheme) error { + res, err := newResourceFromTemplate(templateObj, component, scheme) + if err != nil { + return err + } + + for _, r := range res { + if obj, ok := r.(v1.Object); ok { + obj.SetLabels(PopulateK8sLabels(component)) + } + err = c.Create(context.TODO(), r) + if err != nil && errors.IsNotFound(err) { + return err + } + } + + return nil +} + +func newResourceFromTemplate(templateObj template.Template, component *componentsv1alpha1.Component, scheme *runtime.Scheme) ([]runtime.Object, error) { + var result = []runtime.Object{} + + var b = tmpl.Parse(templateObj, component) + r, err := PopulateKubernetesObjectFromYaml(b.String()) + if err != nil { + return nil, err + } + + if strings.HasSuffix(r.GetKind(), "List") { + l, err := r.ToList() + if err != nil { + return nil, err + } + for _, item := range l.Items { + obj, err := RuntimeObjectFromUnstructured(&item) + if err != nil { + return nil, err + } + ro, ok := obj.(v1.Object) + ro.SetNamespace(component.Namespace) + if !ok { + return nil, err + } + controllerutil.SetControllerReference(component, ro, scheme) + //kubernetes.SetNamespaceAndOwnerReference(obj, component) + result = append(result, obj) + } + } else { + obj, err := RuntimeObjectFromUnstructured(r) + if err != nil { + return nil, err + } + + ro, ok := obj.(v1.Object) + ro.SetNamespace(component.Namespace) + if !ok { + return nil, err + } + controllerutil.SetControllerReference(component, ro, scheme) + //kubernetes.SetNamespaceAndOwnerReference(obj, component) + result = append(result, obj) + } + return result, nil +} + +func PopulateKubernetesObjectFromYaml(data string) (*unstructured.Unstructured, error) { + yml := []byte(data) + json, err := yaml.ToJSON(yml) + if err != nil { + return nil, err + } + u := unstructured.Unstructured{} + err = u.UnmarshalJSON(json) + if err != nil { + return nil, err + } + return &u, nil +} + +// RuntimeObjectFromUnstructured converts an unstructured to a runtime object +func RuntimeObjectFromUnstructured(u *unstructured.Unstructured) (runtime.Object, error) { + gvk := u.GroupVersionKind() + decoder := decoder(gvk.GroupVersion(), codecs) + + b, err := u.MarshalJSON() + if err != nil { + return nil, fmt.Errorf("error running MarshalJSON on unstructured object: %v", err) + } + ro, _, err := decoder.Decode(b, &gvk, nil) + if err != nil { + return nil, fmt.Errorf("failed to decode json data with gvk(%v): %v", gvk.String(), err) + } + return ro, nil +} + +func PopulateK8sLabels(component *componentsv1alpha1.Component) map[string]string { + labels := map[string]string{} + //labels[componentsv1alpha1.RuntimeLabelKey] = component.Spec.Runtime + //labels[componentsv1alpha1.RuntimeVersionLabelKey] = component.Spec.Version + //labels[componentsv1alpha1.ComponentLabelKey] = componentType + labels["app.kubernetes.io/name"] = component.Name + //labels[componentsv1alpha1.ManagedByLabelKey] = "component-operator" + return labels +} + +func decoder(gv schema.GroupVersion, codecs serializer.CodecFactory) runtime.Decoder { + codec := codecs.UniversalDecoder(gv) + return codec +} \ No newline at end of file diff --git a/pkg/util/template/assets_vfsdata.go b/pkg/util/template/assets_vfsdata.go index 75eb4a6..7be7247 100644 --- a/pkg/util/template/assets_vfsdata.go +++ b/pkg/util/template/assets_vfsdata.go @@ -21,126 +21,40 @@ var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2019, 1, 29, 18, 15, 37, 81325585, time.UTC), - }, - "/innerloop": &vfsgen۰DirInfo{ - name: "innerloop", - modTime: time.Date(2019, 1, 29, 17, 50, 43, 763890747, time.UTC), - }, - "/innerloop/deployment": &vfsgen۰CompressedFileInfo{ - name: "deployment", - modTime: time.Date(2019, 1, 29, 17, 50, 43, 763324649, time.UTC), - uncompressedSize: 1730, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xc1\x4e\xdc\x30\x10\xbd\xe7\x2b\x7c\xe0\xd8\xc4\x82\xa3\x51\x0f\xd5\xd2\x9e\x58\xba\x12\x15\xf7\x89\x33\x2c\x06\xdb\xe3\xda\x4e\x68\x14\xe5\xdf\x2b\x27\x90\x3a\xb0\xb0\xa8\xaa\xea\x53\x66\xc6\xef\xf9\xbd\x99\xd1\x2e\x38\x75\x83\x3e\x28\xb2\x82\x81\x73\x81\x77\xa7\xc5\x83\xb2\x8d\x60\x17\xe8\x34\xf5\x06\x6d\x2c\x0c\x46\x68\x20\x82\x28\x18\xd3\x50\xa3\x0e\xe9\x8b\x25\x80\x60\xc3\x50\x5d\x81\xc1\x71\x1c\x06\xe6\xc1\xee\x91\x9d\x3c\x60\xff\x89\x9d\x74\xa0\x5b\x64\xe2\x33\xab\xbe\xd7\xf7\x28\xe3\x16\x23\x54\x97\x13\x9c\x8d\xe3\x44\x30\x0c\xd3\x65\x36\x8e\x62\xfa\x9e\x21\x13\x15\xda\x66\xbe\x65\xc1\x60\xf6\x4a\x11\x1c\xca\xf4\xbc\x47\xa7\x95\x84\x20\xd8\x69\xc1\x58\x40\x8d\x32\x92\x9f\x85\x19\x88\xf2\xee\x32\x53\xfa\x52\x6b\xc1\x58\x44\xe3\x34\x44\x7c\x42\x64\x16\xd3\xd1\x2b\xf0\x3f\xb0\xfa\x51\xbb\xe9\xbc\xb4\x9c\x72\xcf\xb6\xd3\x91\x64\x23\x28\x8b\x7e\x11\x58\x32\xf0\xfb\x4c\x6e\xc9\x4a\x99\x05\xbc\x03\xcf\xb5\xaa\x79\x68\x1d\xfa\x4e\x05\xf2\x0d\x97\x64\x6f\xb3\x44\x95\xe2\x05\x23\xc9\x18\xb0\x8d\x38\x46\x52\x2b\x9b\xc7\xcb\x75\xb4\x9d\xc8\x7d\xcf\xed\xaa\xae\x1d\xca\xea\xab\xed\x56\x6d\x29\x0f\x1a\x9e\xcf\xd4\xa2\xa9\x74\x93\xbe\x56\xcd\x44\xdb\x64\xb1\x32\xb0\x47\xc1\x7e\xb6\xd0\x57\x8a\x78\xb0\xf4\xd8\x78\x72\x3c\x38\xaf\xec\xbe\xac\x89\x62\x19\xce\x94\x48\x33\x0f\x71\x0d\xdb\xb5\x5a\xef\x48\x2b\xd9\x0b\xf6\x45\x3f\x42\x1f\x96\xfa\x5b\xd2\x1c\xf9\xb8\x6a\xf8\x32\x94\x1d\xf9\x38\x21\x26\xb3\x29\x5a\x39\x72\x9e\x22\x49\xd2\x82\xfd\xd8\xec\x96\x7c\x47\xba\x35\xb8\xa5\xd6\xae\x59\x4d\xca\xec\x20\xde\x89\x83\xfd\xcf\x78\x67\xa1\xe1\x0e\x3c\x36\x65\x5a\xe5\x37\x58\xa2\x71\x1c\x7c\x54\xb7\x20\x63\x78\x85\x7f\x96\x7d\x1d\xc9\xc3\x1e\xd7\xae\x95\x55\x71\x73\x60\xf7\x56\xc3\x7e\x9e\xe6\x66\x7b\x71\xfd\x7a\x90\xbe\xb5\xe5\x3d\x74\x20\x78\x1b\x3c\xd7\x24\x41\xf3\x70\xa6\xb8\x6f\xed\x79\xaa\x59\x6a\xf0\xa9\xa6\x6a\xfc\x85\x72\xa9\x4a\x32\x4e\x69\x3c\x88\x86\x10\xd0\xd4\x1a\xcf\xeb\x56\xe9\x46\xf0\x66\xf9\xed\x0a\x7c\x4a\x81\x73\xc7\x17\xe5\x4f\x5b\xff\x6e\x49\x24\xb9\xbe\x3c\x34\x9c\x88\xde\x28\x0b\x51\x91\xdd\x62\x08\x89\x6b\x9e\x45\x83\x1d\xcf\x8a\xa5\xa6\xfd\x7b\xa0\xa7\xc7\xbf\x29\x8d\xff\x61\x71\x66\xe6\x7c\xcc\xc6\xc5\xfe\x42\x79\xc1\x86\xb1\x38\x86\x2e\x3f\xb2\x50\x8c\xb9\xf4\xe7\x13\x22\xda\x78\x33\x3d\xb7\xd1\xa0\x8c\xc8\xd4\xc9\x94\xb8\x7a\x87\xea\x77\x00\x00\x00\xff\xff\x6c\x3e\x77\x40\xc2\x06\x00\x00"), - }, - "/innerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ - name: "deploymentconfig", - modTime: time.Date(2019, 1, 29, 17, 50, 43, 760462857, time.UTC), - uncompressedSize: 2234, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\xcd\x6e\xe3\x38\x0c\xbe\xe7\x29\x84\xa2\xc7\xb5\x8d\xee\x51\xc5\x1e\x16\xe9\x2e\x30\xc0\xa4\x13\x34\x45\xef\x8c\xcc\x38\x6a\xf5\x07\x89\xf6\x8c\x61\xe4\xdd\x07\xb2\x53\x47\x4e\x93\xb4\x05\x66\x46\x27\x93\x14\x7f\xbe\x8f\x34\x05\x4e\x3e\xa1\x0f\xd2\x1a\xce\xc0\xb9\x90\x5b\x87\x26\x6c\xe5\x86\x72\x69\x8b\xe6\x66\xf6\x22\x4d\xc9\xd9\x1d\x3a\x65\x5b\x8d\x86\xe6\xd6\x6c\x64\x35\xd3\x48\x50\x02\x01\x9f\x31\xa6\x60\x8d\x2a\xc4\x2f\x16\x63\x70\xd6\x75\xf9\x3d\x68\xdc\xed\xba\x8e\x79\x30\x15\xb2\xeb\x17\x6c\xff\x62\xd7\x0d\xa8\x1a\x19\xff\x87\xe5\xdf\xd6\xcf\x28\x68\x81\x04\xf9\xd7\xde\x9d\xed\x76\x7d\x80\xae\xeb\x2f\xb3\xdd\x8e\xf7\xdf\x83\x4b\x1f\x0a\x4d\x39\xdc\x32\xa0\x31\xc9\x32\x0b\x0e\x45\x4c\xef\xd1\x29\x29\x20\x70\x76\x33\x63\x2c\xa0\x42\x41\xd6\x9f\x2a\xac\x57\x95\x23\x28\xd1\x83\x9a\xda\x03\x79\x20\xac\xda\xc1\x9d\x5a\x87\x9c\x3d\x58\xa5\xa4\xa9\x66\x8c\x11\x6a\xa7\x80\x70\xb0\xa6\x6c\xc4\x93\x32\xf2\x4b\x58\xf9\x28\x33\xc3\xb9\x0c\x2c\x9e\x63\x06\xa3\xee\x95\xc5\x78\x84\x35\x04\xd2\xa0\x1f\x41\x64\x0c\x7c\x95\x40\xca\x58\x26\x12\xa1\x68\xc0\x17\x4a\xae\x8b\x50\x3b\xf4\x8d\x0c\xd6\x97\x45\xcc\x9e\x28\xf2\x28\x8f\x3e\xc2\x6a\x0d\xa6\xe4\xef\x05\x59\x4b\x93\xca\xe3\x75\x34\x0d\x4f\xb9\x19\x28\xcd\x57\x0e\x45\xfe\x9f\x69\x26\xd4\x65\x27\x01\x0f\xa7\xa7\xb1\x37\x3d\xc5\xaf\x09\xe1\x68\xca\x44\x96\x1a\xaa\xe1\x66\x9f\xe4\xa1\x36\x24\x35\x0e\x01\x79\x1c\x86\x40\xd3\xbb\xcb\x5a\xa9\xa5\x55\x52\xb4\x9c\xfd\xab\xbe\x43\x1b\x46\xfb\xb9\x7a\x9c\xf5\x34\x61\x79\xec\xc4\xd2\x7a\x3a\x24\x8f\xd2\x04\x86\xf3\x96\xac\xb0\x8a\xb3\xc7\xf9\x72\xd4\x37\x56\xd5\x1a\x17\xb6\x36\xd3\xa8\x3a\x6a\x96\x40\x5b\x7e\x92\xf4\x24\xee\x50\x68\xd8\x82\xc7\x32\x8b\x33\x7e\x26\x0a\x69\x57\x80\x27\xb9\x01\x41\xe1\x8d\xff\x6b\xd9\x2b\xb2\x1e\x2a\x9c\xa2\x96\x46\xc6\xb5\xf2\x66\xe0\x26\x1d\x7e\x6d\xe1\x7c\x71\xb7\x7a\xdb\x3d\x5f\x9b\xec\x19\x1a\xe0\x45\x1d\x7c\xa1\xac\x00\x55\x84\xbf\x65\xe1\x6b\x73\x1b\x6d\xc6\x96\xb8\xb7\xc9\x35\xfe\x40\x31\x5a\x85\xd5\x4e\x2a\x3c\xe9\x0d\x21\xa0\x5e\x2b\xbc\x5d\xd7\x52\x95\xbc\x38\xfc\x57\xa1\xe8\x55\xe0\xdc\xf1\x74\x5c\x8d\x50\x0f\x74\x4e\x46\xe4\xea\x93\x33\x22\xac\x6b\xb3\x53\xbd\xf1\x18\x6c\xed\x05\x06\xce\xba\xc3\x24\x10\x7a\x2d\x0d\x90\xb4\x66\x81\x21\xc4\x0c\x43\x83\x4a\x6c\x8a\xc4\x98\x29\x5b\x5d\x72\xda\x97\xf4\xbf\x54\xf8\x07\xa6\x69\x88\x9c\xf6\x5e\x3b\x6a\xef\xa4\x9f\x60\x3b\xe7\x9d\x7d\x64\xca\x18\x73\xf1\xa1\x0b\x84\x86\x9e\xfa\x74\x73\x05\x52\xf3\xa4\x3a\x11\x15\xf7\x97\x43\x91\x97\x55\xb5\x1f\xd3\x6c\xff\x2c\x7c\x89\x8d\x9c\x6f\xe3\x02\x9a\x8d\x8d\x1d\xe4\x25\x78\xd0\x23\x2e\xa8\xc9\x6a\x20\x29\x38\x23\x5f\xe3\xf1\xb2\x8d\x49\x12\x0e\xce\x74\x7e\xe3\x6d\x52\xf5\xf0\x3e\xf7\x15\xac\xc8\x23\xe8\x47\xa8\xde\x99\xa0\xc3\xae\xfa\xcd\x00\x8e\xd7\xdb\xa7\x2b\xbf\xb4\x6a\x7f\x06\x00\x00\xff\xff\x15\x05\xa1\x06\xba\x08\x00\x00"), - }, - "/innerloop/imagestream": &vfsgen۰CompressedFileInfo{ - name: "imagestream", - modTime: time.Date(2019, 1, 22, 19, 36, 18, 833418452, time.UTC), - uncompressedSize: 756, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x51\xcb\x8a\xdc\x30\x10\xbc\xeb\x2b\x9a\x65\x8e\x19\x9b\xcd\x51\x43\x0e\x4b\x72\x09\x6c\x1e\x64\x20\xf7\xb6\xd4\x9e\x68\x47\x2f\x24\x79\xc8\x20\xf4\xef\xc1\xb2\xac\xdd\xc0\x9e\x2c\xaa\xab\xba\xab\xca\x39\x1f\x2c\x1a\x7a\xf2\x1e\xf8\x27\x18\xbe\xa3\x21\x28\x85\xe5\x7c\xd0\x38\x91\x8e\x15\xfd\x31\xbd\x90\x48\xdf\x28\xe1\xf0\xbc\xa1\xa5\xa0\x57\xbf\x29\x44\xe5\x2c\x87\xdb\x23\xbb\x2a\x2b\x39\x3c\xab\x98\x98\x4a\x64\x22\x67\x39\x43\x40\x7b\x21\x18\xce\x9e\xc4\xf0\xd5\xe0\x85\x56\x21\x3b\xc2\x5b\xad\x5a\xf1\xc1\x79\xb2\xf1\x8f\x9a\xd3\xa0\xdc\x78\x7b\x64\x00\xdb\xc2\xaa\x3a\xa7\x40\x68\x18\x80\xa1\x84\x12\x13\x72\x06\x00\xb0\x19\xdc\xde\x00\xe8\x3d\x87\xd7\x34\xa5\xf4\xfb\x87\x2b\xdd\x3f\xc0\xe1\x86\x7a\xa1\x35\xce\x9e\xac\x94\x26\xcd\xb9\x72\xa0\x14\x5e\xdf\x1b\xb3\x6e\x20\x2b\x77\xde\xba\x78\x9d\xd7\x8e\x2a\x16\x3d\x89\x66\xc5\xb9\xeb\xe2\x7f\x3a\xad\xc4\x7d\x37\xa4\x9d\x40\xcd\x61\x46\x1d\x89\x6d\x67\xd4\x0c\xc3\x17\x27\xae\x14\x6a\xae\xb6\x38\xe1\xa5\xa5\x38\x36\xce\x93\xb5\x2e\x61\x52\xce\x7e\x36\x32\x76\x9f\xd8\xe1\x9e\x1a\x40\x18\x19\x39\x3c\x84\xc5\x1e\x5f\xf0\x86\x7c\x5c\x62\x18\xeb\xed\x31\x7e\x54\x63\x58\xec\x69\x9d\x59\x27\xa9\xcd\xd4\x44\x7f\x49\xac\xd3\x93\x70\xc6\x2b\x4d\xef\x2a\x31\x46\x32\x93\xa6\xd3\xb4\x28\x2d\xf9\x28\xc9\x6b\x77\x37\x64\x53\x1c\x2b\x84\xde\x3f\xf4\x06\xc9\xca\xee\x73\x0e\xce\xbc\x1a\xdc\x7e\xe4\x9b\xd8\x7d\xd2\x1b\xfd\x45\xde\x75\xb5\x32\xde\x85\xd4\xba\x84\xbc\xc3\x1b\x59\x63\xa2\x98\x1a\x14\x68\xa6\x40\x56\xd0\xff\xc5\x03\xa4\xbb\x27\x0e\x67\xb7\x04\xb1\x57\x5f\xfd\xb5\xcf\xbf\x00\x00\x00\xff\xff\xd3\xe2\x4c\x92\xf4\x02\x00\x00"), - }, - "/innerloop/ingress": &vfsgen۰CompressedFileInfo{ - name: "ingress", - modTime: time.Date(2019, 1, 22, 18, 8, 49, 841472170, time.UTC), - uncompressedSize: 347, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8f\xcd\x4e\xc3\x30\x10\x84\xef\x79\x8a\x39\xf4\x48\x53\xf5\x6a\x89\x07\x40\x82\x82\x84\xc4\x7d\xe3\x8c\xda\x90\xc4\xb1\xec\x6d\x04\xb2\xfc\xee\xc8\x0e\x20\x7e\x6e\xfb\x79\x67\x67\xc6\xe2\x87\x17\x86\x38\x2c\xce\x80\x6f\x4a\x57\xc6\x78\x58\x8f\x1d\x55\x8e\xcd\x38\xb8\xde\xe0\xce\x9d\x03\x63\x6c\x66\xaa\xf4\xa2\x62\x1a\xc0\xc9\x4c\x83\x94\xda\x93\xcc\xcc\xb9\x01\x26\xe9\x38\xc5\xb2\x03\xc4\xfb\x1f\xcb\x94\x10\xc4\x9d\x89\xdd\xc8\xf7\x1b\xec\x56\x99\xae\x84\xb9\x45\xfb\xd8\xbd\xd2\xea\x03\x55\xda\xfb\x7a\x8e\x6a\x05\xa4\x54\xc5\xc8\xd9\xd4\x79\x3b\xa9\x56\x74\x7d\x51\x45\x4f\x5b\xc2\xc2\x75\x62\x4d\xdd\xe3\xb2\x44\xfd\xdd\x09\xb8\xa8\xfa\xad\x13\xe0\x45\x2f\xf1\x0b\xf6\x15\x0d\x0e\x9f\x0c\x74\x62\x47\xba\xde\x7c\x3f\x00\x91\x61\x1d\x2c\x4f\xff\x3e\xfb\x47\xf0\xb4\x84\x2d\xf9\xd9\xd3\xb6\x85\x72\xfe\x08\x00\x00\xff\xff\x62\x6c\xa9\xf9\x5b\x01\x00\x00"), - }, - "/innerloop/pvc": &vfsgen۰CompressedFileInfo{ - name: "pvc", - modTime: time.Date(2019, 1, 22, 18, 8, 49, 837678910, time.UTC), - uncompressedSize: 339, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x8f\x3d\x6b\x33\x31\x10\x84\xfb\xfb\x15\x53\xb8\x7c\xdf\x83\xb4\x82\x54\x6e\xe3\x24\x60\x70\xbf\xd6\x0d\x46\xb1\xbe\x22\xe9\x0c\x46\xe8\xbf\x07\xc9\x26\x31\xb8\x93\x76\x9f\x19\x9e\x95\x68\x0e\x4c\xd9\x04\xaf\x70\x79\x99\xce\xc6\x2f\x0a\x9f\x7d\x92\x0b\x7d\x39\x04\xbb\x3a\x6e\xad\x18\x37\x39\x16\x59\xa4\x88\x9a\x00\x2f\x8e\x0a\xb5\xce\xfb\x48\x3d\xef\x4b\x48\x72\xe2\xfc\x2e\x8e\xad\x4d\x80\x95\x23\x6d\xee\x20\x20\x31\x0e\xf2\x77\xf9\x90\x7e\x98\xd5\x8a\x24\xfe\x44\x6c\xce\xbc\xfe\xc3\xe6\x22\x76\x25\xd4\x2b\xe6\x8f\xe3\x17\x75\xd9\xb1\xc8\xfc\x36\x7a\xf1\x17\xe9\x30\x5a\x53\xe3\x7d\x8b\xb4\x56\x2b\xe8\x97\x4e\xe5\x48\xdd\x2d\x44\x6b\xe6\xbc\x0b\x0b\x87\xd4\xff\x27\xf3\xbe\x1a\xad\x89\x39\xac\x49\xf3\x2e\x9f\xf8\xbd\x32\x97\xfb\x0f\xc8\x37\xfe\xf9\xf4\xad\x44\xd1\xa6\x5c\x5b\x9b\x7e\x02\x00\x00\xff\xff\x94\x0f\x3d\x3d\x53\x01\x00\x00"), - }, - "/innerloop/route": &vfsgen۰CompressedFileInfo{ - name: "route", - modTime: time.Date(2019, 1, 22, 18, 8, 49, 833044163, time.UTC), - uncompressedSize: 261, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x8f\xcd\x6a\xc4\x20\x18\x45\xf7\x3e\xc5\x5d\x64\x59\x2c\xdd\x0a\x7d\x83\xfe\x40\x0b\xdd\x7f\x49\x6e\x5b\x27\x89\x8a\x9a\xc0\x20\xbe\xfb\x60\xb2\x18\x06\xb2\x13\xce\x3d\x72\x3e\x09\xf6\x87\x31\x59\xef\x0c\xa2\x5f\x33\xb5\x0f\x74\xe9\xdf\xfe\x66\x6d\xfd\xf3\xf6\xa2\x26\xeb\x46\x83\xaf\xc6\xd4\xc2\x2c\xa3\x64\x31\x0a\x70\xb2\xd0\xa0\x14\xfd\x21\x0b\x6b\x55\xc0\x2c\x3d\xe7\xd4\x18\x20\x21\x3c\xc2\x33\x01\x28\x05\x51\xdc\x1f\xd1\x4d\xbc\x3e\xa1\xdb\x64\x5e\x09\xf3\x0a\xfd\xd9\x5f\x38\xe4\x77\x66\xd1\x6f\xfb\xbf\xb8\x2b\x6d\x8c\x5a\xcd\xfe\x3e\x94\x5a\x4b\x01\xdd\xd8\x56\x29\x70\x68\x15\xd9\x1f\x2d\xc7\x05\xdf\x8c\x9b\x1d\x78\x96\x72\x0b\x00\x00\xff\xff\x3f\x79\xef\x1f\x05\x01\x00\x00"), - }, - "/innerloop/service": &vfsgen۰CompressedFileInfo{ - name: "service", - modTime: time.Date(2019, 1, 22, 18, 8, 49, 839553123, time.UTC), - uncompressedSize: 314, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x8f\xbd\x6a\xc4\x30\x10\x84\x7b\x3f\xc5\x14\x57\x26\x86\xb4\x82\x54\x69\xf3\x63\xb8\x90\x7e\x4f\x1e\x0e\xc7\xb2\x24\xd6\x1b\x43\x10\x7a\xf7\x60\x25\x10\x0e\xdc\x0d\x9a\xf9\x46\xb3\x92\xa7\x0f\xea\x3a\xa5\xe8\xb0\x3d\x74\xf3\x14\x47\x87\x33\x75\x9b\x3c\xbb\x85\x26\xa3\x98\xb8\x0e\x88\xb2\xd0\xa1\x94\xfe\x55\x16\xd6\xda\x01\x41\x2e\x0c\xeb\xee\x01\x92\xf3\xad\x79\x04\x00\xa5\x40\x25\x5e\x89\xd3\xcc\xef\x3b\x9c\x36\x09\x5f\x84\x7b\x44\xff\x76\xf9\xa4\xb7\x17\x9a\xf4\xcf\xad\x17\xff\xc8\x1e\x46\xad\xae\xe9\x5f\xa4\xd6\x52\xc0\x38\xee\xa9\x35\xd3\xef\x2b\x72\x52\x6b\x73\xee\x9b\x6c\x7f\x9f\x33\x7d\x3f\x24\xb5\xbf\xb6\xac\xc9\x92\x4f\xc1\xe1\xfd\x69\x68\x2f\x26\x7a\xa5\x0d\xc7\xc0\xca\x40\x6f\x49\x8f\x8e\xfc\x09\x00\x00\xff\xff\xe7\xe7\x7e\xf8\x3a\x01\x00\x00"), + modTime: time.Date(2019, 3, 4, 14, 37, 26, 955596166, time.UTC), }, "/outerloop": &vfsgen۰DirInfo{ name: "outerloop", - modTime: time.Date(2019, 1, 30, 13, 47, 16, 317353065, time.UTC), + modTime: time.Date(2019, 3, 4, 10, 32, 34, 9236132, time.UTC), }, "/outerloop/buildconfig": &vfsgen۰CompressedFileInfo{ name: "buildconfig", - modTime: time.Date(2019, 1, 30, 10, 18, 18, 964778128, time.UTC), + modTime: time.Date(2019, 3, 4, 10, 32, 34, 8842351, time.UTC), uncompressedSize: 1117, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x53\x41\x6f\xdb\x3c\x0c\xbd\xfb\x57\x10\x41\x8f\x9f\x5d\x7c\x57\x01\x3b\xb8\x69\x96\x04\x5b\x93\x20\xce\x3a\xec\x14\x30\x36\xed\x68\xb5\x25\x41\xa6\x82\x05\x86\xff\xfb\x60\x29\x69\x93\x0c\xdb\xa1\x9b\x2f\xa6\x48\xe9\x3d\xf2\x91\x44\x23\x9f\xc9\xb6\x52\x2b\x01\x3b\x27\xeb\x22\xd1\x86\x54\xbb\x97\x25\x27\x52\xdf\x1f\xfe\x8f\x5e\xa4\x2a\x04\x3c\x0c\xb1\xb1\x56\xa5\xac\xa2\x86\x18\x0b\x64\x14\x11\x40\x8d\x3b\xaa\xdb\xc1\x02\x40\x63\x04\x74\x5d\xb2\xc0\x86\xfa\xbe\xeb\xc0\xa2\xaa\x08\xee\x5e\xe8\xf8\x1f\xdc\x1d\xb0\x76\x04\xe2\x03\x24\xcb\xdd\x77\xca\xf9\x89\x18\x93\xcf\xfe\x39\xf4\xbd\x07\xe8\x3a\x7f\x19\xfa\x5e\x78\x3b\x3c\xf1\x50\xa4\x8a\x70\x4b\x61\x43\x17\x2c\x51\x6b\x28\x1f\xe8\xb5\x63\xe3\x38\x24\xc2\x3a\xfc\x01\x42\xf2\xf3\x06\x2b\xca\xd8\x12\x36\x1b\xac\x4e\xa1\x1b\x20\x51\x23\x53\xcb\x11\x40\xab\x9d\xcd\x29\x20\x54\x92\xcf\x50\xce\x4a\x9f\x95\x54\x05\xfd\xb8\x2a\x22\x55\x4a\x33\xb2\xd4\xaa\x85\x11\x1a\x73\x2d\x61\x25\x39\x76\x56\x8e\xce\x45\x02\x58\x2a\xdf\x8d\x64\xa9\x7c\x45\xe2\xa3\x21\x01\x53\xe9\x93\x66\x8b\x4c\xd5\x31\x64\x1b\x4a\xc8\xae\x7c\x00\xa5\xd5\xcd\xd9\xfe\xa3\x34\x17\xe2\x64\x86\xf2\x64\xed\x14\xcb\x86\x6e\x85\x1a\x3e\xa9\x72\x4b\x0d\x29\xc6\x5a\x00\x5b\x47\x27\x3f\xa9\xc3\x99\x2a\x3e\xa1\x3d\xa5\xcf\x93\xc5\x36\x5d\x4f\xb3\x6d\xba\x5a\x4d\x16\x8f\xaf\x6c\xbe\xcf\x02\x46\xb1\xa9\xdf\xab\x4b\x21\xed\xa0\xcb\xe8\x86\x33\x5d\x6f\xe6\x1f\xd3\xf1\x66\xfb\x38\x5f\xff\x42\xf7\x77\x54\xf7\x8c\xb6\x22\xfe\x2d\xe3\x78\xb9\xfa\xe6\xab\xfd\x17\xbc\x68\x59\x96\x98\x73\x9c\x6b\x73\x8c\xd1\x56\xed\x5b\xb5\x61\x0c\x32\xdf\xf2\x08\x80\xad\xac\x2a\xb2\x7e\x27\xe3\x61\x80\xf7\x6e\x77\x6e\x45\x4b\xb9\x25\x16\x30\x9d\x6f\x66\x5f\x1e\xb6\x5f\x27\x0f\xb3\xe5\xf2\xd3\x36\x9b\x8c\xd7\x93\xcd\xf5\x4c\xcd\xdc\xce\x03\x04\x47\xd8\xfc\xf1\x7e\x58\x68\xef\x96\xc3\xdc\x84\xb3\x80\xee\x72\x1e\xe7\x6f\x91\x9f\x01\x00\x00\xff\xff\xe6\xc8\x1f\xfb\x5d\x04\x00\x00"), }, "/outerloop/deploymentconfig": &vfsgen۰CompressedFileInfo{ name: "deploymentconfig", - modTime: time.Date(2019, 1, 30, 13, 47, 16, 316810694, time.UTC), + modTime: time.Date(2019, 3, 4, 10, 32, 34, 9108045, time.UTC), uncompressedSize: 1097, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\x4d\x6f\xd4\x30\x10\x86\xef\xf9\x15\xa3\xaa\x47\x12\xd4\xab\x25\x0e\x68\xe1\x80\xc4\xc7\x8a\x56\xbd\x4f\x93\xd9\xd4\xd4\x9e\xb1\xec\xd9\x15\xab\x28\xff\x1d\xd9\x2e\xdb\x64\x59\x10\x12\xcc\xc9\x5f\x33\xf3\xbe\x8f\x6d\x0c\xf6\x9e\x62\xb2\xc2\x06\x30\x84\xd4\x49\x20\x4e\x8f\x76\xa7\x9d\x95\xd7\x87\x9b\xe6\xc9\xf2\x60\xe0\x1d\x05\x27\x47\x4f\xac\x1b\xe1\x9d\x1d\x1b\x4f\x8a\x03\x2a\x9a\x06\xc0\xe1\x03\xb9\x94\x47\x90\x6b\x18\x98\xa6\xee\x33\x7a\x9a\xe7\x69\x82\x88\x3c\x12\x5c\x3f\xd1\xf1\x15\x5c\x1f\xd0\xed\x09\xcc\x1b\xe8\xbe\x3c\x7c\xa3\x5e\x3f\x91\x62\xf7\xb1\xa4\xc3\x3c\x97\x02\xd3\x54\x0e\xc3\x3c\x9b\x32\xae\x29\xa5\x14\xf1\x50\x4f\x31\x7a\x5a\x74\x69\x52\xa0\x3e\xb7\x8f\x14\x9c\xed\x31\x19\xb8\x69\x00\x12\x39\xea\x55\xe2\x25\x61\x65\x69\x38\x99\xea\x8b\xa9\xf5\x7e\xd2\x88\x4a\xe3\xb1\xa6\xeb\x31\x90\x81\xaf\xe2\x9c\xe5\xb1\x01\x50\xf2\xc1\xa1\x52\xdd\x5d\xd2\xc8\xb1\x24\xf2\x5f\xa8\xfc\x2d\x99\x1a\x7f\x36\x96\xe3\x9c\x60\x5e\xfb\x49\x31\x47\x2f\xac\x68\x99\xe2\xc9\x44\x0b\xc4\x07\xb3\x14\x53\x3d\x74\xb7\x81\xfa\xee\x3d\x1f\x56\x5a\xdb\x8b\x1d\x6a\x14\xdd\x65\xeb\x3e\x8f\x56\x0e\x89\x87\xc5\xdc\x7a\x1c\xcb\x49\xb0\x3c\xd0\xf7\x15\x9f\xb7\xcc\xa2\xa8\x56\x38\xc1\x15\x86\xb0\x7e\xb8\x71\xcf\x6a\x3d\xb5\xa5\xc2\xd5\x52\xd9\xef\x74\x05\x89\xba\xb8\xb1\xf6\x05\xc1\x56\xa2\x96\x8c\xe2\x34\xcf\x56\x76\x42\x14\x95\x5e\x9c\x81\xbb\xcd\x36\xbf\x8c\x68\xc7\xf1\x19\x5c\xfb\xfc\x6e\x3e\x64\x19\x9b\xc7\x0c\xac\x39\x19\xab\xf3\x2d\x46\xf4\xa7\xc6\xb8\x57\xf1\xa8\xb6\x37\xa0\x71\x4f\xe7\xb7\x91\x35\x2f\x6e\xe4\xdc\xc5\x2e\x8a\x7f\xb1\x50\x7f\x6e\x69\x7d\xab\x91\xd0\xdf\xe1\xf8\x0b\x86\x7f\x27\x6b\xf2\x37\x48\xfa\x23\x00\x00\xff\xff\xad\x19\x87\x0c\x49\x04\x00\x00"), }, "/outerloop/imagestream": &vfsgen۰FileInfo{ name: "imagestream", - modTime: time.Date(2019, 1, 30, 6, 46, 12, 600732750, time.UTC), + modTime: time.Date(2019, 3, 4, 10, 32, 34, 9322575, time.UTC), content: []byte("\x61\x70\x69\x56\x65\x72\x73\x69\x6f\x6e\x3a\x20\x69\x6d\x61\x67\x65\x2e\x6f\x70\x65\x6e\x73\x68\x69\x66\x74\x2e\x69\x6f\x2f\x76\x31\x0a\x6b\x69\x6e\x64\x3a\x20\x49\x6d\x61\x67\x65\x53\x74\x72\x65\x61\x6d\x0a\x6d\x65\x74\x61\x64\x61\x74\x61\x3a\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x7b\x7b\x2e\x4e\x61\x6d\x65\x7d\x7d\x0a\x73\x70\x65\x63\x3a"), }, - "/servicecatalog": &vfsgen۰DirInfo{ - name: "servicecatalog", - modTime: time.Date(2018, 12, 21, 14, 56, 32, 788143503, time.UTC), - }, - "/servicecatalog/servicebinding": &vfsgen۰CompressedFileInfo{ - name: "servicebinding", - modTime: time.Date(2018, 12, 21, 14, 56, 32, 788042232, time.UTC), - uncompressedSize: 273, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8f\x31\x6e\xc3\x30\x0c\x45\x77\x9d\x82\x43\x67\x15\xd9\x0a\x01\x1d\xda\x03\x64\xa8\x81\xee\x8c\xfc\x6b\x10\xb1\x69\xc1\x14\xb2\x08\xbc\x7b\x21\xb7\xa9\x9b\x51\xff\xe9\xf1\x93\xad\x3d\x29\x2f\x78\x2b\x85\xd2\x2b\xc5\x33\x2f\x20\xf7\xd0\x1a\x6d\xac\x13\x28\x0e\x05\x39\x0e\xd8\x6e\x92\x61\xe4\xce\x45\x3e\xb1\x99\xac\x9a\xc8\x7e\xe2\xcc\x95\xe7\x75\x8a\xd7\x17\x8b\xb2\x3e\xdf\x4e\x17\x54\x3e\x85\xab\xe8\x98\xe8\x57\x7d\x17\x1d\x45\xa7\xb0\xa0\xf2\xc8\x95\x53\x20\xea\xc5\x89\x5a\xdb\x5b\xdd\x03\xd1\xcc\x17\xcc\xd6\x19\x11\x97\xd2\xe1\x7d\xbd\x9d\x1f\xce\xbf\xd8\x0a\x72\x57\x44\xad\xb2\x66\x7c\xe0\x2b\x3d\xfc\x3d\xe6\x1b\xf2\x86\x7a\xbe\xe7\xc3\xdf\x73\x3f\x19\x3a\xba\x7f\x07\x00\x00\xff\xff\x85\x6f\x46\xd9\x11\x01\x00\x00"), - }, - "/servicecatalog/serviceinstance": &vfsgen۰CompressedFileInfo{ - name: "serviceinstance", - modTime: time.Date(2018, 12, 21, 14, 56, 32, 788194278, time.UTC), - uncompressedSize: 333, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x90\xbd\x6a\x04\x21\x14\x85\x7b\x9f\xe2\x16\xa9\x0d\xdb\x05\x21\x45\x08\x29\x92\x62\x09\x0c\xa4\x3f\xeb\x5c\x16\x59\xe7\x8e\x78\xcd\x12\x10\xdf\x3d\xe8\xee\xe4\x87\x2d\xfd\xce\x39\x7e\x62\xad\x77\x82\x85\x9f\x52\x22\xf7\x48\x76\x8f\x85\xa9\x35\x53\x2b\x65\xc8\x91\xc9\x4e\x89\xbd\x9d\x38\x9f\x83\x67\xa5\xd6\x90\xc2\x07\x67\x0d\xab\x38\xd2\x0b\xf6\x28\x88\xeb\xd1\x9e\x1e\xd4\x86\xf5\xfe\xbc\x3b\x70\xc1\xce\x9c\x82\xcc\x8e\xae\xd3\x57\xd1\x02\xf1\x6c\x16\x2e\x98\x51\xe0\x0c\x51\x37\x3b\xaa\x75\x68\x5b\x33\x44\x11\x07\x8e\xda\x33\x22\xa4\xd4\xc3\xed\x7d\x23\xff\xdd\xfc\xc1\x9a\xd8\xf7\x89\x8f\x9f\x5a\x38\x5f\x8d\xcf\x11\xaa\x2f\x5f\x85\xb3\x20\xee\x37\xd3\xa0\xe3\xaa\xff\xed\xf7\x08\xb9\x29\x77\x38\xba\x09\x19\x0b\x17\xce\x7a\xe1\x3f\xc7\xb7\x69\x95\xf1\x5d\x2c\x73\x6b\xdf\x01\x00\x00\xff\xff\xdd\xed\x80\x29\x4d\x01\x00\x00"), - }, } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/innerloop"].(os.FileInfo), fs["/outerloop"].(os.FileInfo), - fs["/servicecatalog"].(os.FileInfo), - } - fs["/innerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/innerloop/deployment"].(os.FileInfo), - fs["/innerloop/deploymentconfig"].(os.FileInfo), - fs["/innerloop/imagestream"].(os.FileInfo), - fs["/innerloop/ingress"].(os.FileInfo), - fs["/innerloop/pvc"].(os.FileInfo), - fs["/innerloop/route"].(os.FileInfo), - fs["/innerloop/service"].(os.FileInfo), } fs["/outerloop"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/outerloop/buildconfig"].(os.FileInfo), fs["/outerloop/deploymentconfig"].(os.FileInfo), fs["/outerloop/imagestream"].(os.FileInfo), } - fs["/servicecatalog"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/servicecatalog/servicebinding"].(os.FileInfo), - fs["/servicecatalog/serviceinstance"].(os.FileInfo), - } return fs }() diff --git a/pkg/util/template/doc.go b/pkg/util/template/doc.go index cec3d7d..16917ae 100644 --- a/pkg/util/template/doc.go +++ b/pkg/util/template/doc.go @@ -17,4 +17,4 @@ limitations under the License. package template -//go:generate vfsgendev -source="github.com/snowdrop/component-operator/pkg/util/template".Assets +//go:generate vfsgendev -source="github.com/redhat-developer/devopsconsole-operator/pkg/util/template".Assets diff --git a/pkg/util/template/template.go b/pkg/util/template/template.go index 8345fce..2240570 100644 --- a/pkg/util/template/template.go +++ b/pkg/util/template/template.go @@ -22,17 +22,14 @@ import ( "fmt" "github.com/shurcooL/httpfs/vfsutil" log "github.com/sirupsen/logrus" - "github.com/snowdrop/component-operator/pkg/apis/component/v1alpha1" - // "github.com/snowdrop/component-operator/pkg/util/kubernetes" - // "k8s.io/apimachinery/pkg/runtime" + "github.com/redhat-developer/devopsconsole-operator/pkg/apis/components/v1alpha1" "os" - "strings" "text/template" ) var ( TemplateAssets = Assets - TemplatePath = []string{"innerloop", "servicecatalog","outerloop"} + TemplatePath = []string{"outerloop"} TemplateFiles []string Templates = make(map[string]template.Template) ) @@ -97,17 +94,3 @@ func Parse(t template.Template, obj *v1alpha1.Component) bytes.Buffer { log.Debug("Generated :", b.String()) return b } - -/*func ParseTemplateToRuntimeObject(tmpl template.Template, component *v1alpha1.Component) (runtime.Object, error) { - b := Parse(tmpl, component) - r, err := kubernetes.PopulateKubernetesObjectFromYaml(b.String()) - if err != nil { - return nil, err - } - return r, nil -}*/ - -// -func GetTemplateFullName(artifact string) string { - return strings.Join([]string{"java", artifact}, "/") -} diff --git a/pkg/util/template/tmpl/innerloop/deployment b/pkg/util/template/tmpl/innerloop/deployment deleted file mode 100644 index 75e17fe..0000000 --- a/pkg/util/template/tmpl/innerloop/deployment +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} - name: {{.Name}} -spec: - replicas: 1 - selector: - matchLabels: - app: {{.Name}} - template: - metadata: - labels: - app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} - name: {{.Name}} - spec: - containers: - - args: - - -c - - /var/lib/supervisord/conf/supervisor.conf - command: - - /var/lib/supervisord/bin/supervisord - env: - {{ range .Spec.Envs }} - - name: {{.Name}} - value: {{.Value}} - {{end}} - image: quay.io/snowdrop/spring-boot-s2i:latest - imagePullPolicy: Always - name: {{.Name}} - ports: - - containerPort: {{.Spec.Port}} - protocol: TCP - volumeMounts: - - mountPath: /var/lib/supervisord - name: shared-data - - mountPath: /tmp/artifacts - name: {{.Spec.Storage.Name}} - initContainers: - - env: - - name: CMDS - value: run-java:/usr/local/s2i/run;run-node:/usr/libexec/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp - image: quay.io/snowdrop/supervisord:latest - imagePullPolicy: Always - name: copy-supervisord - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/supervisord - name: shared-data - volumes: - - emptyDir: {} - name: shared-data - - name: {{.Spec.Storage.Name}} - persistentVolumeClaim: - claimName: {{.Spec.Storage.Name}} \ No newline at end of file diff --git a/pkg/util/template/tmpl/innerloop/deploymentconfig b/pkg/util/template/tmpl/innerloop/deploymentconfig deleted file mode 100644 index 90944bc..0000000 --- a/pkg/util/template/tmpl/innerloop/deploymentconfig +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - labels: - app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} - name: {{.Name}} -spec: - replicas: 1 - selector: - app: {{.Name}} - deploymentconfig: {{.Name}} - strategy: - type: Rolling - template: - metadata: - labels: - app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} - deploymentconfig: {{.Name}} - name: {{.Name}} - spec: - containers: - - args: - - -c - - /var/lib/supervisord/conf/supervisor.conf - command: - - /var/lib/supervisord/bin/supervisord - env: - {{ range .Spec.Envs }} - - name: {{.Name}} - value: {{.Value}} - {{end}} - image: {{.Spec.RuntimeName}}:latest - imagePullPolicy: Always - name: {{.Name}} - ports: - - containerPort: {{.Spec.Port}} - protocol: TCP - volumeMounts: - - mountPath: /var/lib/supervisord - name: shared-data - - mountPath: /tmp/artifacts - name: {{.Spec.Storage.Name}} - initContainers: - - env: - - name: CMDS - value: run-java:/usr/local/s2i/run;run-node:/usr/libexec/s2i/run;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp - image: "{{.Spec.SupervisordName}}:latest" - imagePullPolicy: Always - name: copy-supervisord - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/supervisord - name: shared-data - volumes: - - emptyDir: {} - name: shared-data - - name: {{.Spec.Storage.Name}} - persistentVolumeClaim: - claimName: {{.Spec.Storage.Name}} - triggers: - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - copy-supervisord - from: - kind: ImageStreamTag - name: copy-supervisord:latest - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - {{.Name}} - from: - kind: ImageStreamTag - name: {{.Spec.RuntimeName}}:latest \ No newline at end of file diff --git a/pkg/util/template/tmpl/innerloop/imagestream b/pkg/util/template/tmpl/innerloop/imagestream deleted file mode 100644 index d3b3662..0000000 --- a/pkg/util/template/tmpl/innerloop/imagestream +++ /dev/null @@ -1,29 +0,0 @@ -{{$nameApp := .Name }} -{{$labels := .ObjectMeta.Labels }}apiVersion: v1 -kind: List -items: -{{ range .Spec.Images }} -- apiVersion: image.openshift.io/v1 - kind: ImageStream - metadata: - labels: - app: {{$nameApp}}{{ range $key, $value := $labels }} - {{ $key }}: {{ $value }}{{ end }} - name: {{.Name}} - spec: - lookupPolicy: - local: false - {{if .DockerImage}} - tags: - - {{if .AnnotationCmds}} - annotations: - cmds: "run-java:/usr/local/s2i/run;run-node:/usr/libexec/s2i;compile-java:/usr/local/s2i/assemble;build:/deployments/buildapp" - {{end}} - from: - kind: DockerImage - name: {{.Repo}} - importPolicy: {} - name: latest - referencePolicy: - type: Source - {{end}}{{end}} \ No newline at end of file diff --git a/pkg/util/template/tmpl/innerloop/ingress b/pkg/util/template/tmpl/innerloop/ingress deleted file mode 100644 index ac91112..0000000 --- a/pkg/util/template/tmpl/innerloop/ingress +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{.Name}} - labels: - app: {{.Name}}{{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} -spec: - rules: - - host: {{.Name}} - http: - paths: - - path: / - backend: - serviceName: {{.Name}} - servicePort: {{.Spec.Port}} \ No newline at end of file diff --git a/pkg/util/template/tmpl/innerloop/pvc b/pkg/util/template/tmpl/innerloop/pvc deleted file mode 100644 index 421f0e2..0000000 --- a/pkg/util/template/tmpl/innerloop/pvc +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{.Spec.Storage.Name}} - labels: - app: {{.Name}} - name: {{.Name}} - {{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} -spec: - accessModes: - - {{.Spec.Storage.Mode}} - resources: - requests: - storage: {{.Spec.Storage.Capacity}} diff --git a/pkg/util/template/tmpl/innerloop/route b/pkg/util/template/tmpl/innerloop/route deleted file mode 100644 index 8d3e505..0000000 --- a/pkg/util/template/tmpl/innerloop/route +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - name: {{.Name}} - labels: - app: {{.Name}} - name: {{.Name}} - {{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} -spec: - to: - kind: Service - name: {{.Name}} \ No newline at end of file diff --git a/pkg/util/template/tmpl/innerloop/service b/pkg/util/template/tmpl/innerloop/service deleted file mode 100644 index 1e27f36..0000000 --- a/pkg/util/template/tmpl/innerloop/service +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{.Name}} - labels: - app: {{.Name}} - name: {{.Name}} - {{ range $key, $value := .ObjectMeta.Labels }} - {{ $key }}: {{ $value }}{{ end }} -spec: - ports: - - port: {{.Spec.Port}} - protocol: TCP - targetPort: {{.Spec.Port}} - selector: - app: {{.Name}} \ No newline at end of file diff --git a/pkg/util/template/tmpl/servicecatalog/servicebinding b/pkg/util/template/tmpl/servicecatalog/servicebinding deleted file mode 100644 index bba1ac0..0000000 --- a/pkg/util/template/tmpl/servicecatalog/servicebinding +++ /dev/null @@ -1,13 +0,0 @@ -{{$nameApp := .Name }} -{{ range .Spec.Services }}apiVersion: servicecatalog.k8s.io/v1beta1 -kind: ServiceBinding -metadata: - name: {{.Name}} - labels: - app: {{$nameApp}} - name: {{$nameApp}} -spec: - instanceRef: - name: {{.Name}} - secretName: {{.SecretName}} -{{end}} \ No newline at end of file diff --git a/pkg/util/template/tmpl/servicecatalog/serviceinstance b/pkg/util/template/tmpl/servicecatalog/serviceinstance deleted file mode 100644 index 0c914c7..0000000 --- a/pkg/util/template/tmpl/servicecatalog/serviceinstance +++ /dev/null @@ -1,13 +0,0 @@ -{{$nameApp := .Name }} -{{ range .Spec.Services }}apiVersion: servicecatalog.k8s.io/v1beta1 -kind: ServiceInstance -metadata: - name: {{.Name}} - labels: - app: {{$nameApp}} - name: {{$nameApp}} -spec: - clusterServiceClassExternalName: {{.Class}} - clusterServicePlanExternalName: {{.Plan}} - parameters: {{.ParametersJSon}} -{{end}} \ No newline at end of file