From 9c4c88d7d9635770b841b2f970fc511976ee2b95 Mon Sep 17 00:00:00 2001 From: Derek Su Date: Fri, 10 Jan 2025 13:46:35 +0800 Subject: [PATCH 1/5] WIP Signed-off-by: Derek Su --- .github/workflows/mark-stable-version.yaml | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/mark-stable-version.yaml diff --git a/.github/workflows/mark-stable-version.yaml b/.github/workflows/mark-stable-version.yaml new file mode 100644 index 0000000000..1b4d41b07f --- /dev/null +++ b/.github/workflows/mark-stable-version.yaml @@ -0,0 +1,45 @@ +name: Mark Stable Version + +on: + workflow_dispatch: # 手動觸發 workflow + inputs: + stable_version: + description: '要標記為穩定的版本 (例如: 1.7.2)' + required: false # 非必要參數 + inactive_release: + description: '要標記為不活躍的版本 (例如: 1.5)' + required: false # 非必要參數 + +jobs: + update-releases: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install Packages + run: sudo apt-get update && sudo apt-get install -y jq + + - name: Get Releases + id: get_releases + run: | + curl -sSL https://api.github.com/repos/derekbit/longhorn/releases | jq '.[]' > releases.json + + - name: Mark Stable Version + if: github.event.inputs.stable_version != '' + run: | + stable_version="${{ github.event.inputs.stable_version }}" + echo "Marking $stable_version as stable" + sed -i "s/| \*\*${stable_version%%.*}\*\*\* |.*| $stable_version |/| \*\*${stable_version%%.*}\*\*\* |.*| $stable_version (Stable) |/" README.md + + - name: Mark Inactive Release + if: github.event.inputs.inactive_release != '' + run: | + inactive_release="${{ github.event.inputs.inactive_release }}" + echo "Marking $inactive_release as inactive" + sed -i "s/| ${inactive_release} |.*| ✅ |/| ${inactive_release} |.*| |/" README.md + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Update releases information" + branch: ${{ github.ref }} From 0b12da53ed14287cca57493fbfc0b53140b338fd Mon Sep 17 00:00:00 2001 From: Derek Su Date: Fri, 10 Jan 2025 13:54:21 +0800 Subject: [PATCH 2/5] WIP Signed-off-by: Derek Su --- .github/workflows/mark-stable-version.yaml | 88 +++++++++++++++------- 1 file changed, 60 insertions(+), 28 deletions(-) diff --git a/.github/workflows/mark-stable-version.yaml b/.github/workflows/mark-stable-version.yaml index 1b4d41b07f..dbf42fee41 100644 --- a/.github/workflows/mark-stable-version.yaml +++ b/.github/workflows/mark-stable-version.yaml @@ -1,45 +1,77 @@ -name: Mark Stable Version +name: Update Releases # Name of the workflow on: - workflow_dispatch: # 手動觸發 workflow + workflow_dispatch: # Trigger the workflow manually inputs: - stable_version: - description: '要標記為穩定的版本 (例如: 1.7.2)' - required: false # 非必要參數 - inactive_release: - description: '要標記為不活躍的版本 (例如: 1.5)' - required: false # 非必要參數 + stable_version: # Input parameter for stable version + description: 'Version to mark as stable (e.g., 1.7.2)' # Parameter description + required: false # Not a required parameter + inactive_release: # Input parameter for inactive release + description: 'Version to mark as inactive (e.g., 1.5)' # Parameter description + required: false # Not a required parameter jobs: - update-releases: - runs-on: ubuntu-latest + update-releases: # Job to update release information + runs-on: ubuntu-latest # Run on the latest Ubuntu version steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 # Check out the code - - name: Install Packages + - name: Install Packages # Install necessary packages run: sudo apt-get update && sudo apt-get install -y jq - - name: Get Releases - id: get_releases + - name: Get Releases # Get release information from GitHub API + id: get_releases # Set the step ID for future reference run: | - curl -sSL https://api.github.com/repos/derekbit/longhorn/releases | jq '.[]' > releases.json + curl -sSL https://api.github.com/repos/longhorn/longhorn/releases | jq '.[]' > releases.json # Use curl to get JSON data and jq to process it, saving to releases.json - - name: Mark Stable Version - if: github.event.inputs.stable_version != '' + - name: Mark Stable Version # Step to mark a stable version + if: github.event.inputs.stable_version != '' # Only run if stable_version is provided run: | - stable_version="${{ github.event.inputs.stable_version }}" - echo "Marking $stable_version as stable" - sed -i "s/| \*\*${stable_version%%.*}\*\*\* |.*| $stable_version |/| \*\*${stable_version%%.*}\*\*\* |.*| $stable_version (Stable) |/" README.md + stable_version="${{ github.event.inputs.stable_version }}" # Get the input stable version + echo "Input stable version: $stable_version" # Output debug message + major_version="${stable_version%%.*}" # Extract the major version number (e.g., 1.7.2 becomes 1.7) + echo "Major version: $major_version" # Output debug message - - name: Mark Inactive Release - if: github.event.inputs.inactive_release != '' + # Check if the major version exists in README.md + if grep -q "| \*\*${major_version}\*\*\* |" README.md; then # Use grep -q for silent check + echo "Found major version in README.md: ${major_version}" # Output debug message + # Use a more precise sed command to ensure only the target line is modified + if sed -i "s/| \*\*${major_version}\*\*\* |.*| ${stable_version} |/| \*\*${major_version}\*\*\* |.*| ${stable_version} (Stable) |/" README.md; then # Use sed to replace the string + echo "Successfully marked ${stable_version} as stable." # Output success message + grep "| \*\*${major_version}\*\*\* |.*| ${stable_version} (Stable) |" README.md # Use grep to verify the modification and output the result + else + echo "Failed to mark ${stable_version} as stable! Check the sed command." # Output error message + exit 1 # Fail the workflow to prevent further errors + fi + else + echo "Major version ${major_version} not found in README.md, cannot mark as stable." # Output error message + exit 1 # Fail the workflow + fi + + - name: Mark Inactive Release # Step to mark an inactive release + if: github.event.inputs.inactive_release != '' # Only run if inactive_release is provided run: | - inactive_release="${{ github.event.inputs.inactive_release }}" - echo "Marking $inactive_release as inactive" - sed -i "s/| ${inactive_release} |.*| ✅ |/| ${inactive_release} |.*| |/" README.md + inactive_release="${{ github.event.inputs.inactive_release }}" # Get the input inactive release + echo "Input inactive version: $inactive_release" # Output debug message + + # Check if the version number exists in README.md + if grep -q "| ${inactive_release} |" README.md; then # Use grep -q for silent check + echo "Found version number in README.md: ${inactive_release}" # Output debug message + # Use a more precise sed command + if sed -i "s/| ${inactive_release} |.*| ✅ |/| ${inactive_release} |.*| |/" README.md; then # Use sed to replace the string + echo "Successfully marked ${inactive_release} as inactive." # Output success message + grep "| ${inactive_release} |.*| |" README.md # Use grep to verify the modification and output the result + else + echo "Failed to mark ${inactive_release} as inactive! Check the sed command." # Output error message + exit 1 # Fail the workflow + fi + else + echo "Version number ${inactive_release} not found in README.md, cannot mark as inactive." # Output error message + exit 1 # Fail the workflow + fi - - name: Commit changes + - name: Commit changes # Commit the modified README.md uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: "Update releases information" - branch: ${{ github.ref }} + commit_message: "Update Releases information" # Commit message + branch: ${{ github.ref }} # Push to the branch that triggered the workflow \ No newline at end of file From 8df3ebae6c301f47da3678dc52fbada786272817 Mon Sep 17 00:00:00 2001 From: Derek Su Date: Fri, 10 Jan 2025 13:55:32 +0800 Subject: [PATCH 3/5] WIP Signed-off-by: Derek Su --- .github/workflows/mark-stable-version.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mark-stable-version.yaml b/.github/workflows/mark-stable-version.yaml index dbf42fee41..d759049873 100644 --- a/.github/workflows/mark-stable-version.yaml +++ b/.github/workflows/mark-stable-version.yaml @@ -22,7 +22,7 @@ jobs: - name: Get Releases # Get release information from GitHub API id: get_releases # Set the step ID for future reference run: | - curl -sSL https://api.github.com/repos/longhorn/longhorn/releases | jq '.[]' > releases.json # Use curl to get JSON data and jq to process it, saving to releases.json + curl -sSL https://api.github.com/repos/derekbit/longhorn/releases | jq '.[]' > releases.json # Use curl to get JSON data and jq to process it, saving to releases.json - name: Mark Stable Version # Step to mark a stable version if: github.event.inputs.stable_version != '' # Only run if stable_version is provided From d5c26eefeb50bd71cb1fd1e6109ad96cf3bb3569 Mon Sep 17 00:00:00 2001 From: Derek Su Date: Fri, 10 Jan 2025 13:57:32 +0800 Subject: [PATCH 4/5] WIP Signed-off-by: Derek Su --- .github/workflows/mark-stable-version.yaml | 97 ++++++++++------------ 1 file changed, 46 insertions(+), 51 deletions(-) diff --git a/.github/workflows/mark-stable-version.yaml b/.github/workflows/mark-stable-version.yaml index d759049873..ab5efecc78 100644 --- a/.github/workflows/mark-stable-version.yaml +++ b/.github/workflows/mark-stable-version.yaml @@ -1,77 +1,72 @@ -name: Update Releases # Name of the workflow +name: Update Releases on: - workflow_dispatch: # Trigger the workflow manually + workflow_dispatch: inputs: - stable_version: # Input parameter for stable version - description: 'Version to mark as stable (e.g., 1.7.2)' # Parameter description - required: false # Not a required parameter - inactive_release: # Input parameter for inactive release - description: 'Version to mark as inactive (e.g., 1.5)' # Parameter description - required: false # Not a required parameter + stable_version: + description: 'Version to mark as stable (e.g., 1.7.2)' + required: false + inactive_release: + description: 'Version to mark as inactive (e.g., 1.5)' + required: false jobs: - update-releases: # Job to update release information - runs-on: ubuntu-latest # Run on the latest Ubuntu version + update-releases: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # Check out the code + - uses: actions/checkout@v3 - - name: Install Packages # Install necessary packages + - name: Install Packages run: sudo apt-get update && sudo apt-get install -y jq - - name: Get Releases # Get release information from GitHub API - id: get_releases # Set the step ID for future reference + - name: Get Releases + id: get_releases run: | - curl -sSL https://api.github.com/repos/derekbit/longhorn/releases | jq '.[]' > releases.json # Use curl to get JSON data and jq to process it, saving to releases.json + curl -sSL https://api.github.com/repos/longhorn/longhorn/releases | jq '.[]' > releases.json - - name: Mark Stable Version # Step to mark a stable version - if: github.event.inputs.stable_version != '' # Only run if stable_version is provided + - name: Mark Stable Version + if: github.event.inputs.stable_version != '' run: | - stable_version="${{ github.event.inputs.stable_version }}" # Get the input stable version - echo "Input stable version: $stable_version" # Output debug message - major_version="${stable_version%%.*}" # Extract the major version number (e.g., 1.7.2 becomes 1.7) - echo "Major version: $major_version" # Output debug message + stable_version="${{ github.event.inputs.stable_version }}" + echo "Input stable version: $stable_version" - # Check if the major version exists in README.md - if grep -q "| \*\*${major_version}\*\*\* |" README.md; then # Use grep -q for silent check - echo "Found major version in README.md: ${major_version}" # Output debug message - # Use a more precise sed command to ensure only the target line is modified - if sed -i "s/| \*\*${major_version}\*\*\* |.*| ${stable_version} |/| \*\*${major_version}\*\*\* |.*| ${stable_version} (Stable) |/" README.md; then # Use sed to replace the string - echo "Successfully marked ${stable_version} as stable." # Output success message - grep "| \*\*${major_version}\*\*\* |.*| ${stable_version} (Stable) |" README.md # Use grep to verify the modification and output the result + # Check if the FULL version exists in README.md + if grep -q "| ${stable_version} |" README.md; then #Match full version + echo "Found full version in README.md: ${stable_version}" + # Use sed to add "(Stable)" to the correct cell in the table + if sed -i "s/| ${stable_version} |/| ${stable_version} (Stable) |/" README.md; then + echo "Successfully marked ${stable_version} as stable." + grep "| ${stable_version} (Stable) |" README.md # Verify the change else - echo "Failed to mark ${stable_version} as stable! Check the sed command." # Output error message - exit 1 # Fail the workflow to prevent further errors + echo "Failed to mark ${stable_version} as stable! Check the sed command." + exit 1 fi else - echo "Major version ${major_version} not found in README.md, cannot mark as stable." # Output error message - exit 1 # Fail the workflow + echo "Full version ${stable_version} not found in README.md, cannot mark as stable." + exit 1 fi - - name: Mark Inactive Release # Step to mark an inactive release - if: github.event.inputs.inactive_release != '' # Only run if inactive_release is provided + - name: Mark Inactive Release + if: github.event.inputs.inactive_release != '' run: | - inactive_release="${{ github.event.inputs.inactive_release }}" # Get the input inactive release - echo "Input inactive version: $inactive_release" # Output debug message - - # Check if the version number exists in README.md - if grep -q "| ${inactive_release} |" README.md; then # Use grep -q for silent check - echo "Found version number in README.md: ${inactive_release}" # Output debug message - # Use a more precise sed command - if sed -i "s/| ${inactive_release} |.*| ✅ |/| ${inactive_release} |.*| |/" README.md; then # Use sed to replace the string - echo "Successfully marked ${inactive_release} as inactive." # Output success message - grep "| ${inactive_release} |.*| |" README.md # Use grep to verify the modification and output the result + inactive_release="${{ github.event.inputs.inactive_release }}" + echo "Input inactive version: $inactive_release" + if grep -q "| ${inactive_release} |" README.md; then + echo "Found version number in README.md: ${inactive_release}" + if sed -i "s/| ${inactive_release} |.*| ✅ |/| ${inactive_release} |.*| |/" README.md; then + echo "Successfully marked ${inactive_release} as inactive." + grep "| ${inactive_release} |.*| |" README.md else - echo "Failed to mark ${inactive_release} as inactive! Check the sed command." # Output error message - exit 1 # Fail the workflow + echo "Failed to mark ${inactive_release} as inactive! Check the sed command." + exit 1 fi else - echo "Version number ${inactive_release} not found in README.md, cannot mark as inactive." # Output error message - exit 1 # Fail the workflow + echo "Version number ${inactive_release} not found in README.md, cannot mark as inactive." + exit 1 fi - - name: Commit changes # Commit the modified README.md + - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: "Update Releases information" # Commit message - branch: ${{ github.ref }} # Push to the branch that triggered the workflow \ No newline at end of file + commit_message: "Update Releases information" + branch: ${{ github.ref }} \ No newline at end of file From 4ee7196cca6c6b38c839de57374e82f679e82094 Mon Sep 17 00:00:00 2001 From: Derek Su Date: Fri, 17 Jan 2025 16:55:19 +0800 Subject: [PATCH 5/5] chore(crd): update crds.yaml and manifests Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- chart/templates/crds.yaml | 125 +++++++++++++++++----------------- deploy/longhorn-okd.yaml | 137 ++++++++++---------------------------- deploy/longhorn.yaml | 137 ++++++++++---------------------------- 3 files changed, 138 insertions(+), 261 deletions(-) diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index eab89b39f3..27bf4155f6 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -1,9 +1,10 @@ +# Generated by the CRDs from github.com/longhorn/longhorn-manager/k8s/pkg/apis apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: backingimagedatasources.longhorn.io spec: @@ -189,7 +190,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: backingimagemanagers.longhorn.io spec: @@ -382,7 +383,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: backingimages.longhorn.io spec: @@ -392,7 +393,7 @@ spec: clientConfig: service: name: longhorn-conversion-webhook - namespace: {{ include "release_namespace" . }} + namespace: longhorn-system path: /v1/webhook/conversion port: 9501 conversionReviewVersions: @@ -579,8 +580,9 @@ spec: ownerID: type: string realSize: - description: Real size of image in bytes, which may be smaller than the size - when the file is a sparse file. Will be zero until known (e.g. while a backing image is uploading) + description: Real size of image in bytes, which may be smaller than + the size when the file is a sparse file. Will be zero until known + (e.g. while a backing image is uploading) format: int64 type: integer size: @@ -594,8 +596,9 @@ spec: description: It is pending -> in-progress -> ready/failed type: string virtualSize: - description: Virtual size of image in bytes, which may be larger than physical - size. Will be zero until known (e.g. while a backing image is uploading) + description: Virtual size of image in bytes, which may be larger than + physical size. Will be zero until known (e.g. while a backing image + is uploading) format: int64 type: integer type: object @@ -610,7 +613,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: backupbackingimages.longhorn.io spec: @@ -673,8 +676,7 @@ spec: backing image backup properties: backingImage: - description: The backing image name.. - nullable: true + description: The backing image name. type: string backupTargetName: description: The backup target name. @@ -692,11 +694,10 @@ spec: nullable: true type: string userCreated: - description: |- - Is this CR created by user through API or UI. - Required + description: Is this CR created by user through API or UI. type: boolean required: + - backingImage - userCreated type: object status: @@ -752,7 +753,8 @@ spec: description: Record the secret if this backup backing image is encrypted type: string secretNamespace: - description: Record the secret namespace if this backup backing image is encrypted + description: Record the secret namespace if this backup backing image + is encrypted type: string size: description: The backing image size. @@ -778,7 +780,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: backups.longhorn.io spec: @@ -1008,7 +1010,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: backuptargets.longhorn.io spec: @@ -1018,7 +1020,7 @@ spec: clientConfig: service: name: longhorn-conversion-webhook - namespace: {{ include "release_namespace" . }} + namespace: longhorn-system path: /v1/webhook/conversion port: 9501 conversionReviewVersions: @@ -1209,7 +1211,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: backupvolumes.longhorn.io spec: @@ -1399,7 +1401,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: engineimages.longhorn.io spec: @@ -1409,7 +1411,7 @@ spec: clientConfig: service: name: longhorn-conversion-webhook - namespace: {{ include "release_namespace" . }} + namespace: longhorn-system path: /v1/webhook/conversion port: 9501 conversionReviewVersions: @@ -1611,7 +1613,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: engines.longhorn.io spec: @@ -2007,7 +2009,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: instancemanagers.longhorn.io spec: @@ -2144,6 +2146,29 @@ spec: type: integer apiVersion: type: integer + backingImages: + additionalProperties: + properties: + currentChecksum: + type: string + diskUUID: + type: string + message: + type: string + name: + type: string + progress: + type: integer + size: + format: int64 + type: integer + state: + type: string + uuid: + type: string + type: object + nullable: true + type: object currentState: type: string dataEngineStatus: @@ -2310,28 +2335,6 @@ spec: type: integer proxyApiVersion: type: integer - backingImages: - additionalProperties: - properties: - currentChecksum: - type: string - diskUUID: - type: string - message: - type: string - name: - type: string - progress: - type: integer - size: - format: int64 - type: integer - state: - type: string - uuid: - type: string - type: object - type: object type: object type: object served: true @@ -2344,7 +2347,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: nodes.longhorn.io spec: @@ -2354,7 +2357,7 @@ spec: clientConfig: service: name: longhorn-conversion-webhook - namespace: {{ include "release_namespace" . }} + namespace: longhorn-system path: /v1/webhook/conversion port: 9501 conversionReviewVersions: @@ -2629,7 +2632,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: orphans.longhorn.io spec: @@ -2740,7 +2743,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: recurringjobs.longhorn.io spec: @@ -2936,7 +2939,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: replicas.longhorn.io spec: @@ -3221,7 +3224,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: settings.longhorn.io spec: @@ -3334,7 +3337,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: sharemanagers.longhorn.io spec: @@ -3461,7 +3464,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: snapshots.longhorn.io spec: @@ -3539,7 +3542,6 @@ spec: description: |- the volume that this snapshot belongs to. This field is immutable after creation. - Required type: string required: - volume @@ -3591,7 +3593,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: supportbundles.longhorn.io spec: @@ -3722,7 +3724,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: systembackups.longhorn.io spec: @@ -3859,7 +3861,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: systemrestores.longhorn.io spec: @@ -3968,7 +3970,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: volumeattachments.longhorn.io spec: @@ -4112,7 +4114,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 - labels: {{- include "longhorn.labels" . | nindent 4 }} + labels: longhorn-manager: "" name: volumes.longhorn.io spec: @@ -4122,7 +4124,7 @@ spec: clientConfig: service: name: longhorn-conversion-webhook - namespace: {{ include "release_namespace" . }} + namespace: longhorn-system path: /v1/webhook/conversion port: 9501 conversionReviewVersions: @@ -4266,7 +4268,8 @@ spec: - gzip type: string backupTargetName: - description: 'The backup target name that the volume will be backed up to or is synced.' + description: The backup target name that the volume will be backed + up to or is synced. type: string dataEngine: enum: diff --git a/deploy/longhorn-okd.yaml b/deploy/longhorn-okd.yaml index bd6958872e..b7a339a26f 100644 --- a/deploy/longhorn-okd.yaml +++ b/deploy/longhorn-okd.yaml @@ -115,15 +115,13 @@ data: dataEngine: "v1" --- # Source: longhorn/templates/crds.yaml +# Generated by the CRDs from github.com/longhorn/longhorn-manager/k8s/pkg/apis apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backingimagedatasources.longhorn.io spec: @@ -311,9 +309,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backingimagemanagers.longhorn.io spec: @@ -508,9 +503,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backingimages.longhorn.io spec: @@ -707,8 +699,9 @@ spec: ownerID: type: string realSize: - description: Real size of image in bytes, which may be smaller than the size - when the file is a sparse file. Will be zero until known (e.g. while a backing image is uploading) + description: Real size of image in bytes, which may be smaller than + the size when the file is a sparse file. Will be zero until known + (e.g. while a backing image is uploading) format: int64 type: integer size: @@ -722,8 +715,9 @@ spec: description: It is pending -> in-progress -> ready/failed type: string virtualSize: - description: Virtual size of image in bytes, which may be larger than physical - size. Will be zero until known (e.g. while a backing image is uploading) + description: Virtual size of image in bytes, which may be larger than + physical size. Will be zero until known (e.g. while a backing image + is uploading) format: int64 type: integer type: object @@ -740,9 +734,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backupbackingimages.longhorn.io spec: @@ -805,8 +796,7 @@ spec: backing image backup properties: backingImage: - description: The backing image name.. - nullable: true + description: The backing image name. type: string backupTargetName: description: The backup target name. @@ -824,11 +814,10 @@ spec: nullable: true type: string userCreated: - description: |- - Is this CR created by user through API or UI. - Required + description: Is this CR created by user through API or UI. type: boolean required: + - backingImage - userCreated type: object status: @@ -884,7 +873,8 @@ spec: description: Record the secret if this backup backing image is encrypted type: string secretNamespace: - description: Record the secret namespace if this backup backing image is encrypted + description: Record the secret namespace if this backup backing image + is encrypted type: string size: description: The backing image size. @@ -912,9 +902,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backups.longhorn.io spec: @@ -1146,9 +1133,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backuptargets.longhorn.io spec: @@ -1351,9 +1335,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backupvolumes.longhorn.io spec: @@ -1545,9 +1526,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: engineimages.longhorn.io spec: @@ -1761,9 +1739,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: engines.longhorn.io spec: @@ -2161,9 +2136,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: instancemanagers.longhorn.io spec: @@ -2300,6 +2272,29 @@ spec: type: integer apiVersion: type: integer + backingImages: + additionalProperties: + properties: + currentChecksum: + type: string + diskUUID: + type: string + message: + type: string + name: + type: string + progress: + type: integer + size: + format: int64 + type: integer + state: + type: string + uuid: + type: string + type: object + nullable: true + type: object currentState: type: string dataEngineStatus: @@ -2466,28 +2461,6 @@ spec: type: integer proxyApiVersion: type: integer - backingImages: - additionalProperties: - properties: - currentChecksum: - type: string - diskUUID: - type: string - message: - type: string - name: - type: string - progress: - type: integer - size: - format: int64 - type: integer - state: - type: string - uuid: - type: string - type: object - type: object type: object type: object served: true @@ -2502,9 +2475,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: nodes.longhorn.io spec: @@ -2791,9 +2761,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: orphans.longhorn.io spec: @@ -2906,9 +2873,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: recurringjobs.longhorn.io spec: @@ -3106,9 +3070,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: replicas.longhorn.io spec: @@ -3395,9 +3356,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: settings.longhorn.io spec: @@ -3512,9 +3470,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: sharemanagers.longhorn.io spec: @@ -3643,9 +3598,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: snapshots.longhorn.io spec: @@ -3723,7 +3675,6 @@ spec: description: |- the volume that this snapshot belongs to. This field is immutable after creation. - Required type: string required: - volume @@ -3777,9 +3728,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: supportbundles.longhorn.io spec: @@ -3912,9 +3860,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: systembackups.longhorn.io spec: @@ -4053,9 +3998,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: systemrestores.longhorn.io spec: @@ -4166,9 +4108,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: volumeattachments.longhorn.io spec: @@ -4314,9 +4253,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: volumes.longhorn.io spec: @@ -4470,7 +4406,8 @@ spec: - gzip type: string backupTargetName: - description: 'The backup target name that the volume will be backed up to or is synced.' + description: The backup target name that the volume will be backed + up to or is synced. type: string dataEngine: enum: diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index cfaae5b1b7..4de0c70ad1 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -113,15 +113,13 @@ data: dataEngine: "v1" --- # Source: longhorn/templates/crds.yaml +# Generated by the CRDs from github.com/longhorn/longhorn-manager/k8s/pkg/apis apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backingimagedatasources.longhorn.io spec: @@ -309,9 +307,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backingimagemanagers.longhorn.io spec: @@ -506,9 +501,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backingimages.longhorn.io spec: @@ -705,8 +697,9 @@ spec: ownerID: type: string realSize: - description: Real size of image in bytes, which may be smaller than the size - when the file is a sparse file. Will be zero until known (e.g. while a backing image is uploading) + description: Real size of image in bytes, which may be smaller than + the size when the file is a sparse file. Will be zero until known + (e.g. while a backing image is uploading) format: int64 type: integer size: @@ -720,8 +713,9 @@ spec: description: It is pending -> in-progress -> ready/failed type: string virtualSize: - description: Virtual size of image in bytes, which may be larger than physical - size. Will be zero until known (e.g. while a backing image is uploading) + description: Virtual size of image in bytes, which may be larger than + physical size. Will be zero until known (e.g. while a backing image + is uploading) format: int64 type: integer type: object @@ -738,9 +732,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backupbackingimages.longhorn.io spec: @@ -803,8 +794,7 @@ spec: backing image backup properties: backingImage: - description: The backing image name.. - nullable: true + description: The backing image name. type: string backupTargetName: description: The backup target name. @@ -822,11 +812,10 @@ spec: nullable: true type: string userCreated: - description: |- - Is this CR created by user through API or UI. - Required + description: Is this CR created by user through API or UI. type: boolean required: + - backingImage - userCreated type: object status: @@ -882,7 +871,8 @@ spec: description: Record the secret if this backup backing image is encrypted type: string secretNamespace: - description: Record the secret namespace if this backup backing image is encrypted + description: Record the secret namespace if this backup backing image + is encrypted type: string size: description: The backing image size. @@ -910,9 +900,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backups.longhorn.io spec: @@ -1144,9 +1131,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backuptargets.longhorn.io spec: @@ -1349,9 +1333,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: backupvolumes.longhorn.io spec: @@ -1543,9 +1524,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: engineimages.longhorn.io spec: @@ -1759,9 +1737,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: engines.longhorn.io spec: @@ -2159,9 +2134,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: instancemanagers.longhorn.io spec: @@ -2298,6 +2270,29 @@ spec: type: integer apiVersion: type: integer + backingImages: + additionalProperties: + properties: + currentChecksum: + type: string + diskUUID: + type: string + message: + type: string + name: + type: string + progress: + type: integer + size: + format: int64 + type: integer + state: + type: string + uuid: + type: string + type: object + nullable: true + type: object currentState: type: string dataEngineStatus: @@ -2464,28 +2459,6 @@ spec: type: integer proxyApiVersion: type: integer - backingImages: - additionalProperties: - properties: - currentChecksum: - type: string - diskUUID: - type: string - message: - type: string - name: - type: string - progress: - type: integer - size: - format: int64 - type: integer - state: - type: string - uuid: - type: string - type: object - type: object type: object type: object served: true @@ -2500,9 +2473,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: nodes.longhorn.io spec: @@ -2789,9 +2759,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: orphans.longhorn.io spec: @@ -2904,9 +2871,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: recurringjobs.longhorn.io spec: @@ -3104,9 +3068,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: replicas.longhorn.io spec: @@ -3393,9 +3354,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: settings.longhorn.io spec: @@ -3510,9 +3468,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: sharemanagers.longhorn.io spec: @@ -3641,9 +3596,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: snapshots.longhorn.io spec: @@ -3721,7 +3673,6 @@ spec: description: |- the volume that this snapshot belongs to. This field is immutable after creation. - Required type: string required: - volume @@ -3775,9 +3726,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: supportbundles.longhorn.io spec: @@ -3910,9 +3858,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: systembackups.longhorn.io spec: @@ -4051,9 +3996,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: systemrestores.longhorn.io spec: @@ -4164,9 +4106,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: volumeattachments.longhorn.io spec: @@ -4312,9 +4251,6 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 labels: - app.kubernetes.io/name: longhorn - app.kubernetes.io/instance: longhorn - app.kubernetes.io/version: v1.8.0-dev longhorn-manager: "" name: volumes.longhorn.io spec: @@ -4468,7 +4404,8 @@ spec: - gzip type: string backupTargetName: - description: 'The backup target name that the volume will be backed up to or is synced.' + description: The backup target name that the volume will be backed + up to or is synced. type: string dataEngine: enum: