-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update k14s support with local deploy and image specified based on sha #108
Open
edwardecook
wants to merge
8
commits into
master
Choose a base branch
from
k14s-local-deploy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
400220b
Add kapp-local-deploy, including local build of images
edwardecook 7577be2
Add automatic bumping of image sha to ci
edwardecook f56dc51
Ensure that CI env var is available in generate-certs
edwardecook 1d62a64
Update install instructions and simplify default install
edwardecook 36b831e
Clean up kapp-deploy and kapp-delete in line with shellcheck
edwardecook e1edfe0
Switch kube-rbac-proxy image to be pinned by sha
edwardecook 0805369
When changing version, use the new values file
edwardecook 0960faf
Improve bashing in scripts
gmrodgers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#@ load("@ytt:data", "data") | ||
--- | ||
apiVersion: kbld.k14s.io/v1alpha1 | ||
kind: Sources | ||
sources: | ||
- imageRepo: dev.registry.pivotal.io/developer-console/projects-operator | ||
path: . | ||
--- | ||
apiVersion: kbld.k14s.io/v1alpha1 | ||
kind: ImageDestinations | ||
destinations: | ||
- imageRepo: dev.registry.pivotal.io/developer-console/projects-operator | ||
newImage: #@ data.values.registry.hostname + '/' + data.values.registry.project + '/dev-projects-operator' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
images: | ||
- image: dev.registry.pivotal.io/developer-console/kube-rbac-proxy:v0.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
|
||
VERSION=$(cat version/version) | ||
|
||
sed -i "s/version:.*/version:\ ${VERSION}/" projects-operator/deployments/k8s/values.yaml | ||
sed -i "s/version:.*/version:\ ${VERSION}/" "projects-operator/deployments/k8s/values/_default.yaml" | ||
|
||
tar -czf projects-operator-${VERSION}.tgz -C projects-operator/deployments --transform "s/k8s/projects-operator/g" k8s/ | ||
mv projects-operator-${VERSION}.tgz archive/projects-operator-${VERSION}.tgz | ||
tar -czf "projects-operator-${VERSION}.tgz" -C "projects-operator/deployments" --transform "s/k8s/projects-operator/g" "k8s/" | ||
mv "projects-operator-${VERSION}.tgz" "archive/projects-operator-${VERSION}.tgz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
platform: linux | ||
|
||
image_resource: | ||
type: registry-image | ||
source: | ||
repository: ismteam/ci | ||
tag: latest | ||
|
||
inputs: | ||
- name: projects-operator | ||
- name: projects-operator-image | ||
|
||
outputs: | ||
- name: projects-operator | ||
|
||
run: | ||
path: /bin/bash | ||
args: | ||
- -euc | ||
- | | ||
DIGEST=$(cat projects-operator-image/digest) | ||
|
||
pushd projects-operator | ||
sed -i "s/projects-operator@.*/projects-operator@${DIGEST}/" deployments/k8s/values/images.yaml | ||
git config user.email "pvtl-marketplace-demand+ci@vmware.com" | ||
git config user.name "projects-operator-ci" | ||
git add . | ||
git commit -m "Bump projects-operator image digest" | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#@data/values | ||
--- | ||
images: | ||
projectsOperator: dev.registry.pivotal.io/developer-console/projects-operator@sha256:3ce47c158ece4a1d63d449e6152bfb848db7ae207c94ae2ef89748a46e1688c3 | ||
kubeRbacProxy: dev.registry.pivotal.io/developer-console/kube-rbac-proxy@sha256:fc13323a791c633939b2cb9277b2914cf998dc2575ce16b497fa62871a65b81a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
NAMESPACE="${NAMESPACE:-"projects-operator"}" | ||
|
||
kapp delete -y -a projects-operator -n "$NAMESPACE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This workflow doesn't make too much sense to me. I believe it exists so that someone could
kapp deploy
the latest images by pulling down the repo and runningmake kapp-deploy
(non-local deployment). However, in my opinion, a non-local deployment should just use the artifact produced by CI (ie. projects-operator-1.2.3.tgz). That is, we discouragemake kapp-deploy
non-local outside of CI. Curious what you all think.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.
One of the main benefits of bumping image ref is that it allows repos that use projects-operator as a dependency to pull in by commit sha and have the appropriate image referenced (which is the current flow in our main repo). If we switched to only tagged and released versions being consumable we would need to make two changes:
Note that the flow we implemented is one that is used by several other OSS projects such as https://github.com/cloudfoundry/capi-k8s-release and https://github.com/cloudfoundry/uaa
We are definitely not wedded to this approach and would be interested in hearing your thoughts on this and/or potential alternatives.