-
Notifications
You must be signed in to change notification settings - Fork 17
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 kubernetes tentacle docker build #699
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.
I was able to remove a bunch of stuff relating to including Docker into this container, which is not supported
ENV OCTOPUS__K8STENTACLE__NAMESPACE="" | ||
ENV OCTOPUS__K8STENTACLE__USEJOBS="True" | ||
ENV OCTOPUS__K8STENTACLE__JOBSERVICEACCOUNTNAME="" | ||
ENV OCTOPUS__K8STENTACLE__JOBVOLUMEYAML="" |
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.
k8s specific environment variables defined in #690
fi | ||
} | ||
|
||
function validateVariables() { |
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.
Because I know we are running as a kubernetes tentacle, I was able to clean up a lot of the validation here
if [[ ! -z "$TargetEnvironment" ]]; then | ||
IFS=',' read -ra ENVIRONMENTS <<<"$TargetEnvironment" | ||
for i in "${ENVIRONMENTS[@]}"; do | ||
ARGS+=('--environment' "$i") | ||
done | ||
fi |
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.
We do support multiple environments/tenants via a command separated list in the environment variable in the container.
This pull request has been linked to Shortcut Story #60398: Create new container image for Agent. |
@@ -0,0 +1,60 @@ | |||
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0 |
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.
Once we get things running, I'd love to see if 6.0-alpine
works...
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.
yeah, it probably will, the only trick is that it doesn't have bash installed which the install script needs 😁
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.
or, as @eddymoulton said, the new chiseled images for ubuntu could be good too
6700fd9
to
b83c702
Compare
c8833b9
to
8572100
Compare
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.
Looks good to me. We'll find out quick enough once we start using this ourselves whether or not anything is missing 😁
Just left one comment on the environment/role missing error message.
if [[ -z "$TargetEnvironment" ]]; then | ||
echo "Please specify an environment name with the 'TargetEnvironment' environment variable" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "$TargetRole" ]]; then | ||
echo "Please specify a role name with the 'TargetRole' environment variable" >&2 | ||
exit 1 | ||
fi |
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.
Should these error messages specify "one or more"?
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.
Yeah, good point
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.
Updated in fa0079a
Background
The Kubernetes Tentacle can only be distributed via docker container and has a few new environment variables/configuration points than the original tentacle container. This PR adds a new Dockerfile for setup scripts
Results
I just copied the linux dockerfile + install scripts and starting stripping out things that aren't relevant.
The compose build tags the container as
octopusdeploy/kubernetes-tentacle
Shortcut story: [sc-60398]
How to review this PR
Quality ✔️
Pre-requisites