hanahmily commented on a change in pull request #4514: Add selector property in 
application.yml
URL: https://github.com/apache/skywalking/pull/4514#discussion_r392642632
 
 

 ##########
 File path: docker/oap-es7/docker-entrypoint.sh
 ##########
 @@ -294,202 +33,51 @@ validateVariables() {
     fi
 }
 
-generateApplicationYaml() {
-    # validate
-    [[ -z "$SW_CLUSTER" ]] && [[ -z "$SW_STORAGE" ]] && [[ -z 
"$SW_CONFIGURATION" ]] \
-        && [[ -z "$SW_TELEMETRY" ]] \
-        && { echo "Error: please specify \"SW_CLUSTER\" \"SW_STORAGE\" 
\"SW_CONFIGURATION\" \"SW_TELEMETRY\""; exit 1; }
-
-    validateVariables "SW_CLUSTER" "$SW_CLUSTER" "standalone zookeeper 
kubernetes consul etcd nacos"
-
-    validateVariables "SW_STORAGE" "$SW_STORAGE" "elasticsearch h2 mysql 
influxdb"
-
-    validateVariables "SW_CONFIGURATION" "$SW_CONFIGURATION" "none apollo 
nacos zookeeper"
-
-    validateVariables "SW_TELEMETRY" "$SW_TELEMETRY" "none prometheus so11y"
+echo "[Entrypoint] Apache SkyWalking Docker Image"
 
-    echo "# Generated by 'docker-entrypoint.sh'" > ${var_application_file}
-    #generate cluster
-    case ${SW_CLUSTER} in
-    standalone) generateClusterStandalone;;
-    zookeeper) generateClusterZookeeper;;
-    kubernetes) generateClusterK8s;;
-    consul) generateClusterConsul;;
-    etcd) generateClusterEtcd;;
-    nacos) generateClusterNacos;;
-    esac
+# validate
+[[ -z "$SW_CLUSTER" ]] || [[ -z "$SW_STORAGE" ]] || [[ -z "$SW_CONFIGURATION" 
]] \
+    || [[ -z "$SW_TELEMETRY" ]] \
+    && { echo "Error: please specify \"SW_CLUSTER\" \"SW_STORAGE\" 
\"SW_CONFIGURATION\" \"SW_TELEMETRY\""; exit 1; }
 
-    #generate core
-    cat <<EOT >> ${var_application_file}
-core:
-  default:
-    # Mixed: Receive agent data, Level 1 aggregate, Level 2 aggregate
-    # Receiver: Receive agent data, Level 1 aggregate
-    # Aggregator: Level 2 aggregate
-    role: \${SW_CORE_ROLE:Mixed} # Mixed/Receiver/Aggregator
-    restHost: \${SW_CORE_REST_HOST:0.0.0.0}
-    restPort: \${SW_CORE_REST_PORT:12800}
-    restContextPath: \${SW_CORE_REST_CONTEXT_PATH:/}
-    gRPCHost: \${SW_CORE_GRPC_HOST:0.0.0.0}
-    gRPCPort: \${SW_CORE_GRPC_PORT:11800}
-    gRPCSslEnabled: \${SW_CORE_GRPC_SSL_ENABLED:false}
-    gRPCSslKeyPath: \${SW_CORE_GRPC_SSL_KEY_PATH:""}
-    gRPCSslCertChainPath: \${SW_CORE_GRPC_SSL_CERT_CHAIN_PATH:""}
-    gRPCSslTrustedCAPath: \${SW_CORE_GRPC_SSL_TRUSTED_CA_PATH:""}
-    downsampling:
-    - Hour
-    - Day
-    - Month
-    # Set a timeout on metrics data. After the timeout has expired, the 
metrics data will automatically be deleted.
-    enableDataKeeperExecutor: \${SW_CORE_ENABLE_DATA_KEEPER_EXECUTOR:true} # 
Turn it off then automatically metrics data delete will be close.
-    dataKeeperExecutePeriod: \${SW_CORE_DATA_KEEPER_EXECUTE_PERIOD:5} # How 
often the data keeper executor runs periodically, unit is minute
-    recordDataTTL: \${SW_CORE_RECORD_DATA_TTL:90} # Unit is minute
-    minuteMetricsDataTTL: \${SW_CORE_MINUTE_METRIC_DATA_TTL:90} # Unit is 
minute
-    hourMetricsDataTTL: \${SW_CORE_HOUR_METRIC_DATA_TTL:36} # Unit is hour
-    dayMetricsDataTTL: \${SW_CORE_DAY_METRIC_DATA_TTL:45} # Unit is day
-    monthMetricsDataTTL: \${SW_CORE_MONTH_METRIC_DATA_TTL:18} # Unit is month
-    # Cache metric data for 1 minute to reduce database queries, and if the 
OAP cluster changes within that minute,
-    # the metrics may not be accurate within that minute.
-    enableDatabaseSession: \${SW_CORE_ENABLE_DATABASE_SESSION:true}
-    topNReportPeriod: \${SW_CORE_TOPN_REPORT_PERIOD:10}
-EOT
+validateVariables "SW_CLUSTER" "$SW_CLUSTER" "standalone zookeeper kubernetes 
consul etcd nacos"
 
 Review comment:
   remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to