-
Notifications
You must be signed in to change notification settings - Fork 510
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 support for charms to inject files into the pod #8382
Conversation
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.
are there tests for k8s.go?
caas/containers_test.go
Outdated
`[1:] | ||
|
||
expectedFileContent := ` | ||
[config] | ||
foo: bar`[1:] |
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.
newline for `[1:]?
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.
yaml specifies "|-" hence last \n stripped
i changed to yaml to avoid confusion
@@ -66,3 +86,20 @@ name: gitlab | |||
_, err := caas.ParseContainerSpec(specStr) | |||
c.Assert(err, gc.ErrorMatches, "spec image name is missing") | |||
} | |||
|
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.
TestParseMissingName?
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.
added test
caas/containers.go
Outdated
if fs.MountPath == "" { | ||
return nil, errors.Errorf("mount path is missing for file spec %q", fs.Name) | ||
} | ||
} |
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 check to see if files are provided here?
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.
files might be added later; as a minimum we just set up the mount
4ea359a
to
26f9ae1
Compare
We don't have tests for k8s.go yet. They will come soon. |
26f9ae1
to
cfe3f49
Compare
cfe3f49
to
99aa128
Compare
|
Description of change
Charms may specify that they want files at a given mount point to be injected into the unit pods.
QA steps
Run up a caas deployment with my mysql test charm.