Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENTESB-11263: Add scheduled to CR for meta, server, ui and s2i #6512

Merged
merged 3 commits into from Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -21,6 +21,7 @@ spec:
registry: docker.io
# Component specific configuration
components:
scheduled: true
db:
resources:
limits:
Expand Down Expand Up @@ -48,4 +49,4 @@ spec:
volumeCapacity: 1Gi
upgrade:
resources:
volumeCapacity: 1Gi
volumeCapacity: 1Gi
Expand Up @@ -55,6 +55,7 @@ type IntegrationSpec struct {
}

type ComponentsSpec struct {
Scheduled bool `json:"scheduled,omitempty"`
Server ServerConfiguration `json:"server,omitempty"`
Meta MetaConfiguration `json:"meta,omitempty"`
UI UIConfiguration `json:"ui,omitempty"`
Expand Down
Expand Up @@ -19,9 +19,11 @@
from:
kind: DockerImage
name: '{{ .Syndesis.Spec.Registry }}/{{ .Images.SyndesisImagesPrefix }}/{{ .Images.Syndesis.Rest }}:{{ .Syndesis.Spec.Components.Server.Tag }}'
{{if .Syndesis.Spec.Components.Scheduled}}
importPolicy:
scheduled: true
{{end}}
{{end}}
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
Expand All @@ -43,9 +45,11 @@
from:
kind: DockerImage
name: '{{ .Syndesis.Spec.Registry }}/{{ .Images.SyndesisImagesPrefix }}/{{ .Images.Syndesis.Ui }}:{{ .Syndesis.Spec.Components.UI.Tag }}'
{{if .Syndesis.Spec.Components.Scheduled}}
importPolicy:
scheduled: true
{{end}}
{{end}}
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
Expand All @@ -67,9 +71,11 @@
from:
kind: DockerImage
name: '{{ .Syndesis.Spec.Registry }}/{{ .Images.SyndesisImagesPrefix }}/{{ .Images.Syndesis.Verifier }}:{{ .Syndesis.Spec.Components.Meta.Tag }}'
{{if .Syndesis.Spec.Components.Scheduled}}
importPolicy:
scheduled: true
{{end}}
{{end}}
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
Expand Down Expand Up @@ -101,8 +107,10 @@
- from:
kind: DockerImage
name: '{{.Syndesis.Spec.Registry}}/{{.Images.PrometheusImagePrefix}}/{{ .Images.Support.Prometheus }}:{{ .Syndesis.Spec.Components.Prometheus.Tag }}'
{{if .Syndesis.Spec.Components.Scheduled}}
importPolicy:
scheduled: true
{{end}}
name: "{{ .Syndesis.Spec.Components.Prometheus.Tag }}"
- apiVersion: image.openshift.io/v1
kind: ImageStream
Expand All @@ -118,8 +126,10 @@
- from:
kind: DockerImage
name: '{{.Syndesis.Spec.Registry}}/{{.Images.PostgresExporterImagePrefix}}/{{ .Images.Support.PostgresExporter }}:{{ .Syndesis.Spec.Components.PostgresExporter.Tag }}'
{{if .Syndesis.Spec.Components.Scheduled}}
importPolicy:
scheduled: true
{{end}}
name: "{{ .Syndesis.Spec.Components.PostgresExporter.Tag }}"
- apiVersion: image.openshift.io/v1
kind: ImageStream
Expand All @@ -142,6 +152,8 @@
from:
kind: DockerImage
name: '{{.Syndesis.Spec.Registry}}/{{ .Images.SyndesisImagesPrefix }}/{{ .Images.Syndesis.S2i }}:{{ .Syndesis.Spec.Components.S2I.Tag }}'
{{if .Syndesis.Spec.Components.Scheduled}}
importPolicy:
scheduled: true
{{end}}
{{end}}
4 changes: 3 additions & 1 deletion install/operator/pkg/generator/assets/install/app.yml.tmpl
Expand Up @@ -3,4 +3,6 @@ kind: Syndesis
metadata:
name: app
spec:
devSupport: {{.DevSupport}}
devImages: {{.DevImages}}
components:
scheduled: true
36 changes: 0 additions & 36 deletions install/operator/pkg/generator/assets_vfsdata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions install/operator/pkg/generator/generator.go
Expand Up @@ -5,18 +5,19 @@ package generator
import (
"bytes"
"fmt"
"github.com/hoisie/mustache"
"github.com/pkg/errors"
"github.com/syndesisio/syndesis/install/operator/pkg/apis/syndesis/v1alpha1"
"github.com/syndesisio/syndesis/install/operator/pkg/util"
"io/ioutil"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"net/http"
"reflect"
"sigs.k8s.io/yaml"
"sort"
"strings"
"text/template"

"github.com/hoisie/mustache"
"github.com/pkg/errors"
"github.com/syndesisio/syndesis/install/operator/pkg/apis/syndesis/v1alpha1"
"github.com/syndesisio/syndesis/install/operator/pkg/util"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/yaml"
)

type supportImages struct {
Expand Down