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 support for charms to inject files into the pod #8382

Merged
merged 1 commit into from
Feb 16, 2018

Conversation

wallyworld
Copy link
Member

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.

Copy link
Member

@hmlanigan hmlanigan left a 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?

`[1:]

expectedFileContent := `
[config]
foo: bar`[1:]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline for `[1:]?

Copy link
Member Author

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")
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestParseMissingName?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added test

if fs.MountPath == "" {
return nil, errors.Errorf("mount path is missing for file spec %q", fs.Name)
}
}
Copy link
Member

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?

Copy link
Member Author

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

@wallyworld
Copy link
Member Author

We don't have tests for k8s.go yet. They will come soon.

@wallyworld
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit a015a0c into juju:develop Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants