Skip to content

Commit

Permalink
changes following tests
Browse files Browse the repository at this point in the history
  • Loading branch information
8naama committed Jan 22, 2025
1 parent 15cb09c commit 9e42298
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ Replace the `curl -fsSL` command with `cp <<LOCAL_PATH_TO_FILE>> /tmp/logzio/` w
sudo mkdir -p /opt/logzio-agent; sudo chown -R $USER: /opt/logzio-agent; mkdir -p /tmp/logzio; cp <<LOCAL_PATH_TO_FILE>> /tmp/logzio/; tar -zxf /tmp/logzio/agent_mac.tar.gz --directory /tmp/logzio; bash /tmp/logzio/agent.bash --url=https://app.logz.io --id=<<SOME_ID>>
```
> [!NOTE]
> Testing changes for files outside of `/scripts` folder is currently not supported, as it requires generating a new release.
4. **Test your changes:**
Run the modified command locally to test your changes and ensure everything works as expected.
8 changes: 3 additions & 5 deletions resources-linux/k8s/datasource_logs_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
########################################### LINUX Datasource Logs Utils Functions ###############################################
#################################################################################################################################

# Global variables
add_logs_token_once_flag=0

# Builds enable logs Helm set
# Input:
# ---
Expand Down Expand Up @@ -76,10 +73,11 @@ function build_disable_fluentd_log_collection_helm_set {
# HELM_SETS - Contains all the Helm sets
function build_logzio_logs_token_helm_set {
# Add logs token only once
if [["$add_logs_token_once_flag" -eq 1]]; then
if [[ -f "$IS_LOG_TOKEN_ADDED" ]]; then
return
else
sudo touch "$IS_LOG_TOKEN_ADDED"
fi
add_logs_token_once_flag=1
local func_name="${FUNCNAME[0]}"

local message='Building Logz.io logs token Helm set ...'
Expand Down
8 changes: 3 additions & 5 deletions resources-mac/k8s/datasource_logs_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
############################################ MAC Datasource Logs Utils Functions ################################################
#################################################################################################################################

# Global variables
add_logs_token_once_flag=0

# Builds enable logs Helm set
# Input:
# ---
Expand Down Expand Up @@ -76,10 +73,11 @@ function build_disable_fluentd_log_collection_helm_set {
# HELM_SETS - Contains all the Helm sets
function build_logzio_logs_token_helm_set {
# Add logs token only once
if [["$add_logs_token_once_flag" -eq 1]]; then
if [[ -f "$IS_LOG_TOKEN_ADDED" ]]; then
return
else
sudo touch "$IS_LOG_TOKEN_ADDED"
fi
add_logs_token_once_flag=1
local func_name="${FUNCNAME[0]}"

local message='Building Logz.io logs token Helm set ...'
Expand Down
5 changes: 4 additions & 1 deletion scripts/linux/consts.bash
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,7 @@ GREEN_COLOR_BOLD='\033[0;32m'
## Headers
AGENT_VERSION=$(cat "$LOGZIO_TEMP_DIR/version")
USER_AGENT_LOGS="logzio-linux-version-$AGENT_VERSION-logs"
USER_AGENT_METRICS="logzio-linux-version-$AGENT_VERSION-metrics"
USER_AGENT_METRICS="logzio-linux-version-$AGENT_VERSION-metrics"

## K8s global flag added indication
IS_LOG_TOKEN_ADDED="$LOGZIO_TEMP_DIR/is-log-token-added.txt"
5 changes: 4 additions & 1 deletion scripts/mac/consts.bash
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,7 @@ GREEN_COLOR_BOLD='\033[0;32m'
## Headers
AGENT_VERSION=$(cat "$LOGZIO_TEMP_DIR/version")
USER_AGENT_LOGS="logzio-mac-version-$AGENT_VERSION-logs"
USER_AGENT_METRICS="logzio-mac-version-$AGENT_VERSION-metrics"
USER_AGENT_METRICS="logzio-mac-version-$AGENT_VERSION-metrics"

## K8s global flag added indication
IS_LOG_TOKEN_ADDED="$LOGZIO_TEMP_DIR/is-log-token-added.txt"

0 comments on commit 9e42298

Please sign in to comment.