-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
69 integration with proxmox paas proxmox bundle #107
base: main
Are you sure you want to change the base?
Changes from all commits
1675469
fb465c9
3750d99
9df8bf2
61a5d18
23932d4
ffb7bb5
7d63810
84c8c25
75cb6c0
1b64624
2f59488
46a9dfb
4ed51ca
e475cb2
f157ccf
df168e8
c5dd46c
c85e4ed
b215325
a757a11
74e2f4a
d5c202b
bb2918d
85feafc
931d718
0222e41
df53e06
51602ee
ec150c8
c3737e9
7e9b380
a7029d6
ff9b291
46121ce
4939b9b
33b53de
2df5b1b
b3a9ed7
7436a15
4b65402
18d91e2
c75b97f
f76bc8d
7258c56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: CI/CD Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**.yaml' | ||
- '**/Dockerfile' | ||
- '**/charts/**' | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
IMAGE_NGINX_CACHE: nginx-cache | ||
REGISTRY: ghcr.io/${{ github.repository_owner }} | ||
PUSH: 1 | ||
LOAD: 1 | ||
NGINX_CACHE_TAG: v0.1.0 | ||
TAG: v0.3.1 | ||
PLATFORM_ARCH: linux/amd64 | ||
|
||
jobs: | ||
build-and-push: | ||
name: Build Cozystack | ||
runs-on: ubuntu-latest | ||
services: | ||
registry: | ||
image: registry:2 | ||
ports: | ||
- 5000:5000 | ||
steps: | ||
- name: Set up Docker Registry | ||
run: | | ||
if [ "$GITHUB_ACTIONS" = "true" ]; then | ||
echo "REGISTRY=ghcr.io/${{ github.repository_owner }}" >> $GITHUB_ENV | ||
else | ||
echo "REGISTRY=localhost:5000/cozystack_local" >> $GITHUB_ENV | ||
fi | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Build usig make | ||
run: | | ||
make | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [ main ] # Lint only on pushes to the main branch | ||
pull_request: | ||
branches: [ main ] # Lint on PRs targeting the main branch | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Super-Linter | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run Super-Linter | ||
uses: github/super-linter@v4 | ||
env: | ||
# To report GitHub Actions status checks | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove duplicated GITHUB_TOKEN definition. The Remove the duplicate definition: env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false # Lint only changed files
VALIDATE_TERRAFORM: false # Disable Terraform linting (remove if you need it)
DEFAULT_BRANCH: main # Set your default branch
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Enable only the linters you need for your project
VALIDATE_JAVASCRIPT_ES: true Also applies to: 31-31 |
||
VALIDATE_ALL_CODEBASE: false # Lint only changed files | ||
VALIDATE_TERRAFORM: false # Disable Terraform linting (remove if you need it) | ||
DEFAULT_BRANCH: main # Set your default branch | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Enable only the linters you need for your project | ||
VALIDATE_JAVASCRIPT_ES: true | ||
VALIDATE_PYTHON_BLACK: true | ||
VALIDATE_HTML: false | ||
VALIDATE_GO: false | ||
VALIDATE_XML: false | ||
VALIDATE_JAVA: false | ||
VALIDATE_DOCKERFILE: false | ||
# turn off JSCPD copy/paste detection, which results in lots of results for examples and devops repos | ||
VALIDATE_JSCPD: false | ||
# turn off shfmt shell formatter as we already have shellcheck | ||
VALIDATE_SHELL_SHFMT: false | ||
VALIDATE_EDITORCONFIG: false | ||
# prevent Kubernetes CRD API's from causing kubeval to fail | ||
# also change schema location to an up-to-date list | ||
# https://github.com/yannh/kubernetes-json-schema/#kubeval | ||
KUBERNETES_KUBEVAL_OPTIONS: --ignore-missing-schemas --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
# MD013/line-length - Line length | ||
MD013: | ||
# Number of characters, default is 80 | ||
line_length: 9999 | ||
# check code blocks? | ||
code_blocks: false |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,55 @@ | ||||||||||||||||||||
|
||||||||||||||||||||
yaml-files: | ||||||||||||||||||||
- '*.yaml' | ||||||||||||||||||||
- '*.yml' | ||||||||||||||||||||
- '.yamllint' | ||||||||||||||||||||
|
||||||||||||||||||||
rules: | ||||||||||||||||||||
braces: | ||||||||||||||||||||
level: warning | ||||||||||||||||||||
min-spaces-inside: 0 | ||||||||||||||||||||
max-spaces-inside: 0 | ||||||||||||||||||||
min-spaces-inside-empty: 1 | ||||||||||||||||||||
max-spaces-inside-empty: 5 | ||||||||||||||||||||
brackets: | ||||||||||||||||||||
level: warning | ||||||||||||||||||||
min-spaces-inside: 0 | ||||||||||||||||||||
max-spaces-inside: 0 | ||||||||||||||||||||
min-spaces-inside-empty: 1 | ||||||||||||||||||||
max-spaces-inside-empty: 5 | ||||||||||||||||||||
colons: | ||||||||||||||||||||
level: warning | ||||||||||||||||||||
max-spaces-before: 0 | ||||||||||||||||||||
max-spaces-after: 1 | ||||||||||||||||||||
commas: | ||||||||||||||||||||
level: warning | ||||||||||||||||||||
max-spaces-before: 0 | ||||||||||||||||||||
min-spaces-after: 1 | ||||||||||||||||||||
max-spaces-after: 1 | ||||||||||||||||||||
comments: disable | ||||||||||||||||||||
comments-indentation: disable | ||||||||||||||||||||
document-end: disable | ||||||||||||||||||||
document-start: disable | ||||||||||||||||||||
empty-lines: | ||||||||||||||||||||
level: warning | ||||||||||||||||||||
max: 2 | ||||||||||||||||||||
max-start: 0 | ||||||||||||||||||||
max-end: 0 | ||||||||||||||||||||
hyphens: | ||||||||||||||||||||
level: warning | ||||||||||||||||||||
max-spaces-after: 1 | ||||||||||||||||||||
indentation: | ||||||||||||||||||||
level: warning | ||||||||||||||||||||
spaces: consistent | ||||||||||||||||||||
indent-sequences: true | ||||||||||||||||||||
check-multi-line-strings: false | ||||||||||||||||||||
key-duplicates: enable | ||||||||||||||||||||
line-length: disable | ||||||||||||||||||||
new-line-at-end-of-file: disable | ||||||||||||||||||||
new-lines: | ||||||||||||||||||||
type: unix | ||||||||||||||||||||
trailing-spaces: disable | ||||||||||||||||||||
Comment on lines
+47
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove redundant line length rule and consider enabling formatting rules There's a redundant Also, consider enabling the Apply this diff to remove the redundant rule: - line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable Consider enabling 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||
line-length: | ||||||||||||||||||||
max: 130 | ||||||||||||||||||||
allow-non-breakable-words: true | ||||||||||||||||||||
allow-non-breakable-inline-mappings: false | ||||||||||||||||||||
Comment on lines
+52
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM for line length rule, but address duplication The line length rule is well-defined with a reasonable 130-character limit. However, this rule is flagged as a duplication by yamllint due to the earlier To resolve this, ensure you've removed the earlier 🧰 Tools🪛 yamllint
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,7 +11,7 @@ repo: | |||||
rm -rf "$(TMP)" | ||||||
|
||||||
fix-chartnames: | ||||||
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done | ||||||
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: The removal of the To fix this issue, reintroduce the - find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done
+ find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done This change will ensure that the Chart.yaml files are correctly updated in-place, maintaining the intended functionality of the 📝 Committable suggestion
Suggested change
|
||||||
|
||||||
gen-versions-map: fix-chartnames | ||||||
../../hack/gen_versions_map.sh | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }} | ||
|
||
releases: | ||
- name: cilium | ||
releaseName: cilium | ||
chart: cozy-cilium | ||
namespace: cozy-cilium | ||
privileged: true | ||
dependsOn: [] | ||
|
||
- name: kubeovn | ||
releaseName: kubeovn | ||
chart: cozy-kubeovn | ||
namespace: cozy-kubeovn | ||
privileged: true | ||
dependsOn: [cilium] | ||
values: | ||
cozystack: | ||
nodesHash: {{ include "cozystack.master-node-ips" . | sha256sum }} | ||
kube-ovn: | ||
ipv4: | ||
POD_CIDR: "{{ index $cozyConfig.data "ipv4-pod-cidr" }}" | ||
POD_GATEWAY: "{{ index $cozyConfig.data "ipv4-pod-gateway" }}" | ||
SVC_CIDR: "{{ index $cozyConfig.data "ipv4-svc-cidr" }}" | ||
JOIN_CIDR: "{{ index $cozyConfig.data "ipv4-join-cidr" }}" | ||
|
||
- name: cert-manager | ||
releaseName: cert-manager | ||
chart: cozy-cert-manager | ||
namespace: cozy-cert-manager | ||
dependsOn: [cilium,kubeovn] | ||
|
||
- name: cert-manager-issuers | ||
releaseName: cert-manager-issuers | ||
chart: cozy-cert-manager-issuers | ||
namespace: cozy-cert-manager | ||
dependsOn: [cilium,kubeovn,cert-manager] | ||
|
||
- name: victoria-metrics-operator | ||
releaseName: victoria-metrics-operator | ||
chart: cozy-victoria-metrics-operator | ||
namespace: cozy-victoria-metrics-operator | ||
dependsOn: [cilium,kubeovn,cert-manager] | ||
|
||
- name: monitoring | ||
releaseName: monitoring | ||
chart: cozy-monitoring | ||
namespace: cozy-monitoring | ||
privileged: true | ||
dependsOn: [cilium,kubeovn,victoria-metrics-operator] | ||
|
||
- name: grafana-operator | ||
releaseName: grafana-operator | ||
chart: cozy-grafana-operator | ||
namespace: cozy-grafana-operator | ||
dependsOn: [cilium,kubeovn] | ||
|
||
- name: mariadb-operator | ||
releaseName: mariadb-operator | ||
chart: cozy-mariadb-operator | ||
namespace: cozy-mariadb-operator | ||
dependsOn: [cilium,kubeovn,cert-manager,victoria-metrics-operator] | ||
|
||
- name: postgres-operator | ||
releaseName: postgres-operator | ||
chart: cozy-postgres-operator | ||
namespace: cozy-postgres-operator | ||
dependsOn: [cilium,kubeovn,cert-manager] | ||
|
||
- name: rabbitmq-operator | ||
releaseName: rabbitmq-operator | ||
chart: cozy-rabbitmq-operator | ||
namespace: cozy-rabbitmq-operator | ||
dependsOn: [cilium,kubeovn] | ||
|
||
- name: redis-operator | ||
releaseName: redis-operator | ||
chart: cozy-redis-operator | ||
namespace: cozy-redis-operator | ||
dependsOn: [cilium,kubeovn] | ||
|
||
- name: proxmox-csi-operator | ||
releaseName: proxmox-csi-operator | ||
chart: cozy-proxmox-csi-operator | ||
namespace: cozy-proxmox | ||
dependsOn: [cilium,kubeovn,cert-manager] | ||
|
||
- name: proxmox-csi-operator | ||
releaseName: proxmox-csi-operator | ||
chart: cozy-proxmox-csi-operator | ||
namespace: cozy-proxmox | ||
dependsOn: [cilium,kubeovn,cert-manager] | ||
Comment on lines
+82
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove duplicate proxmox-csi-operator release. The proxmox-csi-operator release is defined twice with identical configuration. This is likely an error and could lead to deployment issues. Remove one of the duplicate blocks, keeping only one instance of the proxmox-csi-operator release. 🧰 Tools🪛 yamllint
|
||
|
||
- name: telepresence | ||
releaseName: traffic-manager | ||
chart: cozy-telepresence | ||
namespace: cozy-telepresence | ||
dependsOn: [cilium,kubeovn] | ||
|
||
- name: dashboard | ||
releaseName: dashboard | ||
chart: cozy-dashboard | ||
namespace: cozy-dashboard | ||
dependsOn: [cilium,kubeovn] | ||
{{- if .Capabilities.APIVersions.Has "source.toolkit.fluxcd.io/v1beta2" }} | ||
{{- with (lookup "source.toolkit.fluxcd.io/v1beta2" "HelmRepository" "cozy-public" "").items }} | ||
values: | ||
kubeapps: | ||
redis: | ||
master: | ||
podAnnotations: | ||
{{- range $index, $repo := . }} | ||
{{- with (($repo.status).artifact).revision }} | ||
repository.cozystack.io/{{ $repo.metadata.name }}: {{ quote . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
- name: kamaji | ||
releaseName: kamaji | ||
chart: cozy-kamaji | ||
namespace: cozy-kamaji | ||
dependsOn: [cilium,kubeovn,cert-manager] | ||
|
||
- name: capi-operator | ||
releaseName: capi-operator | ||
chart: cozy-capi-operator | ||
namespace: cozy-cluster-api | ||
privileged: true | ||
dependsOn: [cilium,kubeovn,cert-manager] | ||
|
||
- name: capi-providers | ||
releaseName: capi-providers | ||
chart: cozy-capi-providers | ||
namespace: cozy-cluster-api | ||
privileged: true | ||
dependsOn: [cilium,kubeovn,capi-operator] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,7 +11,7 @@ repo: | |||||
rm -rf "$(TMP)" | ||||||
|
||||||
fix-chartnames: | ||||||
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done | ||||||
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix the The removal of the To fix this issue, reintroduce the - find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done
+ find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done This change will ensure that the Chart.yaml files are modified as intended, maintaining the correct functionality of the 📝 Committable suggestion
Suggested change
|
||||||
|
||||||
gen-versions-map: fix-chartnames | ||||||
../../hack/gen_versions_map.sh | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix quoting in the "Set up Docker Registry" step.
To address potential issues with word splitting and to improve script safety, please add double quotes around the variable expansions:
These changes will prevent potential issues with word splitting and improve overall script safety.
📝 Committable suggestion
🧰 Tools
🪛 actionlint