From 85feafc46ef73df0223642754140dcd7b38b65bb Mon Sep 17 00:00:00 2001 From: Marian Koreniuk Date: Fri, 19 Jul 2024 13:28:46 +0200 Subject: [PATCH] 71 configure GitHub ci (#113) Add CI to testing proxmox integration --------- Signed-off-by: Andrei Kvapil Signed-off-by: Kingdon Barrett Co-authored-by: Andrei Kvapil Co-authored-by: Nikita <166552198+nbykov0@users.noreply.github.com> Co-authored-by: Kingdon Barrett Co-authored-by: Kingdon Barrett --- .github/workflows/ci.yml | 48 +++ .github/workflows/lint.yml | 48 +++ .github/workflows/linters/.markdown-lint.yml | 7 + .github/workflows/linters/.yaml-lint.yml | 55 +++ Makefile | 2 + packages/apps/clickhouse/.helmignore | 3 + packages/apps/clickhouse/Chart.yaml | 2 +- packages/apps/clickhouse/logos/clickhouse.svg | 1 + packages/apps/ferretdb/.helmignore | 3 + packages/apps/ferretdb/Chart.yaml | 2 +- packages/apps/ferretdb/logos/ferretdb.svg | 54 +++ packages/apps/http-cache/.helmignore | 26 +- packages/apps/http-cache/Chart.yaml | 2 +- packages/apps/http-cache/logos/nginx.svg | 2 + packages/apps/kafka/.helmignore | 3 + packages/apps/kafka/Chart.yaml | 2 +- packages/apps/kafka/logos/kafka.svg | 1 + packages/apps/kubernetes/.helmignore | 26 +- packages/apps/kubernetes/Chart.yaml | 2 +- packages/apps/kubernetes/logos/kubernetes.svg | 84 +++++ packages/apps/mysql/.helmignore | 26 +- packages/apps/mysql/Chart.yaml | 2 +- packages/apps/mysql/logos/mariadb.svg | 12 + packages/apps/postgres/.helmignore | 26 +- packages/apps/postgres/Chart.yaml | 2 +- packages/apps/postgres/logos/postgres.svg | 22 ++ packages/apps/rabbitmq/.helmignore | 26 +- packages/apps/rabbitmq/Chart.yaml | 2 +- packages/apps/rabbitmq/logos/rabbitmq.svg | 2 + packages/apps/redis/.helmignore | 26 +- packages/apps/redis/Chart.yaml | 2 +- packages/apps/redis/logos/redis.svg | 2 + packages/apps/tcp-balancer/.helmignore | 26 +- packages/apps/tcp-balancer/Chart.yaml | 2 +- packages/apps/tcp-balancer/logos/haproxy.svg | 165 ++++++++ packages/apps/tenant/.helmignore | 3 + packages/apps/tenant/Chart.yaml | 2 +- packages/apps/tenant/logos/tenant.svg | 351 ++++++++++++++++++ packages/apps/virtual-machine/.helmignore | 26 +- packages/apps/virtual-machine/Chart.yaml | 2 +- packages/apps/virtual-machine/logos/vm.svg | 2 + packages/apps/vpn/.helmignore | 26 +- packages/apps/vpn/Chart.yaml | 2 +- packages/apps/vpn/logos/outline.svg | 64 ++++ .../installer/images/cozystack/Dockerfile | 1 + packages/core/installer/images/matchbox.tag | 2 +- .../core/platform/templates/helmreleases.yaml | 1 + packages/extra/etcd/.helmignore | 3 + packages/extra/etcd/Chart.yaml | 2 +- packages/extra/etcd/logos/etcd.svg | 8 + packages/extra/ingress/.helmignore | 3 + packages/extra/ingress/Chart.yaml | 2 +- .../extra/ingress/logos/ingress-nginx.svg | 57 +++ packages/extra/monitoring/.helmignore | 3 + packages/extra/monitoring/Chart.yaml | 2 +- .../extra/monitoring/logos/monitoring.svg | 51 +++ packages/system/dashboard/.helmignore | 1 + packages/system/dashboard/Makefile | 1 + .../templates/frontend/configmap.yaml | 6 + packages/system/dashboard/patches/logos.patch | 15 + scripts/common-envs.mk | 3 +- scripts/installer.sh | 5 + 62 files changed, 1135 insertions(+), 225 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/linters/.markdown-lint.yml create mode 100644 .github/workflows/linters/.yaml-lint.yml create mode 100644 packages/apps/clickhouse/.helmignore create mode 100644 packages/apps/clickhouse/logos/clickhouse.svg create mode 100644 packages/apps/ferretdb/.helmignore create mode 100644 packages/apps/ferretdb/logos/ferretdb.svg create mode 100644 packages/apps/http-cache/logos/nginx.svg create mode 100644 packages/apps/kafka/.helmignore create mode 100644 packages/apps/kafka/logos/kafka.svg create mode 100644 packages/apps/kubernetes/logos/kubernetes.svg create mode 100644 packages/apps/mysql/logos/mariadb.svg create mode 100644 packages/apps/postgres/logos/postgres.svg create mode 100644 packages/apps/rabbitmq/logos/rabbitmq.svg create mode 100644 packages/apps/redis/logos/redis.svg create mode 100644 packages/apps/tcp-balancer/logos/haproxy.svg create mode 100644 packages/apps/tenant/.helmignore create mode 100644 packages/apps/tenant/logos/tenant.svg create mode 100644 packages/apps/virtual-machine/logos/vm.svg create mode 100644 packages/apps/vpn/logos/outline.svg create mode 100644 packages/extra/etcd/.helmignore create mode 100644 packages/extra/etcd/logos/etcd.svg create mode 100644 packages/extra/ingress/.helmignore create mode 100644 packages/extra/ingress/logos/ingress-nginx.svg create mode 100644 packages/extra/monitoring/.helmignore create mode 100644 packages/extra/monitoring/logos/monitoring.svg create mode 100644 packages/system/dashboard/patches/logos.patch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..9f401f87 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..a79650b4 --- /dev/null +++ b/.github/workflows/lint.yml @@ -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 }} + 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/ diff --git a/.github/workflows/linters/.markdown-lint.yml b/.github/workflows/linters/.markdown-lint.yml new file mode 100644 index 00000000..335724b4 --- /dev/null +++ b/.github/workflows/linters/.markdown-lint.yml @@ -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 diff --git a/.github/workflows/linters/.yaml-lint.yml b/.github/workflows/linters/.yaml-lint.yml new file mode 100644 index 00000000..95afab76 --- /dev/null +++ b/.github/workflows/linters/.yaml-lint.yml @@ -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 + line-length: + max: 130 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: false diff --git a/Makefile b/Makefile index 9ac01626..10a78ae7 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,8 @@ repos: make -C packages/system repo make -C packages/apps repo make -C packages/extra repo + mkdir -p _out/logos + cp ./packages/apps/*/logos/*.svg ./packages/extra/*/logos/*.svg _out/logos/ assets: make -C packages/core/installer/ assets diff --git a/packages/apps/clickhouse/.helmignore b/packages/apps/clickhouse/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/apps/clickhouse/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/apps/clickhouse/Chart.yaml b/packages/apps/clickhouse/Chart.yaml index d5ad8600..be47e494 100644 --- a/packages/apps/clickhouse/Chart.yaml +++ b/packages/apps/clickhouse/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: clickhouse description: Managed ClickHouse service -icon: https://cdn.worldvectorlogo.com/logos/clickhouse.svg +icon: /logos/clickhouse.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/clickhouse/logos/clickhouse.svg b/packages/apps/clickhouse/logos/clickhouse.svg new file mode 100644 index 00000000..f2144b5d --- /dev/null +++ b/packages/apps/clickhouse/logos/clickhouse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/apps/ferretdb/.helmignore b/packages/apps/ferretdb/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/apps/ferretdb/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/apps/ferretdb/Chart.yaml b/packages/apps/ferretdb/Chart.yaml index 6d35a52b..2b7c86e5 100644 --- a/packages/apps/ferretdb/Chart.yaml +++ b/packages/apps/ferretdb/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: ferretdb description: Managed FerretDB service -icon: ferretdb.svg +icon: /logos/ferretdb.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/ferretdb/logos/ferretdb.svg b/packages/apps/ferretdb/logos/ferretdb.svg new file mode 100644 index 00000000..196871e1 --- /dev/null +++ b/packages/apps/ferretdb/logos/ferretdb.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + diff --git a/packages/apps/http-cache/.helmignore b/packages/apps/http-cache/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/http-cache/.helmignore +++ b/packages/apps/http-cache/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/http-cache/Chart.yaml b/packages/apps/http-cache/Chart.yaml index 716252ae..eb17a386 100644 --- a/packages/apps/http-cache/Chart.yaml +++ b/packages/apps/http-cache/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: http-cache description: Layer7 load balacner and caching service -icon: https://www.svgrepo.com/show/373924/nginx.svg +icon: /logos/nginx.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/http-cache/logos/nginx.svg b/packages/apps/http-cache/logos/nginx.svg new file mode 100644 index 00000000..27062a83 --- /dev/null +++ b/packages/apps/http-cache/logos/nginx.svg @@ -0,0 +1,2 @@ + +file_type_nginx \ No newline at end of file diff --git a/packages/apps/kafka/.helmignore b/packages/apps/kafka/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/apps/kafka/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/apps/kafka/Chart.yaml b/packages/apps/kafka/Chart.yaml index 78be0ce6..193e8d7e 100644 --- a/packages/apps/kafka/Chart.yaml +++ b/packages/apps/kafka/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: kafka description: Managed Kafka service -icon: https://upload.wikimedia.org/wikipedia/commons/0/05/Apache_kafka.svg +icon: /logos/kafka.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/kafka/logos/kafka.svg b/packages/apps/kafka/logos/kafka.svg new file mode 100644 index 00000000..305d8764 --- /dev/null +++ b/packages/apps/kafka/logos/kafka.svg @@ -0,0 +1 @@ + diff --git a/packages/apps/kubernetes/.helmignore b/packages/apps/kubernetes/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/kubernetes/.helmignore +++ b/packages/apps/kubernetes/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/kubernetes/Chart.yaml b/packages/apps/kubernetes/Chart.yaml index cd846685..30811454 100644 --- a/packages/apps/kubernetes/Chart.yaml +++ b/packages/apps/kubernetes/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: kubernetes description: Managed Kubernetes service -icon: https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Kubernetes_logo_without_workmark.svg/723px-Kubernetes_logo_without_workmark.svg.png +icon: /logos/kubernetes.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/kubernetes/logos/kubernetes.svg b/packages/apps/kubernetes/logos/kubernetes.svg new file mode 100644 index 00000000..bedd3b88 --- /dev/null +++ b/packages/apps/kubernetes/logos/kubernetes.svg @@ -0,0 +1,84 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/packages/apps/mysql/.helmignore b/packages/apps/mysql/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/mysql/.helmignore +++ b/packages/apps/mysql/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/mysql/Chart.yaml b/packages/apps/mysql/Chart.yaml index 25f3132d..07321d2a 100644 --- a/packages/apps/mysql/Chart.yaml +++ b/packages/apps/mysql/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: mysql description: Managed MariaDB service -icon: https://static-00.iconduck.com/assets.00/mariadb-icon-512x340-txozryr2.png +icon: /logos/mariadb.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/mysql/logos/mariadb.svg b/packages/apps/mysql/logos/mariadb.svg new file mode 100644 index 00000000..82ff6f87 --- /dev/null +++ b/packages/apps/mysql/logos/mariadb.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/apps/postgres/.helmignore b/packages/apps/postgres/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/postgres/.helmignore +++ b/packages/apps/postgres/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/postgres/Chart.yaml b/packages/apps/postgres/Chart.yaml index eb9ab8cc..0bc35560 100644 --- a/packages/apps/postgres/Chart.yaml +++ b/packages/apps/postgres/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: postgres description: Managed PostgreSQL service -icon: https://cdn-icons-png.flaticon.com/512/5968/5968342.png +icon: /logos/postgres.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/postgres/logos/postgres.svg b/packages/apps/postgres/logos/postgres.svg new file mode 100644 index 00000000..d98e3659 --- /dev/null +++ b/packages/apps/postgres/logos/postgres.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/apps/rabbitmq/.helmignore b/packages/apps/rabbitmq/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/rabbitmq/.helmignore +++ b/packages/apps/rabbitmq/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/rabbitmq/Chart.yaml b/packages/apps/rabbitmq/Chart.yaml index f8f02830..2c43a6b6 100644 --- a/packages/apps/rabbitmq/Chart.yaml +++ b/packages/apps/rabbitmq/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: rabbitmq description: Managed RabbitMQ service -icon: https://static-00.iconduck.com/assets.00/rabbitmq-icon-484x512-s9lfaapn.png +icon: /logos/rabbitmq.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/rabbitmq/logos/rabbitmq.svg b/packages/apps/rabbitmq/logos/rabbitmq.svg new file mode 100644 index 00000000..ab4c8693 --- /dev/null +++ b/packages/apps/rabbitmq/logos/rabbitmq.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/apps/redis/.helmignore b/packages/apps/redis/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/redis/.helmignore +++ b/packages/apps/redis/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/redis/Chart.yaml b/packages/apps/redis/Chart.yaml index 3159738e..8daa1619 100644 --- a/packages/apps/redis/Chart.yaml +++ b/packages/apps/redis/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: redis description: Managed Redis service -icon: https://cdn4.iconfinder.com/data/icons/redis-2/1451/Untitled-2-512.png +icon: /logos/redis.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/redis/logos/redis.svg b/packages/apps/redis/logos/redis.svg new file mode 100644 index 00000000..ed312206 --- /dev/null +++ b/packages/apps/redis/logos/redis.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/apps/tcp-balancer/.helmignore b/packages/apps/tcp-balancer/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/tcp-balancer/.helmignore +++ b/packages/apps/tcp-balancer/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/tcp-balancer/Chart.yaml b/packages/apps/tcp-balancer/Chart.yaml index 8f3a6551..c4e9744f 100644 --- a/packages/apps/tcp-balancer/Chart.yaml +++ b/packages/apps/tcp-balancer/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: tcp-balancer description: Layer4 load balancer service -icon: https://cdn.icon-icons.com/icons2/2699/PNG/512/haproxy_logo_icon_171017.png +icon: /logos/haproxy.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/tcp-balancer/logos/haproxy.svg b/packages/apps/tcp-balancer/logos/haproxy.svg new file mode 100644 index 00000000..e2e54609 --- /dev/null +++ b/packages/apps/tcp-balancer/logos/haproxy.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/apps/tenant/.helmignore b/packages/apps/tenant/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/apps/tenant/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/apps/tenant/Chart.yaml b/packages/apps/tenant/Chart.yaml index 9a866e0f..5f531c11 100644 --- a/packages/apps/tenant/Chart.yaml +++ b/packages/apps/tenant/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: tenant description: Separated tenant namespace -icon: https://upload.wikimedia.org/wikipedia/commons/0/04/User_icon_1.svg +icon: /logos/tenant.svg type: application version: 1.2.0 diff --git a/packages/apps/tenant/logos/tenant.svg b/packages/apps/tenant/logos/tenant.svg new file mode 100644 index 00000000..ea647590 --- /dev/null +++ b/packages/apps/tenant/logos/tenant.svg @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/apps/virtual-machine/.helmignore b/packages/apps/virtual-machine/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/virtual-machine/.helmignore +++ b/packages/apps/virtual-machine/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/virtual-machine/Chart.yaml b/packages/apps/virtual-machine/Chart.yaml index 1e2a3c5a..4699d936 100644 --- a/packages/apps/virtual-machine/Chart.yaml +++ b/packages/apps/virtual-machine/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 #name: Virtual Machine name: virtual-machine description: Virtual machine instance -icon: https://www.svgrepo.com/show/448273/azure-vms.svg +icon: /logos/vm.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/virtual-machine/logos/vm.svg b/packages/apps/virtual-machine/logos/vm.svg new file mode 100644 index 00000000..78911027 --- /dev/null +++ b/packages/apps/virtual-machine/logos/vm.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/apps/vpn/.helmignore b/packages/apps/vpn/.helmignore index 0e8a0eb3..1ea0ae84 100644 --- a/packages/apps/vpn/.helmignore +++ b/packages/apps/vpn/.helmignore @@ -1,23 +1,3 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +.helmignore +/logos +/Makefile diff --git a/packages/apps/vpn/Chart.yaml b/packages/apps/vpn/Chart.yaml index f19008c9..b40fe8b2 100644 --- a/packages/apps/vpn/Chart.yaml +++ b/packages/apps/vpn/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: vpn description: Managed VPN service -icon: https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Outline_VPN_icon.png/600px-Outline_VPN_icon.png +icon: /logos/outline.svg # A chart can be either an 'application' or a 'library' chart. # diff --git a/packages/apps/vpn/logos/outline.svg b/packages/apps/vpn/logos/outline.svg new file mode 100644 index 00000000..b4af2c6d --- /dev/null +++ b/packages/apps/vpn/logos/outline.svg @@ -0,0 +1,64 @@ + + + + + + + Outline web assets + + + + + + + Outline web assets + + + + diff --git a/packages/core/installer/images/cozystack/Dockerfile b/packages/core/installer/images/cozystack/Dockerfile index 7c9652b3..19878805 100644 --- a/packages/core/installer/images/cozystack/Dockerfile +++ b/packages/core/installer/images/cozystack/Dockerfile @@ -33,6 +33,7 @@ COPY scripts /cozystack/scripts COPY --from=builder /src/packages/core /cozystack/packages/core COPY --from=builder /src/packages/system /cozystack/packages/system COPY --from=builder /src/_out/repos /cozystack/assets/repos +COPY --from=builder /src/_out/logos /cozystack/assets/logos COPY --from=k8s-await-election-builder /k8s-await-election /usr/bin/k8s-await-election COPY dashboards /cozystack/assets/dashboards diff --git a/packages/core/installer/images/matchbox.tag b/packages/core/installer/images/matchbox.tag index 7974106d..dadda235 100644 --- a/packages/core/installer/images/matchbox.tag +++ b/packages/core/installer/images/matchbox.tag @@ -1 +1 @@ -mgr.cp.if.ua/matchbox:v1.7.1 +ghcr.io/aenix-io/cozystack/matchbox:v1.7.1 diff --git a/packages/core/platform/templates/helmreleases.yaml b/packages/core/platform/templates/helmreleases.yaml index eaee0ea6..54b2e6b5 100644 --- a/packages/core/platform/templates/helmreleases.yaml +++ b/packages/core/platform/templates/helmreleases.yaml @@ -19,6 +19,7 @@ metadata: namespace: {{ $x.namespace }} labels: cozystack.io/repository: system + cozystack.io/system-app: "true" spec: interval: 5m releaseName: {{ $x.releaseName | default $x.name }} diff --git a/packages/extra/etcd/.helmignore b/packages/extra/etcd/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/extra/etcd/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/extra/etcd/Chart.yaml b/packages/extra/etcd/Chart.yaml index 76d426a9..dc79f3f5 100644 --- a/packages/extra/etcd/Chart.yaml +++ b/packages/extra/etcd/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: etcd description: Storage for Kubernetes clusters -icon: https://www.svgrepo.com/show/353714/etcd.svg +icon: /logos/etcd.svg type: application version: 2.1.0 diff --git a/packages/extra/etcd/logos/etcd.svg b/packages/extra/etcd/logos/etcd.svg new file mode 100644 index 00000000..2d5b9fa9 --- /dev/null +++ b/packages/extra/etcd/logos/etcd.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/extra/ingress/.helmignore b/packages/extra/ingress/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/extra/ingress/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/extra/ingress/Chart.yaml b/packages/extra/ingress/Chart.yaml index b646aedb..664a41c5 100644 --- a/packages/extra/ingress/Chart.yaml +++ b/packages/extra/ingress/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ingress description: NGINX Ingress Controller -icon: https://docs.nginx.com/nginx-ingress-controller/images/icons/NGINX-Ingress-Controller-product-icon.svg +icon: /logos/ingress-nginx.svg type: application version: 1.2.0 diff --git a/packages/extra/ingress/logos/ingress-nginx.svg b/packages/extra/ingress/logos/ingress-nginx.svg new file mode 100644 index 00000000..52d351c0 --- /dev/null +++ b/packages/extra/ingress/logos/ingress-nginx.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/extra/monitoring/.helmignore b/packages/extra/monitoring/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/extra/monitoring/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/extra/monitoring/Chart.yaml b/packages/extra/monitoring/Chart.yaml index 0c28c1bf..0dfcd509 100644 --- a/packages/extra/monitoring/Chart.yaml +++ b/packages/extra/monitoring/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: monitoring description: Monitoring and observability stack -icon: https://www.svgrepo.com/download/184787/analytics-laptop.svg +icon: /logos/monitoring.svg type: application version: 1.1.0 diff --git a/packages/extra/monitoring/logos/monitoring.svg b/packages/extra/monitoring/logos/monitoring.svg new file mode 100644 index 00000000..1b5a27bf --- /dev/null +++ b/packages/extra/monitoring/logos/monitoring.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/system/dashboard/.helmignore b/packages/system/dashboard/.helmignore index 43b1c5aa..fd9deb8f 100644 --- a/packages/system/dashboard/.helmignore +++ b/packages/system/dashboard/.helmignore @@ -1,3 +1,4 @@ hack .gitkeep images/*/* +/patches diff --git a/packages/system/dashboard/Makefile b/packages/system/dashboard/Makefile index d17d36aa..b628f3c8 100644 --- a/packages/system/dashboard/Makefile +++ b/packages/system/dashboard/Makefile @@ -15,6 +15,7 @@ update-chart: rm -rf charts/kubeapps/charts/postgresql/ ln -s ../../images charts/kubeapps/images sed -i 's/.cluster.local//g' charts/kubeapps/templates/kubeappsapis/deployment.yaml + patch --no-backup-if-mismatch charts/kubeapps/templates/frontend/configmap.yaml < patches/logos.patch update-dockerfiles: tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/vmware-tanzu/kubeapps | awk -F'[/^]' 'END{print $$3}') && \ diff --git a/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml b/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml index d43f521c..955e5fb9 100644 --- a/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml +++ b/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml @@ -136,4 +136,10 @@ data: proxy_pass {{ printf "http://%s:%d" (include "kubeapps.dashboard.fullname" .) (int .Values.dashboard.service.ports.http) }}; } {{- end }} + + location /logos { + # Add the Authorization header if exists + add_header Authorization $http_authorization; + proxy_pass http://cozystack.cozy-system.svc:80; + } } diff --git a/packages/system/dashboard/patches/logos.patch b/packages/system/dashboard/patches/logos.patch new file mode 100644 index 00000000..e00492db --- /dev/null +++ b/packages/system/dashboard/patches/logos.patch @@ -0,0 +1,15 @@ +diff --git a/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml b/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml +index d43f521..31ff7d5 100644 +--- a/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml ++++ b/packages/system/dashboard/charts/kubeapps/templates/frontend/configmap.yaml +@@ -136,4 +136,10 @@ data: + proxy_pass {{ printf "http://%s:%d" (include "kubeapps.dashboard.fullname" .) (int .Values.dashboard.service.ports.http) }}; + } + {{- end }} ++ ++ location /logos { ++ # Add the Authorization header if exists ++ add_header Authorization $http_authorization; ++ proxy_pass http://cozystack.cozy-system.svc:80; ++ } + } diff --git a/scripts/common-envs.mk b/scripts/common-envs.mk index cf823444..222814d7 100644 --- a/scripts/common-envs.mk +++ b/scripts/common-envs.mk @@ -1,4 +1,5 @@ -REGISTRY ?= ghcr.io/aenix-io/cozystack +REGISTRY := ghcr.io/aenix-io/cozystack + PUSH := 1 LOAD := 0 VERSION = $(patsubst v%,%,$(shell git describe --tags --abbrev=0)) diff --git a/scripts/installer.sh b/scripts/installer.sh index ef9add0a..da3d8fd4 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -79,6 +79,11 @@ fi # Reconcile Helm repositories kubectl annotate helmrepositories.source.toolkit.fluxcd.io -A -l cozystack.io/repository reconcile.fluxcd.io/requestedAt=$(date +"%Y-%m-%dT%H:%M:%SZ") --overwrite +# Unsuspend all system charts +kubectl get hr -A -l cozystack.io/system-app=true --no-headers | while read namespace name rest; do + kubectl patch hr -n "$namespace" "$name" -p '{"spec": {"suspend": null}}' --type=merge --field-manager=flux-client-side-apply +done + # Reconcile platform chart trap 'exit' INT TERM while true; do