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.
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.
Copyright 2020 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.
Copyright 2020 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.
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.
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.
Copyright 2020 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.
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.
Copyright 2020 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.
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.
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.
Index ¶
- Constants
- Variables
- func AlertManagerStatefulset(cr *v1alpha1.Grafana) *appv1.StatefulSet
- func CollectdDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
- func CreateGrafanaSecret(cr *v1alpha1.Grafana) *corev1.Secret
- func DSProxyConfigSecret(cr *v1alpha1.Grafana, osecret *corev1.Secret) (*corev1.Secret, error)
- func GetCertificate(name string, cr *v1alpha1.Grafana) *cert.Certificate
- func GetIngressAnnotations(cr *v1alpha1.Grafana) map[string]string
- func GetIngressLabels(cr *v1alpha1.Grafana) map[string]string
- func GrafanaDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
- func GrafanaDeploymentSelector(cr *v1alpha1.Grafana) client.ObjectKey
- func GrafanaIngress(cr *v1alpha1.Grafana) *ingressv1.Ingress
- func GrafanaIngressSelector(cr *v1alpha1.Grafana) client.ObjectKey
- func GrafanaSecretSelector(cr *v1alpha1.Grafana) client.ObjectKey
- func GrafanaService(cr *v1alpha1.Grafana) *corev1.Service
- func GrafanaServiceSelector(cr *v1alpha1.Grafana) client.ObjectKey
- func IssuerName(cr *v1alpha1.Grafana) string
- func IssuerType(cr *v1alpha1.Grafana) string
- func KubestateDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
- func McmCtlDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
- func NodeExporterDaemonSet(cr *v1alpha1.Grafana) *appv1.DaemonSet
- func PrometheusOperatorDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
- func PrometheusStatefulSet(cr *v1alpha1.Grafana) *appv1.StatefulSet
- func ReconcileConfigMaps(cr *v1alpha1.Grafana) []*corev1.ConfigMap
- func ReconciledGrafanaDeployment(cr *v1alpha1.Grafana, current *appv1.Deployment) *appv1.Deployment
- func ReconciledGrafanaIngress(cr *v1alpha1.Grafana, current *ingressv1.Ingress) *ingressv1.Ingress
- func ReconciledGrafanaService(cr *v1alpha1.Grafana, current *corev1.Service) *corev1.Service
- func ThanosURL(cr *v1alpha1.Grafana) string
Constants ¶
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 ¶
var FileKeys fileKeys
FileKeys stores the configmap name and file key
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 ¶
CreateGrafanaSecret create a secret from the user/passwd from config file
func DSProxyConfigSecret ¶
func GetCertificate ¶
func GetCertificate(name string, cr *v1alpha1.Grafana) *cert.Certificate
func GrafanaDeployment ¶
func GrafanaDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
func GrafanaSecretSelector ¶
GrafanaSecretSelector to retrieve the secret
func IssuerName ¶
func IssuerType ¶
func KubestateDeployment ¶
func KubestateDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
func McmCtlDeployment ¶
func McmCtlDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
func PrometheusOperatorDeployment ¶
func PrometheusOperatorDeployment(cr *v1alpha1.Grafana) *appv1.Deployment
func PrometheusStatefulSet ¶
func PrometheusStatefulSet(cr *v1alpha1.Grafana) *appv1.StatefulSet
func ReconcileConfigMaps ¶
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
Types ¶
This section is empty.