Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Use the new service_name field for job providers #96

Merged
merged 3 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/configgin/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Configgin
VERSION = '0.18.3'.freeze
VERSION = '0.18.4'.freeze
end
3 changes: 2 additions & 1 deletion lib/kube_link_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ def [](key)

# Underscores aren't valid hostnames, so jobs are transformed in fissile to use dashes
job_name = provider['job'].gsub('_', '-')
service_name = provider['service_name'] || "#{provider['role']}-#{job_name}"

@links[key] = {
'address' => "#{provider['role']}-#{job_name}.#{ENV['KUBERNETES_NAMESPACE']}.svc.#{ENV['KUBERNETES_CLUSTER_DOMAIN']}",
'address' => "#{service_name}.#{ENV['KUBERNETES_NAMESPACE']}.svc.#{ENV['KUBERNETES_CLUSTER_DOMAIN']}",
'instance_group' => '', # This is probably the role name from the manifest
'default_network' => '',
'deployment_name' => namespace,
Expand Down
9 changes: 5 additions & 4 deletions update-stemcell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

set -o errexit -o nounset

REPO="${REPO:-scf}"
REPO="${REPO:-../../github.com/SUSE/scf}"
Copy link
Member

Choose a reason for hiding this comment

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

This default is making the assumption that configgin and scf repos are located in a $GOPATH/src style layout, which is somewhat questionable, given that neither of them are Go projects... It is also out-of-sync with the comment in line 8.

But whatever, it is user-overridable, so good enough for now.


IMAGE="$( cd "../${REPO}" && source .envrc && echo "${FISSILE_STEMCELL}" )"
REPO="$( cd "${REPO}" && echo "${PWD}" )"
IMAGE="$( cd "${REPO}" && source .envrc && echo "${FISSILE_STEMCELL}" )"

name="${IMAGE%%:*}"
tag="${IMAGE##*:}"
Expand All @@ -39,7 +40,7 @@ kubectl config use-context vagrant

vagrant_ready=""
if test -z "${NO_RUN:-}" ; then
if ( cd "$(dirname "$0")/../${REPO}" && (vagrant status 2>/dev/null | grep --quiet running) ) ; then
if ( cd "${REPO}" && (vagrant status 2>/dev/null | grep --quiet running) ) ; then
vagrant_ready="true"
releases=$(helm list --short)
if test -n "${releases}" ; then
Expand Down Expand Up @@ -84,7 +85,7 @@ docker push "${docker_user}/${name##*/}:${tag}"

test -n "${vagrant_ready}" || exit

cd "$(dirname "$0")/../${REPO}"
cd "${REPO}"

vagrant ssh -- -tt <<EOF
set -o errexit -o nounset
Expand Down