Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ConfigMaps' formats are not aligned. #8732

Open
blackpiglet opened this issue Feb 28, 2025 · 2 comments
Open

The ConfigMaps' formats are not aligned. #8732

blackpiglet opened this issue Feb 28, 2025 · 2 comments

Comments

@blackpiglet
Copy link
Contributor

blackpiglet commented Feb 28, 2025

Describe the problem/challenge you have

The Velero server and node-agent support several ConfigMaps to customize the settings of some advanced features, but their formats are not aligned, and their valid formats are not well documented.

1. Resource Policy:
https://velero.io/docs/v1.15/resource-filtering/#yaml-template
Resource policy requires YAML in its content.
After creation, the valid content of the ConfigMap is something like this. There is a file name section in the content.

apiVersion: v1
data:
  resource-policy-config.yaml: |
    version: v1
    volumePolicies:
      - conditions:
          storageClass:
            - kibishii-storage-class
        action:
          type: fs-backup
kind: ConfigMap
metadata:
  name: resource-policy-config
  namespace: velero

2. Repository Maintenance Configuration:
https://velero.io/docs/v1.15/repository-maintenance/#affinity-example
The example in the document has some JSON format issues.
It requires JSON as the content.
This is a valid example. There is no file name section in the data content.

apiVersion: v1
kind: ConfigMap
metadata:
  name: repo-maintenance-job-config
  namespace: velero
data:
  global: |
    {
      "podResources": {
        "cpuRequest": "100m",
        "cpuLimit": "200m",
        "memoryRequest": "100Mi",
        "memoryLimit": "200Mi"
      },
      "loadAffinity": [
        {
          "nodeSelector": {
            "matchExpressions": [
              {
                "key": "cloud.google.com/machine-family",
                "operator": "In",
                "values": [
                  "e2"
                ]
              }
            ]
          }
        }
      ]
    }

3. Backup Repository Configuration:
https://velero.io/docs/v1.15/backup-repository-configuration/
The example in the document is a bit confusing. It's better to have a working example.
It requires JSON as the ConfigMap content.
There is no file name section in the data content.

apiVersion: v1
kind: ConfigMap
metadata:
  name: backup-repository-config
  namespace: velero
data:
  "kopia": |
    {
      "cacheLimitMB": 2048    
    }

4. Backup PVC Configuration:
https://velero.io/docs/v1.15/data-movement-backup-pvc-configuration/
The example in the document only shows the content of the data section. It's better to have a created ConfigMap as an example.
It requires JSON as the content.
There is a section to requires the file name in data section.

apiVersion: v1
data:
  node-agent-config.json: |
    {
        "backupPVC": {
            "kibishii-storage-class": {
                "storageClass": "premium-rwo",
                "readOnly": true,
                "spcNoRelabeling": true
            }
        }
    }
kind: ConfigMap
metadata:
  name: node-agent-config
  namespace: velero

5. Node-Agent Configuration
https://velero.io/docs/v1.15/node-agent-concurrency/
Its content is JSON. It has the file name section in the data content.

Describe the solution you'd like

We should document their formats and make their formats aligned.

Anything else you would like to add:

Environment:

  • Velero version (use velero version):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "The project would be better with this feature added"
  • 👎 for "This feature will not enhance the project in a meaningful way"
@kaovilai
Copy link
Member

Thanks for creating issue!

@msfrucht
Copy link
Contributor

The affinity example isn't even a valid json document due to missing quotes around podResources. https://velero.io/docs/v1.15/repository-maintenance/#affinity-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants