blob: 72750fce4418b4b96c648dc14dee7d2fce331f61 [file] [log] [blame]
// Licensed to 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. Apache Software Foundation (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.
// Code generated by go-bindata. DO NOT EDIT.
// sources:
// oapserver/templates/cluster_role.yaml (1.241kB)
// oapserver/templates/cluster_role_binding.yaml (1.207kB)
// oapserver/templates/deployment.yaml (2.695kB)
// oapserver/templates/service.yaml (1.324kB)
// oapserver/templates/service_account.yaml (1.09kB)
// ui/templates/deployment.yaml (2.235kB)
// ui/templates/ingress.yaml (1.76kB)
// ui/templates/service.yaml (1.112kB)
package repo
import (
"crypto/sha256"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
)
type asset struct {
bytes []byte
info os.FileInfo
digest [sha256.Size]byte
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
func (fi bindataFileInfo) Name() string {
return fi.name
}
func (fi bindataFileInfo) Size() int64 {
return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
return false
}
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _oapserverTemplatesCluster_roleYaml = []byte(`# Licensed to 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. Apache Software Foundation (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.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: swck:oapserver
labels:
operator.skywalking.apache.org/application: oapserver
operator.skywalking.apache.org/component: rbac
rules:
- apiGroups: [""]
resources: ["pods", "endpoints", "services"]
verbs: ["get", "watch", "list"]
- apiGroups: ["extensions"]
resources: ["deployments", "replicasets"]
verbs: ["get", "watch", "list"]
`)
func oapserverTemplatesCluster_roleYamlBytes() ([]byte, error) {
return _oapserverTemplatesCluster_roleYaml, nil
}
func oapserverTemplatesCluster_roleYaml() (*asset, error) {
bytes, err := oapserverTemplatesCluster_roleYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "oapserver/templates/cluster_role.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb5, 0xde, 0x59, 0x47, 0x2c, 0x69, 0xe9, 0xcd, 0x7e, 0xa7, 0x4, 0xf7, 0xf2, 0xa0, 0x1a, 0x1b, 0xb6, 0xa3, 0x42, 0xb3, 0x20, 0x49, 0x9b, 0x2f, 0x81, 0x87, 0xa0, 0x95, 0x73, 0x49, 0x6a, 0xdb}}
return a, nil
}
var _oapserverTemplatesCluster_role_bindingYaml = []byte(`# Licensed to 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. Apache Software Foundation (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.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: swck:oapserver
labels:
operator.skywalking.apache.org/application: oapserver
operator.skywalking.apache.org/component: rbac
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: swck:oapserver
subjects:
- kind: ServiceAccount
name: {{ .Name }}-oap
namespace: {{ .Namespace }}
`)
func oapserverTemplatesCluster_role_bindingYamlBytes() ([]byte, error) {
return _oapserverTemplatesCluster_role_bindingYaml, nil
}
func oapserverTemplatesCluster_role_bindingYaml() (*asset, error) {
bytes, err := oapserverTemplatesCluster_role_bindingYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "oapserver/templates/cluster_role_binding.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf8, 0x15, 0xc5, 0xe0, 0xe7, 0x4e, 0xeb, 0xed, 0x61, 0xda, 0xad, 0x6c, 0x43, 0xf, 0x80, 0x5, 0x4c, 0x47, 0xbc, 0x20, 0xe7, 0xc6, 0xdf, 0x63, 0xcf, 0x9b, 0x54, 0x56, 0x1f, 0x4, 0xbf, 0x1c}}
return a, nil
}
var _oapserverTemplatesDeploymentYaml = []byte(`# Licensed to 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. Apache Software Foundation (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.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Name }}-oap
namespace: {{ .Namespace }}
labels:
app: oap
operator.skywalking.apache.org/oap-server-name: {{ .Name }}
operator.skywalking.apache.org/application: oapserver
operator.skywalking.apache.org/component: deployment
spec:
replicas: {{ .Spec.Instances }}
minReadySeconds: 5
selector:
matchLabels:
app: oap
operator.skywalking.apache.org/oap-server-name: {{ .Name }}
template:
metadata:
labels:
app: oap
operator.skywalking.apache.org/oap-server-name: {{ .Name }}
operator.skywalking.apache.org/application: oapserver
operator.skywalking.apache.org/component: deployment
spec:
serviceAccountName: {{ .Name }}-oap
containers:
- name: oap
image: {{ .Spec.Image }}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 11800
name: grpc
- containerPort: 12800
name: rest
- containerPort: 1234
name: http-monitoring
livenessProbe:
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 10
successThreshold: 1
exec:
command:
- /skywalking/bin/swctl
- ch
readinessProbe:
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 10
successThreshold: 1
exec:
command:
- /skywalking/bin/swctl
- ch
env:
- name: JAVA_OPTS
value: -Xmx2048M
- name: SW_TELEMETRY
value: prometheus
- name: SW_HEALTH_CHECKER
value: default
{{range .Spec.Config}}
- name: {{ .Name }}
value: {{ .Value }}
{{end}}
`)
func oapserverTemplatesDeploymentYamlBytes() ([]byte, error) {
return _oapserverTemplatesDeploymentYaml, nil
}
func oapserverTemplatesDeploymentYaml() (*asset, error) {
bytes, err := oapserverTemplatesDeploymentYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "oapserver/templates/deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xda, 0x3, 0x5e, 0xcd, 0xf8, 0xab, 0x5c, 0x26, 0x20, 0x39, 0xee, 0x1c, 0x45, 0x3e, 0xdb, 0x21, 0x3c, 0xcb, 0xf8, 0x9c, 0x44, 0xd3, 0x4c, 0x81, 0xcc, 0x5b, 0xb2, 0xea, 0x90, 0xba, 0x93, 0x33}}
return a, nil
}
var _oapserverTemplatesServiceYaml = []byte(`# Licensed to 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. Apache Software Foundation (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.
apiVersion: v1
kind: Service
metadata:
name: {{ .Name }}-oap
namespace: {{ .Namespace }}
labels:
app: oap
operator.skywalking.apache.org/oap-server-name: {{ .Name }}
operator.skywalking.apache.org/application: oapserver
operator.skywalking.apache.org/component: service
spec:
type: ClusterIP
ports:
- port: 12800
name: rest
- port: 11800
name: grpc
- port: 1234
name: http-monitoring
selector:
app: oap
operator.skywalking.apache.org/oap-server-name: {{ .Name }}
`)
func oapserverTemplatesServiceYamlBytes() ([]byte, error) {
return _oapserverTemplatesServiceYaml, nil
}
func oapserverTemplatesServiceYaml() (*asset, error) {
bytes, err := oapserverTemplatesServiceYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "oapserver/templates/service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe5, 0xf4, 0x9d, 0x3a, 0x24, 0x7f, 0x70, 0xa8, 0x42, 0x9f, 0xcb, 0xb7, 0xd9, 0x99, 0x44, 0x3, 0xda, 0xee, 0x5b, 0x11, 0x88, 0x3d, 0xd0, 0x23, 0x5, 0xc8, 0xde, 0xb3, 0x79, 0x11, 0x29, 0xf7}}
return a, nil
}
var _oapserverTemplatesService_accountYaml = []byte(`# Licensed to 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. Apache Software Foundation (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.
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Name }}-oap
namespace: {{ .Namespace }}
labels:
operator.skywalking.apache.org/oap-server-name: {{ .Name }}
operator.skywalking.apache.org/application: oapserver
operator.skywalking.apache.org/component: rbac
`)
func oapserverTemplatesService_accountYamlBytes() ([]byte, error) {
return _oapserverTemplatesService_accountYaml, nil
}
func oapserverTemplatesService_accountYaml() (*asset, error) {
bytes, err := oapserverTemplatesService_accountYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "oapserver/templates/service_account.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x35, 0x3b, 0x36, 0x6, 0xcc, 0x9, 0x84, 0x7d, 0x62, 0x48, 0x31, 0xcf, 0x17, 0xec, 0xd1, 0xdd, 0x83, 0x0, 0x86, 0x6a, 0x50, 0xd5, 0xb6, 0x4a, 0x23, 0xdc, 0xea, 0xd, 0x80, 0x87, 0x2, 0x24}}
return a, nil
}
var _uiTemplatesDeploymentYaml = []byte(`# Licensed to 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. Apache Software Foundation (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.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Name }}-ui
namespace: {{ .Namespace }}
labels:
app: ui
operator.skywalking.apache.org/ui-name: {{ .Name }}
operator.skywalking.apache.org/application: ui
operator.skywalking.apache.org/component: deployment
spec:
replicas: {{ .Spec.Instances }}
minReadySeconds: 5
selector:
matchLabels:
app: ui
operator.skywalking.apache.org/ui-name: {{ .Name }}
template:
metadata:
labels:
app: ui
operator.skywalking.apache.org/ui-name: {{ .Name }}
operator.skywalking.apache.org/application: ui
operator.skywalking.apache.org/component: deployment
spec:
containers:
- name: ui
image: {{ .Spec.Image }}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
name: page
livenessProbe:
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 3
successThreshold: 1
httpGet:
path: /
port: 8080
readinessProbe:
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 3
successThreshold: 1
httpGet:
path: /
port: 8080
env:
- name: SW_OAP_ADDRESS
value: {{ .Spec.OAPServerAddress }}
`)
func uiTemplatesDeploymentYamlBytes() ([]byte, error) {
return _uiTemplatesDeploymentYaml, nil
}
func uiTemplatesDeploymentYaml() (*asset, error) {
bytes, err := uiTemplatesDeploymentYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "ui/templates/deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x69, 0xdf, 0x8d, 0x6a, 0xbf, 0x74, 0x8f, 0xc4, 0xd1, 0x15, 0x6c, 0x96, 0x23, 0x71, 0x53, 0x46, 0xfa, 0xe6, 0x35, 0xec, 0x23, 0x23, 0xce, 0x87, 0xfd, 0xbb, 0xb4, 0xc, 0x7e, 0x3a, 0xb9, 0x14}}
return a, nil
}
var _uiTemplatesIngressYaml = []byte(`# Licensed to 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. Apache Software Foundation (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.
{{- $ingress := .Spec.Service.Ingress }}
{{ if $ingress.Host }}
{{- $svc := .Spec.Service.ServiceSpec }}
{{- $port := index $svc.Ports 0 }}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ .Name }}-ui
namespace: {{ .Namespace }}
labels:
app: ui
operator.skywalking.apache.org/ui-name: {{ .Name }}
operator.skywalking.apache.org/application: ui
operator.skywalking.apache.org/component: deployment
annotations:
{{- range $key, $value := $ingress.Annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
- host: {{ $ingress.Host }}
http:
paths:
- path: /*
backend:
serviceName: {{ .Name }}-ui
servicePort: {{ $port.Port }}
{{- if $ingress.IngressClassName }}
ingressClassName: {{ $ingress.IngressClassName }}
{{end}}
{{- if $ingress.TLS }}
tls:
{{ toYAML $ingress.TLS | indent 4 }}
{{end}}
{{end}}
`)
func uiTemplatesIngressYamlBytes() ([]byte, error) {
return _uiTemplatesIngressYaml, nil
}
func uiTemplatesIngressYaml() (*asset, error) {
bytes, err := uiTemplatesIngressYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "ui/templates/ingress.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x30, 0xf0, 0xdb, 0xbf, 0xd4, 0x6f, 0x55, 0xde, 0xbd, 0x89, 0xac, 0x86, 0xd4, 0x33, 0xcd, 0xda, 0xf3, 0xa6, 0x2d, 0x39, 0x60, 0xfa, 0x37, 0x8e, 0xf0, 0x61, 0x45, 0xe7, 0x28, 0x7e, 0xfe, 0xbb}}
return a, nil
}
var _uiTemplatesServiceYaml = []byte(`# 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.
apiVersion: v1
kind: Service
metadata:
name: {{ .Name }}-ui
namespace: {{ .Namespace }}
labels:
app: ui
operator.skywalking.apache.org/ui-name: {{ .Name }}
operator.skywalking.apache.org/application: ui
operator.skywalking.apache.org/component: service
spec:
{{ toYAML .Spec.Service.ServiceSpec | indent 2 }}`)
func uiTemplatesServiceYamlBytes() ([]byte, error) {
return _uiTemplatesServiceYaml, nil
}
func uiTemplatesServiceYaml() (*asset, error) {
bytes, err := uiTemplatesServiceYamlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "ui/templates/service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x60, 0x12, 0x23, 0x84, 0x64, 0x67, 0xa8, 0x47, 0x72, 0x7b, 0x5d, 0xe7, 0x4b, 0xa3, 0xea, 0x15, 0xe5, 0x29, 0x40, 0xf9, 0xbe, 0x5a, 0x6f, 0xb9, 0x5b, 0x83, 0x1c, 0xca, 0x2c, 0xa7, 0xc1, 0x5b}}
return a, nil
}
// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not found", name)
}
// AssetString returns the asset contents as a string (instead of a []byte).
func AssetString(name string) (string, error) {
data, err := Asset(name)
return string(data), err
}
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
}
// MustAssetString is like AssetString but panics when Asset would return an
// error. It simplifies safe initialization of global variables.
func MustAssetString(name string) string {
return string(MustAsset(name))
}
// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("AssetInfo %s not found", name)
}
// AssetDigest returns the digest of the file with the given name. It returns an
// error if the asset could not be found or the digest could not be loaded.
func AssetDigest(name string) ([sha256.Size]byte, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err)
}
return a.digest, nil
}
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name)
}
// Digests returns a map of all known files and their checksums.
func Digests() (map[string][sha256.Size]byte, error) {
mp := make(map[string][sha256.Size]byte, len(_bindata))
for name := range _bindata {
a, err := _bindata[name]()
if err != nil {
return nil, err
}
mp[name] = a.digest
}
return mp, nil
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"oapserver/templates/cluster_role.yaml": oapserverTemplatesCluster_roleYaml,
"oapserver/templates/cluster_role_binding.yaml": oapserverTemplatesCluster_role_bindingYaml,
"oapserver/templates/deployment.yaml": oapserverTemplatesDeploymentYaml,
"oapserver/templates/service.yaml": oapserverTemplatesServiceYaml,
"oapserver/templates/service_account.yaml": oapserverTemplatesService_accountYaml,
"ui/templates/deployment.yaml": uiTemplatesDeploymentYaml,
"ui/templates/ingress.yaml": uiTemplatesIngressYaml,
"ui/templates/service.yaml": uiTemplatesServiceYaml,
}
// AssetDebug is true if the assets were built with the debug flag enabled.
const AssetDebug = false
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
// then AssetDir("data") would return []string{"foo.txt", "img"},
// AssetDir("data/img") would return []string{"a.png", "b.png"},
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
canonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(canonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
}
}
if node.Func != nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}
type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
"oapserver": &bintree{nil, map[string]*bintree{
"templates": &bintree{nil, map[string]*bintree{
"cluster_role.yaml": &bintree{oapserverTemplatesCluster_roleYaml, map[string]*bintree{}},
"cluster_role_binding.yaml": &bintree{oapserverTemplatesCluster_role_bindingYaml, map[string]*bintree{}},
"deployment.yaml": &bintree{oapserverTemplatesDeploymentYaml, map[string]*bintree{}},
"service.yaml": &bintree{oapserverTemplatesServiceYaml, map[string]*bintree{}},
"service_account.yaml": &bintree{oapserverTemplatesService_accountYaml, map[string]*bintree{}},
}},
}},
"ui": &bintree{nil, map[string]*bintree{
"templates": &bintree{nil, map[string]*bintree{
"deployment.yaml": &bintree{uiTemplatesDeploymentYaml, map[string]*bintree{}},
"ingress.yaml": &bintree{uiTemplatesIngressYaml, map[string]*bintree{}},
"service.yaml": &bintree{uiTemplatesServiceYaml, map[string]*bintree{}},
}},
}},
}}
// RestoreAsset restores an asset under the given directory.
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
}
// RestoreAssets restores an asset under the given directory recursively.
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
}
func _filePath(dir, name string) string {
canonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
}