From 322b5d2df07bac337d7d7904899a76c9fc5939b4 Mon Sep 17 00:00:00 2001 From: Petr Babic Date: Mon, 24 Feb 2025 14:04:53 +0100 Subject: [PATCH 1/5] chore: ignore `.idea` folder --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 85ea915..e8de381 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules public resources .netlify -.hugo_build.lock \ No newline at end of file +.hugo_build.lock +.idea From f72cfe2fe28b141dafa31b1aeb540b2c1c62bd87 Mon Sep 17 00:00:00 2001 From: Petr Babic Date: Mon, 24 Feb 2025 14:06:20 +0100 Subject: [PATCH 2/5] chore: run `npm audit fix` --- package-lock.json | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index bd4f8cc..d04733b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2735,10 +2735,11 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -6097,9 +6098,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -10313,9 +10314,9 @@ } }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -12764,9 +12765,9 @@ "dev": true }, "nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true }, "natural-compare": { From 6ee6e8bbe417bba37d5de84ee43fc4a2867b2203 Mon Sep 17 00:00:00 2001 From: Petr Babic Date: Mon, 24 Feb 2025 14:08:47 +0100 Subject: [PATCH 3/5] docs: add pause feature section --- .../advanced_features/pause-reconciliation.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 content/en/docs/advanced_features/pause-reconciliation.md diff --git a/content/en/docs/advanced_features/pause-reconciliation.md b/content/en/docs/advanced_features/pause-reconciliation.md new file mode 100644 index 0000000..a289618 --- /dev/null +++ b/content/en/docs/advanced_features/pause-reconciliation.md @@ -0,0 +1,50 @@ +--- +title: Pausing Reconciliation +weight: 2000 +--- + +When deploying a `Package`, Package Operator automatically reconciles +all objects under it. Therefore, any changes made to the fields controlled +by Package Operator in the child objects will be reverted by the Package +Operator reconcilers. + +To temporarily stop the reconciliation of these objects, +the `.spec.paused` field has been introduced to the `Package` +and `ObjectDeployment` APIs. When set to `true`, all reconciliation +of the object and its children will be stopped (except for the `.status` +field). + +## 1. Pausing Mechanism + +The `.spec.paused` field is propagated down the ownership chain. +Therefore, after pausing a `Package` object, the underlying `ObjectDeployment` +is paused, then finally, the `ObjectSet` is paused. As a consequence, +an `ObjectDeployment` may be individually paused only when it is not +owned by a `Package` object. + +Even when paused, each object reflects its status properly. When the lowest +object in the Package Operator API chain is paused (i.e., the `ObjectSet`), +the `.status` field of the object is updated with the `Paused` condition +set to true. This condition is then propagated up to the parent objects. + +To unpause the reconciliation of a `Package` or `ObjectDeployment`, simply +set the `.spec.paused` field to `false` or remove it entirely. + +## 2. Pausing via the CLI + +To accommodate pausing the reconciliation of `(Cluster)Package` objects without +the need for manual editing, the `pause` and `unpause` subcommands have been +added to the `kubectl package` CLI. + +The command modifies the `.spec.paused` field and the waits for the object +to report the `Paused` condition. It also allows the user to provide +a message (e.g., the reason for the pause) +which will be stored in the `package-operator.run/pause-message` +annotation. + +Usage: + +```bash +kubectl package pause / [-n ] [-m ] +kubectl package unpause / [-n ] +``` From 1c22cd168904bc7d93877803ec84b3c674e62279 Mon Sep 17 00:00:00 2001 From: Petr Babic Date: Mon, 24 Feb 2025 15:24:17 +0100 Subject: [PATCH 4/5] chore: update CI dependencies --- .github/workflows/deploy.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index ab3b048..21dc789 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -8,7 +8,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: @@ -27,13 +27,12 @@ jobs: node-version: '16' - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - - run: npm install - run: npm ci - name: Build From a93c670b399f490e724e05dc43f5b2dd7505f10f Mon Sep 17 00:00:00 2001 From: Petr Babic Date: Mon, 24 Feb 2025 15:25:35 +0100 Subject: [PATCH 5/5] refactor: use hugo version specified in `package.json` --- .github/workflows/deploy.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 21dc789..e8f5150 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -15,12 +15,6 @@ jobs: submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: 'latest' - extended: true - - name: Setup Node uses: actions/setup-node@v2 with: @@ -36,7 +30,7 @@ jobs: - run: npm ci - name: Build - run: hugo --minify + run: npm run build - name: Install Netlify CLI run: npm install -g netlify-cli