forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
4,992 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: clickhouse | ||
labels: | ||
app: clickhouse | ||
spec: | ||
configuration: | ||
clusters: | ||
- name: "clickhouse" | ||
layout: | ||
shardsCount: 1 | ||
replicasCount: 1 | ||
defaults: | ||
templates: | ||
podTemplate: pod-template | ||
templates: | ||
podTemplates: | ||
- name: pod-template | ||
spec: | ||
containers: | ||
- name: clickhouse | ||
image: yandex/clickhouse-server:21.11 | ||
volumeMounts: | ||
- name: clickhouse-configmap-volume | ||
mountPath: /docker-entrypoint-initdb.d | ||
volumes: | ||
- name: clickhouse-configmap-volume | ||
configMap: | ||
name: $(CH_CONF) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: flow-visibility | ||
|
||
resources: | ||
- clickhouse.yaml | ||
- grafana.yaml | ||
|
||
configMapGenerator: | ||
- name: grafana-datasource-provider | ||
files: | ||
- provisioning/datasources/datasource_provider.yaml | ||
- name: grafana-dashboard-provider | ||
files: | ||
- provisioning/dashboards/dashboard_provider.yaml | ||
- name: clickhouse-mounted-configmap | ||
namespace: flow-visibility | ||
files: | ||
- provisioning/datasources/create_table.sh | ||
- name: grafana-dashboard-config | ||
files: | ||
- provisioning/dashboards/flow_records_dashboard.json | ||
- provisioning/dashboards/pod_to_pod_dashboard.json | ||
- provisioning/dashboards/pod_to_service_dashboard.json | ||
- provisioning/dashboards/pod_to_external_dashboard.json | ||
- provisioning/dashboards/node_to_node_dashboard.json | ||
- provisioning/dashboards/networkpolicy_allow_dashboard.json | ||
|
||
# CH_CONF exports the value in `metadata.name` from `ConfigMap` named `clickhouse-mounted-configmap`, | ||
# which is used for inserting the value to a CRD for an object of kind `ClickHouseInstallation` | ||
vars: | ||
- name: CH_CONF | ||
objref: | ||
kind: ConfigMap | ||
name: clickhouse-mounted-configmap | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: metadata.name | ||
|
||
configurations: | ||
- kustomize-config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
varReference: | ||
- path: spec/templates/podTemplates/spec/volumes/configMap/name | ||
kind: ClickHouseInstallation |
8 changes: 8 additions & 0 deletions
8
build/yamls/flow-visibility/base/provisioning/dashboards/dashboard_provider.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: 1 | ||
providers: | ||
- name: grafana-dashboards | ||
folder: '' | ||
type: file | ||
allowUiUpdates: true | ||
options: | ||
path: /var/lib/grafana/dashboards |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../provisioning/datasources/create_table.sh → .../provisioning/datasources/create_table.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
build/yamls/flow-visibility/base/provisioning/datasources/datasource_provider.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: 1 | ||
datasources: | ||
- name: ClickHouse | ||
type: grafana-clickhouse-datasource | ||
access: proxy | ||
url: http://clickhouse-clickhouse.flow-visibility.svc:8123 | ||
editable: true | ||
jsonData: | ||
server: clickhouse-clickhouse.flow-visibility.svc | ||
port: 9000 | ||
username: $CH_USERNAME | ||
secureJsonData: | ||
password: $CH_PASSWORD |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2022 Antrea 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. | ||
|
||
set -eo pipefail | ||
|
||
function echoerr { | ||
>&2 echo "$@" | ||
} | ||
|
||
_usage="Usage: $0 [--help|-h] | ||
Generate a YAML manifest for the Clickhouse-Grafana Flow-visibility Solution, using Kustomize, and | ||
print it to stdout. | ||
This tool uses kustomize (https://github.com/kubernetes-sigs/kustomize) to generate manifests for | ||
Clickhouse-Grafana Flow-visibility Solution. You can set the KUSTOMIZE environment variable to the | ||
path of the kustomize binary you want us to use. Otherwise we will look for kustomize in your PATH | ||
and your GOPATH. If we cannot find kustomize there, we will try to install it." | ||
|
||
function print_usage { | ||
echoerr "$_usage" | ||
} | ||
|
||
function print_help { | ||
echoerr "Try '$0 --help' for more information." | ||
} | ||
|
||
while [[ $# -gt 0 ]] | ||
do | ||
key="$1" | ||
|
||
case $key in | ||
-h|--help) | ||
print_usage | ||
exit 0 | ||
;; | ||
*) # unknown option | ||
echoerr "Unknown option $1" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
source $THIS_DIR/verify-kustomize.sh | ||
|
||
if [ -z "$KUSTOMIZE" ]; then | ||
KUSTOMIZE="$(verify_kustomize)" | ||
elif ! $KUSTOMIZE version > /dev/null 2>&1; then | ||
echoerr "$KUSTOMIZE does not appear to be a valid kustomize binary" | ||
print_help | ||
exit 1 | ||
fi | ||
|
||
KUSTOMIZATION_DIR=$THIS_DIR/../build/yamls/flow-visibility | ||
|
||
cd $KUSTOMIZATION_DIR/base | ||
|
||
$KUSTOMIZE build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters