|
| 1 | +--- |
| 2 | +title: Version 0.5.0 Released |
| 3 | +date: 2023-07-01T10:38:49+0300 |
| 4 | +group: releases |
| 5 | +release: 0.5.0 |
| 6 | +--- |
| 7 | + |
| 8 | +This version includes new features and two deprecation notices, please see the last section for more details. |
| 9 | + |
| 10 | +## Dark mode: 🕸️ + 🌚 = 🎉 |
| 11 | + |
| 12 | +Thanks to Bootstrap's support for dark mode, Platz now supports it too! |
| 13 | + |
| 14 | +The current behavior defaults to the system setting. |
| 15 | + |
| 16 | +## Fixes for missing metrics values |
| 17 | + |
| 18 | +*Thanks @vmalloc for this contribution!* |
| 19 | + |
| 20 | +Missing metric values were left in their original value instead of being returned as zeros. |
| 21 | + |
| 22 | +This is now fixed by setting all possible metrics' values to zero before setting new values. |
| 23 | + |
| 24 | +## New Platz annotations in `Chart.yaml` |
| 25 | + |
| 26 | +When parsing chart metadata, Platz now searches for a `Chart.yaml` file. If `Chart.yaml` is not found, Platz returns an error saying the directory is not of a chart. |
| 27 | + |
| 28 | +`Chart.yaml` is used to get the chart version, which has be a valid [Semver](https://semver.org/), plus some optional annotations: |
| 29 | + |
| 30 | +* `platz.io/git/commit`: A full Git commit hash |
| 31 | +* `platz.io/git/branch`: Name of the current Git branch |
| 32 | +* `platz.io/git/repo`: URL for the Git repo |
| 33 | +* `platz.io/git/provider`: A lowercase string representing the Git hosting provider |
| 34 | + |
| 35 | +When provided, this metadata added in the chart annotations takes precedence over Tag Formats, which will be deprecated in Platz 0.6 (see below.) |
| 36 | + |
| 37 | +Here's an example `Chart.yaml`: |
| 38 | + |
| 39 | +```yaml |
| 40 | +apiVersion: v2 |
| 41 | +name: shop-chart |
| 42 | +description: A Helm chart for Pizza-Platz Shops |
| 43 | +type: application |
| 44 | +version: 0.1.0 |
| 45 | +appVersion: "0.1.0" |
| 46 | + |
| 47 | +annotations: |
| 48 | + platz.io/git/commit: a8c1da83308d93b111c14f0c79e0b9acf7f01686 |
| 49 | + platz.io/git/branch: main |
| 50 | + platz.io/git/repo: https://github.com/pizza-platz/shop |
| 51 | + platz.io/git/provider: github |
| 52 | +``` |
| 53 | +
|
| 54 | +The `repo` and `provider` annotations are not being used at the moment, but they will allow for generating links into the Git repo web interface, for example, to show diffs of potential upgrades. |
| 55 | + |
| 56 | +It's recommended to start adding these annotations so that charts are annotated far enough in history before Tag Formats are deprecated. |
| 57 | + |
| 58 | +## Chart Playground 🎡 |
| 59 | + |
| 60 | +This new feature should make it easier to create and edit chart extensions: UI schema and features. |
| 61 | + |
| 62 | +The main goal of the Chart Playground is to validate the syntax of chart extensions and show the resulting inputs and features visually before building and testing an actual version of a chart. |
| 63 | + |
| 64 | +Also, the Chart Playground always runs in a context of a specific env. The reasoning is that many inputs may depend on data from the env, for example other deployments, secrets and deployment resources. |
| 65 | + |
| 66 | +An env's Chart Playground can be accessed from the Env menu in Platz's navbar. |
| 67 | + |
| 68 | +## Multiple `chart-discovery` Workers |
| 69 | + |
| 70 | +Similarly to k8s-agent, `chart-discovery` runs with a role that has credentials to access a certain account with ECR repositories. |
| 71 | + |
| 72 | +In cases where multiple AWS accounts or roles are required, you can now run multiple `chart-discovery` workers. |
| 73 | + |
| 74 | +Each worker monitors its own SQS queue with ECR notifications. Note that although running multiple workers against the same queue, this was not tested nor recommended. |
| 75 | + |
| 76 | +Refer to [Platz's Terraform module](https://github.com/platzio/terraform-aws-platzio) for how to configure multiple `chart-discovery` workers. |
| 77 | + |
| 78 | +## OpenAPI Schemas + SDKs |
| 79 | + |
| 80 | +OpenAPI schemas are now generated on backend build and saved for each release. |
| 81 | + |
| 82 | +For example, see the release page for this release: [https://github.com/platzio/backend/releases/tag/v0.5.0](https://github.com/platzio/backend/releases/tag/v0.5.0). |
| 83 | + |
| 84 | +This OpenAPI schema is used to auto-generate SDKs, the first of which is [Platz's SDK for Javascript published to NPM](https://www.npmjs.com/package/@platzio/sdk). |
| 85 | + |
| 86 | +Platz's frontend was adapted to use the SDK types and will be migrated to use all actions in a future release. |
| 87 | + |
| 88 | +The [Rust SDK](https://github.com/platzio/sdk-rs/) is still maintained manually and still be auto-generated in a future release. |
| 89 | + |
| 90 | +## Kubernetes Clusters Ignored By Default |
| 91 | + |
| 92 | +*Thanks @ayalash for this contribution!* |
| 93 | + |
| 94 | +New Kubernetes clusters are now ignored by default and have to be enabled manually in each env. |
| 95 | + |
| 96 | +This is done to prevent new clusters from becoming automatically visible to users without being configured properly first. |
| 97 | + |
| 98 | +## Diesel 2.0 |
| 99 | + |
| 100 | +The backend was upgraded to using [Diesel 2.0](http://diesel.rs/). |
| 101 | + |
| 102 | +## Deprecations |
| 103 | + |
| 104 | +### Tag Formats |
| 105 | + |
| 106 | +Tag formats were an attempt to add version, branch and commit metadata into Git tags and Helm chart versions. |
| 107 | + |
| 108 | +This approach turned out to be troublesome since tags were sometimes very long, hard to read, and limited to 64 characters in Helm versions. |
| 109 | + |
| 110 | +Existing parsed data is already saved in Platz's database and should not be affected. |
| 111 | + |
| 112 | +👉 As of v0.5, parsing of Tag Formats has to be **manually enabled** in `chart-discovery`. This is to prevent multiple `chart-discovery` workers from deleting metadata when starting and to encourage this feature to be disabled. |
| 113 | + |
| 114 | +👉 Since the new chart annotations provide more metadata, Tag Formats will be removed as of v0.6. |
| 115 | + |
| 116 | +### API v1 |
| 117 | + |
| 118 | +API v1 was, well, the first API of Platz. It did not have authentication as it was used in a closed network. To protect users installing Platz using the default configuration, API v1 is disabled by default by not exposing it in Platz's ingress. |
| 119 | + |
| 120 | +API v2 supports all routers of v1, with the addition of authentication and pagination. |
| 121 | + |
| 122 | +👉 API v1 will be removed as of Platz v0.6. |
0 commit comments