Skip to content

Commit

Permalink
apache#8283 add helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
FrommyMind committed Dec 13, 2024
1 parent db93b46 commit ad532e2
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/publish-helm-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ on:
- 'docs/**'
- '**/*.md'

env:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

jobs:
build:
if: github.repository == 'frommymind/seatunnel'
Expand All @@ -41,22 +37,18 @@ jobs:
- name: Set environment variables
run: |
echo "HUB=registry-1.docker.io/duanfangwei/seatunnel" >> $GITHUB_ENV
echo "DOCKER_REGISTRY=ghcr.io/duanfangwei/seatunnel" >> $GITHUB_ENV
echo "DOCKER_USERNAME=${{ env.DOCKER_USERNAME }}" >> $GITHUB_ENV
echo "DOCKER_PASSWORD=${{ env.DOCKERHUB_TOKEN }}" >> $GITHUB_ENV
echo "DOCKER_REGISTRY=docker.io/duanfangwei" >> $GITHUB_ENV
echo "DOCKER_USERNAME=${{ secrets.DOCKERHUB_USER }}" >> $GITHUB_ENV
echo "DOCKER_PASSWORD=${{ secrets.DOCKERHUB_TOKEN }}" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish Helm Chart
working-directory: deploy/kubernetes
run: |
if [[ ${{ env.HUB }} == "ghcr.io/duanfangwei/seatunnel" ]]; then
VERSION=0.0.0-$(git rev-parse --short HEAD)
sed -i "s/^version: .*/version: $VERSION/" seatunnel/Chart.yaml
fi
helm dep up seatunnel
helm package seatunnel
helm push seatunnel-helm-*.tgz oci://${{ env.HUB }}
103 changes: 103 additions & 0 deletions deploy/kubernetes/seatunnel/conf/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
################################################################################

# The minimum amount of time, in seconds, that must elapse before the file configuration is checked for changes.
monitorInterval = 60

property.file_path = ${sys:seatunnel.logs.path:-/tmp/seatunnel/logs}
property.file_name = ${sys:seatunnel.logs.file_name:-seatunnel}
property.file_split_size = 100MB
property.file_count = 100
property.file_ttl = 7d

rootLogger.level = INFO

logger.zeta.name=org.apache.seatunnel.engine
logger.zeta.level=INFO

logger.debezium.name=io.debezium.connector
logger.debezium.level=WARN

############################ log output to console #############################
rootLogger.appenderRef.consoleStdout.ref = consoleStdoutAppender
rootLogger.appenderRef.consoleStderr.ref = consoleStderrAppender
############################ log output to console #############################
############################ log output to file #############################
#rootLogger.appenderRef.file.ref = fileAppender
############################ log output to file #############################

appender.consoleStdout.name = consoleStdoutAppender
appender.consoleStdout.type = CONSOLE
appender.consoleStdout.target = SYSTEM_OUT
appender.consoleStdout.layout.type = PatternLayout
appender.consoleStdout.layout.pattern = [%X{ST-JID}] %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%-30.30c{1.}] [%t] - %m%n
appender.consoleStdout.filter.acceptLtWarn.type = ThresholdFilter
appender.consoleStdout.filter.acceptLtWarn.level = WARN
appender.consoleStdout.filter.acceptLtWarn.onMatch = DENY
appender.consoleStdout.filter.acceptLtWarn.onMismatch = ACCEPT

appender.consoleStderr.name = consoleStderrAppender
appender.consoleStderr.type = CONSOLE
appender.consoleStderr.target = SYSTEM_ERR
appender.consoleStderr.layout.type = PatternLayout
appender.consoleStderr.layout.pattern = [%X{ST-JID}] %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%-30.30c{1.}] [%t] - %m%n
appender.consoleStderr.filter.acceptGteWarn.type = ThresholdFilter
appender.consoleStderr.filter.acceptGteWarn.level = WARN
appender.consoleStderr.filter.acceptGteWarn.onMatch = ACCEPT
appender.consoleStderr.filter.acceptGteWarn.onMismatch = DENY

appender.routing.name = routingAppender
appender.routing.type = Routing
appender.routing.purge.type = IdlePurgePolicy
appender.routing.purge.timeToLive = 60
appender.routing.route.type = Routes
appender.routing.route.pattern = $${ctx:ST-JID}
appender.routing.route.system.type = Route
appender.routing.route.system.key = $${ctx:ST-JID}
appender.routing.route.system.ref = fileAppender
appender.routing.route.job.type = Route
appender.routing.route.job.appender.type = File
appender.routing.route.job.appender.name = job-${ctx:ST-JID}
appender.routing.route.job.appender.fileName = ${file_path}/job-${ctx:ST-JID}.log
appender.routing.route.job.appender.layout.type = PatternLayout
appender.routing.route.job.appender.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%-30.30c{1.}] [%t] - %m%n

appender.file.name = fileAppender
appender.file.type = RollingFile
appender.file.fileName = ${file_path}/${file_name}.log
appender.file.filePattern = ${file_path}/${file_name}.log.%d{yyyy-MM-dd}-%i
appender.file.append = true
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = [%X{ST-JID}] %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%-30.30c{1.}] [%t] - %m%n
appender.file.policies.type = Policies
appender.file.policies.time.type = TimeBasedTriggeringPolicy
appender.file.policies.time.modulate = true
appender.file.policies.size.type = SizeBasedTriggeringPolicy
appender.file.policies.size.size = ${file_split_size}
appender.file.strategy.type = DefaultRolloverStrategy
appender.file.strategy.fileIndex = nomax
appender.file.strategy.action.type = Delete
appender.file.strategy.action.basepath = ${file_path}
appender.file.strategy.action.maxDepth = 1
appender.file.strategy.action.condition.type = IfFileName
appender.file.strategy.action.condition.glob = ${file_name}.log*
appender.file.strategy.action.condition.nested_condition.type = IfAny
appender.file.strategy.action.condition.nested_condition.lastModify.type = IfLastModified
appender.file.strategy.action.condition.nested_condition.lastModify.age = ${file_ttl}
appender.file.strategy.action.condition.nested_condition.fileCount.type = IfAccumulatedFileCount
appender.file.strategy.action.condition.nested_condition.fileCount.exceeds = ${file_count}

0 comments on commit ad532e2

Please sign in to comment.