Skip to content
Open
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Knative Serving
HACK RELEASE THIS UGLY UGLY FORK:
1. get docker secretes to viennadroptest
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

NIT: secrets

1. ./hack/release.sh --skip-tests --release-acr viennadroptest --release-azblob https://knrelease.blob.core.windows.net/joon --publish
1. Then copy serving.yaml
1. Then replace the image names with the XTAG from release.sh in vendor (ugh)

[![GoDoc](https://godoc.org/github.com/knative/serving?status.svg)](https://godoc.org/github.com/knative/serving)
[![Go Report Card](https://goreportcard.com/badge/knative/serving)](https://goreportcard.com/report/knative/serving)
Expand Down
14 changes: 14 additions & 0 deletions hack/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /usr/bin/env bash

source vendor/knative.dev/test-infra/scripts/release.sh

PUBLISH_YAML=serving.yaml

function build_release() {
# config/ contains the manifests
ko resolve ${KO_FLAGS} -f config/ > ${PUBLISH_YAML}
ARTIFACTS_TO_PUBLISH=${PUBLISH_YAML}
}

main $@

39 changes: 39 additions & 0 deletions hack/push-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#! /usr/bin/env bash

KO_DOCKER_REPO="ko.local"

release_images=()

function tag_images_in_yamls() {
for file in $@; do
[[ "${file##*.}" != "yaml" ]] && continue
echo "Inspecting ${file}"
for image in $(grep -o "${KO_DOCKER_REPO}/[0-9a-z\./-]*:[0-9a-f]*" ${file}); do
local dest_image=${ACR_SERVER}/$(echo ${image} | cut -d"/" -f2-)
echo "Tagging ${dest_image}"
docker tag ${image} ${dest_image}
release_images+=(${dest_image})
done
done
}

function replace_cr_in_yamls() {
for file in $@; do
[[ "${file##*.}" != "yaml" ]] && continue
echo "Fixing ${file}"
sed -i "s/${KO_DOCKER_REPO}\/\([0-9a-z\./-]*\):\([0-9a-f]*\)/${ACR_SERVER}\/\1:\2/g" ${file}
done
}

function do_push() {
for image in ${release_images[@]}; do
echo "Pushing ${image}"
docker push ${image}
done
}
ACR_SERVER=viennadroptest.azurecr.io
#docker login ${ACR_SERVER} -u ${ACR_USER} -p ${ACR_PWD}
tag_images_in_yamls $@
replace_cr_in_yamls $@
do_push

12 changes: 6 additions & 6 deletions pkg/reconciler/revision/reconcile_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ func (c *Reconciler) reconcileDeployment(ctx context.Context, rev *v1alpha1.Revi

// Update the revision status if pod cannot be scheduled(possibly resource constraints)
// If pod cannot be scheduled then we expect the container status to be empty.
for _, cond := range pod.Status.Conditions {
if cond.Type == corev1.PodScheduled && cond.Status == corev1.ConditionFalse {
rev.Status.MarkResourcesUnavailable(cond.Reason, cond.Message)
break
}
}
// for _, cond := range pod.Status.Conditions {
// if cond.Type == corev1.PodScheduled && cond.Status == corev1.ConditionFalse {
// rev.Status.MarkResourcesUnavailable(cond.Reason, cond.Message)
// break
// }
// }

for _, status := range pod.Status.ContainerStatuses {
if status.Name == rev.Spec.GetContainer().Name {
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/revision/resources/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const (

// ProgressDeadlineSeconds is the time in seconds we wait for the deployment to
// be ready before considering it failed.
ProgressDeadlineSeconds = int32(120)
ProgressDeadlineSeconds = int32(600)
)

var (
Expand Down
Loading