model

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Copyright 2020-2021 IBM Corporation

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.

Note: the example only works with the code within the same release/branch.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Index

Constants

View Source
const (
	DefaultThanosURL                         = "https://thanos-querier.openshift-monitoring.svc:9091"
	GrafanaConfigName                        = "grafana-config"
	GrafanaLogVolumes                        = "grafana-log"
	GrafanaDataVolumes                       = "grafana-storage"
	GrafanaDatasourceName                    = "datasource-config"
	GrafanaHealthEndpoint                    = "/api/health"
	DefaultRouterPort                        = 8080
	DefaultClusterPort                 int32 = 8443
	GrafanaAdminSecretName                   = "grafana-secret"
	GrafanaInitMounts                        = "grafana-init-mount"
	GrafanaPlugins                           = "grafana-plugins"
	GrafanaConfigMapsDir                     = "/etc/grafana-configmaps/"
	GrafanaServiceAccountName                = "ibm-monitoring-grafana"
	GrafanaDeploymentName                    = "ibm-monitoring-grafana"
	GrafanaServiceName                       = "ibm-monitoring-grafana"
	GrafanaHTTPPortName                      = "web"
	RequeueDelay                             = time.Second * 10
	DefaultGrafanaPort                 int32 = 3000
	GrafanaRouteName                         = "ibm-monitoring-grafana"
	GrafanaAdminUserEnvVar                   = "username"
	GrafanaAdminPasswordEnvVar               = "password"
	ClusterDomain                            = "cluster.local"
	InitContainerName                        = "init-container"
	DefaultInitImage                         = "quay.io/opencloudio/icp-initcontainer"
	DefaultInitImageTag                      = "1.0.0-build.3"
	DefaultDashboardControllerImage          = "quay.io/opencloudio/dashboard-controller"
	DefaultDashboardControllerImageTag       = "v1.2.0-build.3"
	DefaultBaseImage                         = "quay.io/opencloudio/grafana"
	DefaultBaseImageTag                      = "v6.5.2-build.2"
	DefaultRouterImage                       = "quay.io/opencloudio/icp-management-ingress"
	DefaultRouterImageTag                    = "2.5.1"
	DSProxyConfigSecName                     = "grafana-ds-proxy-config"

	//CS Monitoring resources to be cleanedup
	CollectdDeploymentName           = "ibm-monitoring-collectd"
	KubestateDeploymentName          = "ibm-monitoring-kube-state"
	McmCtlDeploymentName             = "ibm-monitoring-mcm-ctl"
	NodeExporterDaemonSetName        = "ibm-monitoring-nodeexporter"
	PrometheusOperatorDeploymentName = "ibm-monitoring-prometheus-operator"
	PrometheusStatefulSetName        = "prometheus-ibm-monitoring-prometheus"
	AlertManagerStatefulsetName      = "alertmanager-ibm-monitoring-alertmanager"
)

Variables

View Source
var FileKeys fileKeys

FileKeys stores the configmap name and file key

View Source
var GrafanaIngressName string = "grafana-ingress"

Functions

func AlertManagerStatefulset

func AlertManagerStatefulset(cr *v1alpha1.Grafana) *appv1.StatefulSet

func CollectdDeployment

func CollectdDeployment(cr *v1alpha1.Grafana) *appv1.Deployment

func CreateGrafanaSecret

func CreateGrafanaSecret(cr *v1alpha1.Grafana) *corev1.Secret

CreateGrafanaSecret create a secret from the user/passwd from config file

func DSProxyConfigSecret

func DSProxyConfigSecret(cr *v1alpha1.Grafana, osecret *corev1.Secret) (*corev1.Secret, error)

func GetCertificate

func GetCertificate(name string, cr *v1alpha1.Grafana) *cert.Certificate

func GetIngressAnnotations

func GetIngressAnnotations(cr *v1alpha1.Grafana) map[string]string

func GetIngressLabels

func GetIngressLabels(cr *v1alpha1.Grafana) map[string]string

func GrafanaDeployment

func GrafanaDeployment(cr *v1alpha1.Grafana) *appv1.Deployment

func GrafanaDeploymentSelector

func GrafanaDeploymentSelector(cr *v1alpha1.Grafana) client.ObjectKey

func GrafanaIngress

func GrafanaIngress(cr *v1alpha1.Grafana) *ingressv1.Ingress

func GrafanaIngressSelector

func GrafanaIngressSelector(cr *v1alpha1.Grafana) client.ObjectKey

func GrafanaSecretSelector

func GrafanaSecretSelector(cr *v1alpha1.Grafana) client.ObjectKey

GrafanaSecretSelector to retrieve the secret

func GrafanaService

func GrafanaService(cr *v1alpha1.Grafana) *corev1.Service

func GrafanaServiceSelector

func GrafanaServiceSelector(cr *v1alpha1.Grafana) client.ObjectKey

func IssuerName

func IssuerName(cr *v1alpha1.Grafana) string

func IssuerType

func IssuerType(cr *v1alpha1.Grafana) string

func KubestateDeployment

func KubestateDeployment(cr *v1alpha1.Grafana) *appv1.Deployment

func McmCtlDeployment

func McmCtlDeployment(cr *v1alpha1.Grafana) *appv1.Deployment

func NodeExporterDaemonSet

func NodeExporterDaemonSet(cr *v1alpha1.Grafana) *appv1.DaemonSet

func PrometheusOperatorDeployment

func PrometheusOperatorDeployment(cr *v1alpha1.Grafana) *appv1.Deployment

func PrometheusStatefulSet

func PrometheusStatefulSet(cr *v1alpha1.Grafana) *appv1.StatefulSet

func ReconcileConfigMaps

func ReconcileConfigMaps(cr *v1alpha1.Grafana) []*corev1.ConfigMap

ReconcileConfigMaps will reconcile all the confimaps for the grafana. There is not selector to retrieve all the configmaps. Just update them with a switch of IsConfigMapsDone variable.

func ReconciledGrafanaDeployment

func ReconciledGrafanaDeployment(cr *v1alpha1.Grafana, current *appv1.Deployment) *appv1.Deployment

func ReconciledGrafanaIngress

func ReconciledGrafanaIngress(cr *v1alpha1.Grafana, current *ingressv1.Ingress) *ingressv1.Ingress

func ReconciledGrafanaService

func ReconciledGrafanaService(cr *v1alpha1.Grafana, current *corev1.Service) *corev1.Service

func ThanosURL

func ThanosURL(cr *v1alpha1.Grafana) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL