Skip to content

Commit

Permalink
feat(manager): add sveltos manager
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Bähler <[email protected]>
  • Loading branch information
oliverbaehler committed Jul 10, 2024
1 parent 0d6dfd1 commit fcaf6ef
Show file tree
Hide file tree
Showing 12 changed files with 649 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/modules/manager/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import * as runtimeVersion from './runtime-version';
import * as sbt from './sbt';
import * as scalafmt from './scalafmt';
import * as setupCfg from './setup-cfg';
import * as sveltos from './sveltos';
import * as swift from './swift';
import * as tekton from './tekton';
import * as terraform from './terraform';
Expand Down Expand Up @@ -176,6 +177,7 @@ api.set('runtime-version', runtimeVersion);
api.set('sbt', sbt);
api.set('scalafmt', scalafmt);
api.set('setup-cfg', setupCfg);
api.set('sveltos', sveltos);
api.set('swift', swift);
api.set('tekton', tekton);
api.set('terraform', terraform);
Expand Down
38 changes: 38 additions & 0 deletions lib/modules/manager/sveltos/__fixtures__/malformedProfiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# malformed eventtrigger as the source is null
apiVersion: lib.projectsveltos.io/v1beta1
kind: EventTrigger
spec:
helmCharts: []
---
# malformed eventtrigger as the source is empty
apiVersion: lib.projectsveltos.io/v1beta1
kind: EventTrigger
spec:
helmCharts: null
---
# malformed clusterprofile as the sources array is empty
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
spec:
helmCharts: []
---
# malformed clusterprofile as the source is null
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
spec:
helmCharts: null
---
# malformed profile as the sources array is empty
apiVersion: config.projectsveltos.io/v1beta1
kind: Profile
spec:
helmCharts: []
---
# malformed profile as the source is null
apiVersion: config.projectsveltos.io/v1beta1
kind: Profile
spec:
helmCharts: null


21 changes: 21 additions & 0 deletions lib/modules/manager/sveltos/__fixtures__/randomManifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
49 changes: 49 additions & 0 deletions lib/modules/manager/sveltos/__fixtures__/validClusterProfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: baseline
spec:
helmCharts:
- repositoryURL: https://prometheus-community.github.io/helm-charts
repositoryName: prometheus-community
chartName: prometheus-community/prometheus
chartVersion: "23.4.0"
- repositoryURL: https://kyverno.github.io/kyverno/
repositoryName: kyverno
chartName: kyverno/kyverno
chartVersion: "v3.2.5"
---
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: kyverno
spec:
helmCharts:
- repositoryURL: https://kyverno.github.io/kyverno/
repositoryName: kyverno
chartName: kyverno/kyverno-policies
chartVersion: v3.2.0
releaseName: kyverno-latest
releaseNamespace: kyverno
helmChartAction: Install
values: |
admissionController:
replicas: 1
---
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
name: vault
spec:
syncMode: Continuous
helmCharts:
- repositoryURL: oci://registry-1.docker.io/bitnamicharts/vault
repositoryName: oci-vault
chartName: oci://registry-1.docker.io/bitnamicharts/vault
chartVersion: 0.7.2
- repositoryURL: oci://custom-registry:443/charts/vault-sidecar
repositoryName: oci-custom-vault
chartName: oci://custom-registry:443/charts/vault-sidecar
chartVersion: 0.5.0

48 changes: 48 additions & 0 deletions lib/modules/manager/sveltos/__fixtures__/validEventTrigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
apiVersion: lib.projectsveltos.io/v1beta1
kind: EventTrigger
metadata:
name: baseline
spec:
helmCharts:
- repositoryURL: https://prometheus-community.github.io/helm-charts
repositoryName: prometheus-community
chartName: prometheus-community/prometheus
chartVersion: "23.4.0"
- repositoryURL: https://kyverno.github.io/kyverno/
repositoryName: kyverno
chartName: kyverno/kyverno
chartVersion: "v3.2.5"
---
apiVersion: lib.projectsveltos.io/v1beta1
kind: EventTrigger
metadata:
name: kyverno
spec:
helmCharts:
- repositoryURL: https://kyverno.github.io/kyverno/
repositoryName: kyverno
chartName: kyverno/kyverno-policies
chartVersion: v3.2.0
releaseName: kyverno-latest
releaseNamespace: kyverno
helmChartAction: Install
values: |
admissionController:
replicas: 1
---
apiVersion: lib.projectsveltos.io/v1beta1
kind: EventTrigger
metadata:
name: vault
spec:
syncMode: Continuous
helmCharts:
- repositoryURL: oci://registry-1.docker.io/bitnamicharts/vault
repositoryName: oci-vault
chartName: oci://registry-1.docker.io/bitnamicharts/vault
chartVersion: 0.7.2
- repositoryURL: oci://custom-registry:443/charts/vault-sidecar
repositoryName: oci-custom-vault
chartName: oci://custom-registry:443/charts/vault-sidecar
chartVersion: 0.5.0
49 changes: 49 additions & 0 deletions lib/modules/manager/sveltos/__fixtures__/validProfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
apiVersion: config.projectsveltos.io/v1beta1
kind: Profile
metadata:
name: baseline
spec:
helmCharts:
- repositoryURL: https://prometheus-community.github.io/helm-charts
repositoryName: prometheus-community
chartName: prometheus-community/prometheus
chartVersion: "23.4.0"
- repositoryURL: https://kyverno.github.io/kyverno/
repositoryName: kyverno
chartName: kyverno/kyverno
chartVersion: "v3.2.5"
---
apiVersion: config.projectsveltos.io/v1beta1
kind: Profile
metadata:
name: kyverno
spec:
helmCharts:
- repositoryURL: https://kyverno.github.io/kyverno/
repositoryName: kyverno
chartName: kyverno/kyverno-policies
chartVersion: v3.2.0
releaseName: kyverno-latest
releaseNamespace: kyverno
helmChartAction: Install
values: |
admissionController:
replicas: 1
---
apiVersion: config.projectsveltos.io/v1beta1
kind: Profile
metadata:
name: vault
spec:
syncMode: Continuous
helmCharts:
- repositoryURL: oci://registry-1.docker.io/bitnamicharts/vault
repositoryName: oci-vault
chartName: oci://registry-1.docker.io/bitnamicharts/vault
chartVersion: 0.7.2
- repositoryURL: oci://custom-registry:443/charts/vault-sidecar
repositoryName: oci-custom-vault
chartName: oci://custom-registry:443/charts/vault-sidecar
chartVersion: 0.5.0

Loading

0 comments on commit fcaf6ef

Please sign in to comment.