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

Sveltos-agent configuration #263

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

gianlucam76
Copy link
Member

Sometimes it is useful to customize sveltos-agent deployment. Classifier accepts a new arg: sveltos-agent-config

That is the name of the ConfigMap in the projectsveltos namespace that contains patches that will be applied to sveltos-agent before it gets deployed in the managed cluster.

For instance, creating this ConfigMap

apiVersion: v1
data:
  patch: |-
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: sveltos-agent
    spec:
      template:
        spec:
          containers:
          - name: manager
            image: projectsveltos/sveltos-agent:dev
            resources:
              requests:
                memory: 512Mi
            securityContext:
              readOnlyRootFilesystem: true
kind: ConfigMap
metadata:
  name: sveltos-agent
  namespace: projectsveltos

and setting the following extra argurment to classifier deployment

      - args:
        ...
        - --sveltos-agent-config=sveltos-agent

the sveltos-agent will be deployed in each managed cluster with 512Mi for request memory and image projectsveltos/sveltos-agent:dev

@gianlucam76 gianlucam76 force-pushed the sveltos-agent-config branch 5 times, most recently from e5cb7a5 to 30d1102 Compare July 9, 2024 10:36
Sometimes it is useful to customize sveltos-agent deployment.
Classifier accepts a new arg: `sveltos-agent-config`

That is the name of the ConfigMap in the `projectsveltos` namespace
that contains patches that will be applied to sveltos-agent
before it gets deployed in the managed cluster.

For instance, creating this ConfigMap

```yaml
apiVersion: v1
data:
  patch: |-
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: sveltos-agent
    spec:
      template:
        spec:
          containers:
          - name: manager
            image: projectsveltos/sveltos-agent:dev
            resources:
              requests:
                memory: 512Mi
            securityContext:
              readOnlyRootFilesystem: true
kind: ConfigMap
metadata:
  name: sveltos-agent
  namespace: projectsveltos
```

and setting the following extra argurment to classifier deployment

```
      - args:
        ...
        - --sveltos-agent-config=sveltos-agent
```

the sveltos-agent will be deployed in each managed cluster with
512Mi for request memory and image `projectsveltos/sveltos-agent:dev`
@gianlucam76 gianlucam76 merged commit 3e6ee90 into projectsveltos:dev Jul 9, 2024
5 checks passed
@gianlucam76 gianlucam76 deleted the sveltos-agent-config branch July 9, 2024 11:08
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

Successfully merging this pull request may close these issues.

1 participant