-
Notifications
You must be signed in to change notification settings - Fork 1
Try out if kro
could be feasible as deployment-tool
#164
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
Comments
EstimationsEstimation of impact on existing code incl. tests
Estimation of impact on Enduser Documentation updated (if applicable)
Estimation of impact on Internal technical Documentation created/updated (if applicable)
Created refinable tasks for the actual implementation
|
Current progress is saved in https://github.com/frewilhelm/ocm-k8s-toolkit/tree/spike_kro (based on #98) |
A potential blocker could be that instances are not reconciled when their graph is updated. Thus, changes will not be propagated to the resources. However, there are at least two issues, one of them a feature request from the maintainers themselves, that address this issue and want to fix it. |
Wow, sounds like a huge simplification! |
In a scenario in which the
To deploy the resource, the user has to deploy the k8s resources The problem arises when the CV is updated with a new version. This triggers an update of the k8s resource This is not necessarily a problem in the context of eventually consistency as we expect that the k8s resource |
Also, let's consider the considerable setup complication ( needing to install and configure kro ) plus the overhead of people learning kro and maintenance of kro version ( unless we farm this out to the infra maintainers which is as additional burden on them in that case ).
I don't understand this one. :) The registry is a cache and a sync point. It's not just there to share results, but it's also there so that we don't have to re-download a 6 gigabyte image when it's being fetched from somewhere over and over dealing with the same component or resource. Also, it's not explained how you would work with Flux then? Like, how do you present it with the created artifact that it needs to deploy? |
If we omit the configuration and localisation (or rather move it to If the image must be available in a specific environment, one could use the replication controller to move the component version to that environment.
Assuming we omit the OCI registry, then we would need to publish the original source (= OCI registry, HelmRepository, git Repository, or the like) in the status of the resource. This information can then be taken as CEL to pass the location for example to a FluxCD OCI Repository. Consider the following example of an apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata:
name: complicated-deployment
spec:
schema:
apiVersion: v1alpha1
kind: ComplicatedDeployment
spec:
podinfo:
releaseName: string
message: string | default="hello, world"
resources:
- id: resourceChart
template:
apiVersion: delivery.ocm.software/v1alpha1
kind: Resource
metadata:
name: static-resource-chart-name
spec:
componentRef:
name: static-component-name # should be referenced/passed
resource:
byReference:
resource:
name: helm-resource
interval: 10m
- id: resourceImage
template:
apiVersion: delivery.ocm.software/v1alpha1
kind: Resource
metadata:
name: static-resource-image-name
spec:
componentRef:
name: static-component-name # should be referenced/passed
resource:
byReference:
resource:
name: image
interval: 10m
- id: ocirepository
template:
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: helm-podinfo-config
spec:
interval: 1m0s
layerSelector:
mediaType: "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
operation: copy
url: ${resourceChart.status.ociArtifact.sourceReference.registry}/${resourceChart.status.ociArtifact.sourceReference.repository}
ref:
digest: ${resourceChart.status.ociArtifact.digest}
- id: helmrelease
template:
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: ${schema.spec.podinfo.releaseName}
spec:
releaseName: ${schema.spec.podinfo.releaseName}
interval: 1m
timeout: 5m
chartRef:
kind: OCIRepository
name: ${ocirepository.metadata.name}
namespace: default
values:
# Localisation
image:
repository: ${resourceImage.status.ociArtifact.sourceReference.registry}/${resourceImage.status.ociArtifact.sourceReference.repository}
tag: ${resourceImage.status.ociArtifact.sourceReference.reference}
# Configuration
ui:
message: ${schema.spec.podinfo.message} |
The replication controller was all but archived.
How would that work with modified resources by the ocm client during transfer? Which step would that be? So you declare a component version, you declare a target, and then deploy that all with Kro, and by the end there would be an end registry with a Status updated having the location of the endresult in a registry I assume? Keep in mind that this all needs to work offline. |
Note: A replication cannot be part of a RGD in the same CV that should be replicated with that replication. |
We talked about this on slack. Outcome:
|
Spike is closed and the implementation will be implemented here #172 |
Description
As described in #149, the ocm-controllers require something to deploy OCM resources. The
v1
controllers used a custom operatorFluxDeployer
to achieve this.We want to try out if
kro
could be our deployer for thev2
controllers, askro
is an resource orchestration tool and offers several configuration possibilities to alter and configure values in deployments. In combination with FluxCD, we could useWe need the following use-cases to work:
simple
helm
: Use FluxCD to deploy a helm-chart inside an OCM resourcesimple
kustomize
: Use FluxCD to deploy a kustomization inside an OCM resourcesimple configuration
helm
: Use FluxCD to deploy a helm-chart and configure values inside the helm-chartsimple configuration
kustomization
: Use FluxCD to deploy a kustomization and configure values inside the manifestsA complicated one containing
RGD in CV
OCMDeployer
that deploys the RGDHow would we recommend to use the
kro
-resources?How can resources be upgraded/update?
kro
could be feasible as deployment-tool #164 (comment)Timebox: 3 day(s)
Done Criteria
The text was updated successfully, but these errors were encountered: