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 namespaces in knative/pkg #235

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

zxDiscovery
Copy link

synchronize with knative/serving#2708

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jan 22, 2019
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 22, 2019
system/names.go Outdated
following import:

import (
_ "github.com/knative/serving/pkg/system/testing"
Copy link
Member

Choose a reason for hiding this comment

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

drop serving.

Copy link
Author

Choose a reason for hiding this comment

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

Done

system/names.go Outdated
@@ -0,0 +1,52 @@
/*
Copyright 2018 The Knative Authors
Copy link
Member

Choose a reason for hiding this comment

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

2019 here and elsewhere

Copy link
Author

Choose a reason for hiding this comment

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

Done


func init() {
os.Setenv(system.NamespaceEnvKey, "knative-testing")

Copy link
Member

Choose a reason for hiding this comment

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

nit: delete empty line

Copy link
Author

Choose a reason for hiding this comment

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

Done

@mattmoor
Copy link
Member

/ok-to-test

@knative-prow-robot knative-prow-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 22, 2019
)

const (
NamespaceEnvKey = "SYSTEM_NAMESPACE"

Choose a reason for hiding this comment

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

i am big fan of prefixing env vars with owner name eg KN_SYSTEM_NAMESPACE or something like that. wdyt?

Copy link
Author

Choose a reason for hiding this comment

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

Add prefixing sounds good. If we change to KN_SYSTEM_NAMESPACE here, do we need to synchronize this to the config yaml file in knative/serving/config, knative/build/config and knative/eventing/config.

Copy link
Member

Choose a reason for hiding this comment

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

If anything I'd go with KNATIVE_, but I could see myself using this package beyond Knative controllers too, so having the key be agnostic could also be useful.

Copy link
Author

Choose a reason for hiding this comment

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

+1 to @mattmoor . If this pkg use in common place, then I insist the name SYSTEM_NAMESPACE

@mattmoor
Copy link
Member

/lgtm
/approve
/hold

Use /hold cancel to unblock submission. If you want to change the environment variable, then I'll need to give a fresh /lgtm.

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 23, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, zxDiscovery

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2019
@zxDiscovery
Copy link
Author

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 23, 2019
@knative-prow-robot knative-prow-robot merged commit 8e50d82 into knative:master Jan 23, 2019
@zxDiscovery zxDiscovery deleted the add_names branch January 23, 2019 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants