-
Notifications
You must be signed in to change notification settings - Fork 7
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
e2e: add a test for checking AKS upstream #939
base: main
Are you sure you want to change the base?
Conversation
b8059ee
to
8fc4293
Compare
Note that the boilerplate of manually adding the |
54b0fb1
to
9985321
Compare
da67e5f
to
80c55ee
Compare
renamed container to testcontainer and log versions
some cleanup and comments respect build tag remove unneccessary if add cleanup
golangci
80c55ee
to
807b8b3
Compare
7904b8f
to
faad72e
Compare
two jobs indentation :( add forgotten permissions
faad72e
to
71b3501
Compare
Due to |
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.
lgtm, just a few nits
- e2e/aks-runtime/** | ||
|
||
jobs: | ||
install-software: |
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.
Could you please leave a pointer here to where these instructions come from?
echo "Types: deb | ||
URIs: https://packages.microsoft.com/repos/azure-cli/ | ||
Suites: ${AZ_DIST} | ||
Components: main | ||
Architectures: $(dpkg --print-architecture) | ||
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources |
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.
echo "Types: deb | |
URIs: https://packages.microsoft.com/repos/azure-cli/ | |
Suites: ${AZ_DIST} | |
Components: main | |
Architectures: $(dpkg --print-architecture) | |
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources | |
sudo tee /etc/apt/sources.list.d/azure-cli.sources <<EOF | |
Types: deb | |
URIs: https://packages.microsoft.com/repos/azure-cli/ | |
Suites: ${AZ_DIST} | |
Components: main | |
Architectures: $(dpkg --print-architecture) | |
Signed-by: /etc/apt/keyrings/microsoft.gpg | |
EOF |
WithSpec(kuberesource.PodSpec(). | ||
WithContainers(kuberesource.Container(). | ||
WithName(testContainer). | ||
WithImage("docker.io/bash@sha256:ce062497c248eb1cf4d32927f8c1780cce158d3ed0658c586a5be7308d583cbb"). |
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.
Let's use quay.io
or ghcr.io
.
t.Cleanup(func() { | ||
if skipUndeploy { | ||
return | ||
} | ||
|
||
// delete the deployment | ||
deletePolicy := metav1.DeletePropagationForeground | ||
require.NoError(c.Client.AppsV1().Deployments(namespace).Delete(context.Background(), testContainer, metav1.DeleteOptions{ | ||
PropagationPolicy: &deletePolicy, | ||
})) | ||
}) |
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.
Why not just delete the namespace?
|
||
pods, err := c.Client.CoreV1().Pods(namespace).List(ctx, metav1.ListOptions{}) | ||
require.NoError(err) | ||
pod := pods.Items[0] // only one pod was deployed |
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.
Consider asserting this.
|
||
// KataPolicyGen executes `az confcom katapolicygen --yaml <resourcePath>`. | ||
func KataPolicyGen(resourcePath string) error { | ||
return exec.Command("az", "confcom", "katapolicygen", "--yaml", resourcePath).Run() |
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.
Does this potentially swallow interesting command output?
Add a test that checks if something in azure upstream is broken by deploying a simple container with the
kata-cc-isolation
runtime class. You can view a successful workflow run here.