-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(manager): add sveltos manager #30087
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Package manager details can be found here: #30090 (comment) |
c7b2ba4
to
979cd3d
Compare
36f2170
to
fcaf6ef
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
e0ca135
to
2d79c49
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Is this ready for another review? BTW It isn't necessary to merge main if there are no conflicts. |
@secustor Yes this is ready for review, Sorry! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs code coverage ( see the failing CI ) and docs changes requested by @HonkingGoose
import { z } from 'zod'; | ||
import { LooseArray } from '../../../util/schema-utils'; | ||
|
||
export const KubernetesResource = z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we reuse the schema from kubernetes/ kustomize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, i have extended the object. Is that okay or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should unify it
renovate/lib/modules/manager/flux/schema.ts
Lines 3 to 13 in 302718f
export const KubernetesResource = z.object({ | |
apiVersion: z.string(), | |
kind: z.string(), | |
metadata: z.object({ | |
name: z.string(), | |
// For Flux, the namespace property is optional, but matching HelmReleases to HelmRepositories would be | |
// much more difficult without it (we'd have to examine the parent Kustomizations to discover the value), | |
// so we require it for renovation. | |
namespace: z.string().optional(), | |
}), | |
}); |
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
import { z } from 'zod'; | ||
import { LooseArray } from '../../../util/schema-utils'; | ||
|
||
export const KubernetesResource = z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should unify it
renovate/lib/modules/manager/flux/schema.ts
Lines 3 to 13 in 302718f
export const KubernetesResource = z.object({ | |
apiVersion: z.string(), | |
kind: z.string(), | |
metadata: z.object({ | |
name: z.string(), | |
// For Flux, the namespace property is optional, but matching HelmReleases to HelmRepositories would be | |
// much more difficult without it (we'd have to examine the parent Kustomizations to discover the value), | |
// so we require it for renovation. | |
namespace: z.string().optional(), | |
}), | |
}); |
export function extractPackageFile( | ||
content: string, | ||
packageFile: string, | ||
_config?: ExtractConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should support config.registryAliases
.
renovate/lib/modules/manager/flux/extract.ts
Lines 150 to 177 in 302718f
if (matchingRepositories.length) { | |
dep.registryUrls = matchingRepositories | |
.map((repo) => { | |
if (repo.spec.type === 'oci' || isOCIRegistry(repo.spec.url)) { | |
// Change datasource to Docker | |
dep.datasource = DockerDatasource.id; | |
// Ensure the URL is a valid OCI path | |
dep.packageName = getDep( | |
`${removeOCIPrefix(repo.spec.url)}/${ | |
resource.spec.chart.spec.chart | |
}`, | |
false, | |
registryAliases, | |
).depName; | |
return null; | |
} else { | |
return repo.spec.url; | |
} | |
}) | |
.filter(is.string); | |
// if registryUrls is empty, delete it from dep | |
if (!dep.registryUrls?.length) { | |
delete dep.registryUrls; | |
} | |
} else { | |
dep.skipReason = 'unknown-registry'; | |
} |
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
try { | ||
definitions = parseYaml(content, { | ||
customSchema: ProfileDefinition, | ||
}) as any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}) as any; | |
}); |
Do not use any
Changes
This adds the manager for sveltos for GitOps managed Cluster Fleets. Essentially we have the same functionality as argoCD, so we were able to take the argocd manager and adjust the schema etc. I hope that's okay.
Context
Documentation (please check one with an [x])
Not sure if there's more?
How I've tested my work (please select one)
I have verified these changes via: