-
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
1 parent
1c24583
commit e2c8f47
Showing
4 changed files
with
80 additions
and
0 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
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,47 @@ | ||
########################################################### | ||
#ENV VARS | ||
########################################################### | ||
envValue=$1 | ||
APP_NAME=$2 | ||
OPENSHIFT_NAMESPACE=$3 | ||
COMMON_NAMESPACE=$4 | ||
BUSINESS_NAMESPACE=$5 | ||
SPLUNK_TOKEN=$6 | ||
APP_LOG_LEVEL=$7 | ||
|
||
SPLUNK_URL="gww.splunk.educ.gov.bc.ca" | ||
FLB_CONFIG="[SERVICE] | ||
Flush 1 | ||
Daemon Off | ||
Log_Level info | ||
HTTP_Server On | ||
HTTP_Listen 0.0.0.0 | ||
Parsers_File parsers.conf | ||
[INPUT] | ||
Name tail | ||
Path /mnt/log/* | ||
Exclude_Path *.gz,*.zip | ||
Parser docker | ||
Mem_Buf_Limit 20MB | ||
[FILTER] | ||
Name record_modifier | ||
Match * | ||
Record hostname \${HOSTNAME} | ||
[OUTPUT] | ||
Name stdout | ||
Match absolutely_nothing_bud | ||
Log_Level off | ||
" | ||
PARSER_CONFIG=" | ||
[PARSER] | ||
Name docker | ||
Format json | ||
" | ||
########################################################### | ||
#Override config-maps in DEV | ||
########################################################### | ||
echo Creating config map "$APP_NAME"-flb-sc-config-map | ||
oc create -n "$OPENSHIFT_NAMESPACE"-"$envValue" configmap "$APP_NAME"-flb-sc-config-map \ | ||
--from-literal=fluent-bit.conf="$FLB_CONFIG" \ | ||
--from-literal=parsers.conf="$PARSER_CONFIG" \ | ||
--dry-run=client -o yaml | oc apply -f - |