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

Add artifact streaming support for managed AKS #4414

Open
Tracked by #3446 ...
paulapetri opened this issue Dec 20, 2023 · 11 comments
Open
Tracked by #3446 ...

Add artifact streaming support for managed AKS #4414

paulapetri opened this issue Dec 20, 2023 · 11 comments
Labels
area/managedclusters Issues related to managed AKS clusters created through the CAPZ ManagedCluster Type kind/feature Categorizes issue or PR as related to a new feature.

Comments

@paulapetri
Copy link

/kind feature

Describe the solution you'd like
Add support for Artifact Streaming for AKS managed services https://learn.microsoft.com/en-us/azure/aks/artifact-streaming

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 20, 2023
@CecileRobertMichon
Copy link
Contributor

related to #2625 since this is a preview feature

@CecileRobertMichon
Copy link
Contributor

/area managedclusters

@k8s-ci-robot k8s-ci-robot added the area/managedclusters Issues related to managed AKS clusters created through the CAPZ ManagedCluster Type label Jan 3, 2024
@dtzar
Copy link
Contributor

dtzar commented Mar 26, 2024

This theoretically should work now by enabling the preview API and the CAPZ patch mechanism to enable this feature. @paulapetri - would you like to try this out?

@dtzar
Copy link
Contributor

dtzar commented Apr 2, 2024

Unfortunately, I don't see any diff in the asoctl yaml export after enabling this preview feature. So without the ASO diff, the ASO patch won't do anything of course. Using asoctl 2.6.0.

Here's what I ran:

asoctl import azure-resource /subscriptions/###/resourcegroups/argoaks/providers/Microsoft.ContainerService/managedClusters/argoaks -o argocluster-aso.yaml 
az aks nodepool update --resource-group argoaks --cluster-name argoaks --name pool1 --enable-artifact-streaming
asoctl import azure-resource /subscriptions/###/resourcegroups/argoaks/providers/Microsoft.ContainerService/managedClusters/argoaks -o argocluster-aso2.yaml 

Any ideas @matthchr ?

@matthchr
Copy link

matthchr commented Apr 2, 2024

artifact streaming is a property of the nodepool but you're importing the cluster.

You need to import the nodepool to see the diff.

Though, the diff will be:

spec:
    artifactStreamingProfile:
        enabled: true

I think.

@dtzar
Copy link
Contributor

dtzar commented Apr 2, 2024

Thanks for the pointer! All I got was this from the ManagedClustersAgentPool:

---
apiVersion: containerservice.azure.com/v1api20231001
kind: ManagedClustersAgentPool
metadata:
  creationTimestamp: null
  name: pool1
spec:
  azureName: pool1
  count: 1
  enableAutoScaling: false
  enableFIPS: false
  kubeletDiskType: OS
  maxPods: 30
  mode: User
  orchestratorVersion: 1.28.5
  osDiskSizeGB: 128
  osDiskType: Managed
  osSKU: Ubuntu
  osType: Linux
  powerState:
    code: Running
  scaleDownMode: Delete
  type: Microsoft.ContainerService/managedClusters/agentPools
  upgradeSettings:
    maxSurge: 10%
  vmSize: Standard_B2s
---

@matthchr
Copy link

matthchr commented Apr 2, 2024

It looks like asoctl always imports using the latest GA version we support

Which is probably a reasonable default but we might need to be able to override it. cc @theunrepentantgeek

In any case, I don't' think you specifically need asoctl to define the diff, it's just a convenient way to see what you need to add, right?

See here for the expected shape. As I said it's:

apiVersion: containerservice.azure.com/v1api20231102preview
kind: ManagedClustersAgentPool
spec:
    artifactStreamingProfile:
        enabled: true

@theunrepentantgeek
Copy link

@matthchr wrote

It looks like asoctl always imports using the latest GA version we support

That's correct; we can't tell from the resource which api-version was used for creation; selecting the latest stable release seemed like a sensible default.

One way to address this might be to add a --prefer-preview-versions flag with global effect.

Another would be to offer full control, resource-by-resource or maybe group-by-group, though that would be more complex.

I'll log an issue to track this.

@dtzar
Copy link
Contributor

dtzar commented Apr 3, 2024

Thanks Matt and Bevan! I think a generic flag like --prefer-preview-versions would work great and no need for more granular especially since you're already specifically asking for import of a specific resource.

Tangent related feature ask would be to import all dependent resources (e.g. import ManagedClusters also imports ManagedClustersAgentPool)

@dtzar
Copy link
Contributor

dtzar commented Apr 3, 2024

In any case, I don't' think you specifically need asoctl to define the diff, it's just a convenient way to see what you need to add, right?

Right, code -d works perfect for diff.

@matthchr
Copy link

matthchr commented Apr 3, 2024

Tangent related feature ask would be to import all dependent resources (e.g. import ManagedClusters also imports ManagedClustersAgentPool)

Actually this should already be the behavior - I just forgot it when saying "you should just import the AgentPool". So my suspicion is that with the --prefer-preview-versions flag, your original command would've worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/managedclusters Issues related to managed AKS clusters created through the CAPZ ManagedCluster Type kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants