-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/notify_push
Signed-off-by: Jesse Hitch <[email protected]>
- Loading branch information
Showing
17 changed files
with
320 additions
and
311 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
- 'charts/nextcloud/templates/**' | ||
lint: | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest-low | ||
needs: changes | ||
if: needs.changes.outputs.src != 'false' | ||
steps: | ||
|
@@ -56,10 +56,32 @@ jobs: | |
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
test-internal-database: | ||
run-tests: | ||
runs-on: ubuntu-22.04 | ||
needs: [changes, lint] | ||
# only run this job if there are helm chart file changes | ||
if: needs.changes.outputs.src != 'false' | ||
strategy: | ||
# continue with all the other jobs even if one fails | ||
fail-fast: false | ||
matrix: | ||
# each item in this list is a job with an isolated test VM | ||
test_cases: | ||
# test the plain helm chart with nothing changed | ||
- name: 'Default - no custom values' | ||
|
||
# test the helm chart with postgresql subchart enabled | ||
- name: PostgreSQL Enabled | ||
helm_args: '--helm-extra-set-args "--set=postgresql.enabled=true --set=postgresql.global.postgresql.auth.password=testing123456 --set=internalDatabase.enabled=false --set=externalDatabase.enabled=True --set=externalDatabase.type=postgresql --set=externalDatabase.password=testing12345"' | ||
|
||
# test the helm chart with nginx container enabled | ||
- name: Nginx Enabled | ||
helm_args: '--helm-extra-set-args "--set=image.flavor=fpm --set=nginx.enabled=true"' | ||
|
||
# test the helm chart with horizontal pod autoscaling enabled | ||
- name: Horizontal Pod Autoscaling Enabled | ||
helm_args: '--helm-extra-set-args "--set=hpa.enabled=true --set=hpa.minPods=2 --set=hpa.maxPods=3 --set=hpa.targetCPUUtilizationPercentage=75"' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -90,48 +112,15 @@ jobs: | |
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
- name: Run chart-testing (install ${{ matrix.test_cases.name }}) | ||
id: install | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct install --target-branch ${{ github.event.repository.default_branch }} | ||
run: ct install --target-branch ${{ github.event.repository.default_branch }} ${{ matrix.test_cases.helm_args }} | ||
|
||
test-postgresql-database: | ||
runs-on: ubuntu-22.04 | ||
needs: [changes, lint] | ||
if: needs.changes.outputs.src != 'false' | ||
summary: | ||
runs-on: ubuntu-latest-low | ||
needs: [changes, run-tests] | ||
if: always() | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.14.4 | ||
|
||
- name: Add dependency chart repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
id: install | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
ct install --target-branch ${{ github.event.repository.default_branch }} \ | ||
--helm-extra-set-args "--set=postgresql.enabled=true --set=postgresql.global.postgresql.auth.password=testing123456 --set=internalDatabase.enabled=false --set=externalDatabase.enabled=True --set=externalDatabase.type=postgresql --set=externalDatabase.password=testing123456" | ||
- name: Summary | ||
run: if ${{ needs.changes.outputs.src != 'false' && needs.run-tests.result != 'success' }}; then exit 1; fi |
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,12 @@ | ||
# line below if for Apache 2.4 | ||
<ifModule mod_authz_core.c> | ||
Require all denied | ||
</ifModule> | ||
# line below if for Apache 2.2 | ||
<ifModule !mod_authz_core.c> | ||
deny from all | ||
</ifModule> | ||
# section for Apache 2.2 and 2.4 | ||
<ifModule mod_autoindex.c> | ||
IndexIgnore * | ||
</ifModule> |
4 changes: 4 additions & 0 deletions
4
charts/nextcloud/files/defaultConfigs/apache-pretty-urls.config.php.tpl
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,4 @@ | ||
<?php | ||
$CONFIG = array ( | ||
'htaccess.RewriteBase' => '/', | ||
); |
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,4 @@ | ||
<?php | ||
$CONFIG = array ( | ||
'memcache.local' => '\OC\Memcache\APCu', | ||
); |
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,15 @@ | ||
<?php | ||
$CONFIG = array ( | ||
"apps_paths" => array ( | ||
0 => array ( | ||
"path" => OC::$SERVERROOT."/apps", | ||
"url" => "/apps", | ||
"writable" => false, | ||
), | ||
1 => array ( | ||
"path" => OC::$SERVERROOT."/custom_apps", | ||
"url" => "/custom_apps", | ||
"writable" => true, | ||
), | ||
), | ||
); |
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,24 @@ | ||
<?php | ||
$autoconfig_enabled = false; | ||
if (getenv('SQLITE_DATABASE')) { | ||
$AUTOCONFIG["dbtype"] = "sqlite"; | ||
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE'); | ||
$autoconfig_enabled = true; | ||
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) { | ||
$AUTOCONFIG["dbtype"] = "mysql"; | ||
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE'); | ||
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER'); | ||
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD'); | ||
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST'); | ||
$autoconfig_enabled = true; | ||
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) { | ||
$AUTOCONFIG["dbtype"] = "pgsql"; | ||
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB'); | ||
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER'); | ||
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD'); | ||
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST'); | ||
$autoconfig_enabled = true; | ||
} | ||
if ($autoconfig_enabled) { | ||
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data"; | ||
} |
14 changes: 14 additions & 0 deletions
14
charts/nextcloud/files/defaultConfigs/redis.config.php.tpl
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,14 @@ | ||
<?php | ||
if (getenv('REDIS_HOST')) { | ||
$CONFIG = array ( | ||
'memcache.distributed' => '\OC\Memcache\Redis', | ||
'memcache.locking' => '\OC\Memcache\Redis', | ||
'redis' => array( | ||
'host' => getenv('REDIS_HOST'), | ||
'port' => getenv('REDIS_HOST_PORT') ?: 6379, | ||
{{- if .Values.redis.auth.enabled }} | ||
'password' => getenv('REDIS_HOST_PASSWORD'), | ||
{{- end }} | ||
), | ||
); | ||
} |
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,15 @@ | ||
<?php | ||
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) { | ||
$CONFIG = array ( | ||
'mail_smtpmode' => 'smtp', | ||
'mail_smtphost' => getenv('SMTP_HOST'), | ||
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), | ||
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', | ||
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'), | ||
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', | ||
'mail_smtpname' => getenv('SMTP_NAME') ?: '', | ||
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '', | ||
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), | ||
'mail_domain' => getenv('MAIL_DOMAIN'), | ||
); | ||
} |
Oops, something went wrong.