Skip to content

Provide easy delete of resources for new-app and generate #1537

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

Merged
merged 2 commits into from
Apr 10, 2015
Merged

Provide easy delete of resources for new-app and generate #1537

merged 2 commits into from
Apr 10, 2015

Conversation

0xmichalis
Copy link
Contributor

No description provided.

}
lbl, err := cmdutil.ParseLabel(label)
checkErr(err)
template.AddObjectLabels(templateObj, lbl)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees is this enough? Will all the generated resources from this template object have that lbl?

@bparees
Copy link
Contributor

bparees commented Apr 1, 2015

@Kargakis yes i believe if you add an object label to the template before processing it, everything produced from that template will have that label.

version int
)

func GetLabel() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should do this. We should be able to infer a name from new-app, not generate a random value per client.

Copy link
Contributor

Choose a reason for hiding this comment

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

it's not just new-app right? "osc create -f myconfiglist.json" also needs labels applied.

Copy link
Contributor

Choose a reason for hiding this comment

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

No..... don't do that.

----- Original Message -----

  • switch len(args) {
  • case 2:
  •   return map[string]string{args[0]: args[1]}, nil
    
  • default:
  • }
  • return nil, fmt.Errorf("invalid label spec: %s", labelSpec)
    +}

+var (

  • mut sync.Mutex
  • version int
    +)

+func GetLabel() string {

it's not just new-app right? "osc create -f myconfiglist.json" also needs
labels applied.


Reply to this email directly or view it on GitHub:
https://github.com/openshift/origin/pull/1537/files#r27611732

Copy link
Contributor

Choose a reason for hiding this comment

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

To clarify, create should only ever create what you send it. No changes.

----- Original Message -----

No..... don't do that.

----- Original Message -----

  • switch len(args) {
  • case 2:
  • return map[string]string{args[0]: args[1]}, nil
    
  • default:
  • }
    +
  • return nil, fmt.Errorf("invalid label spec: %s", labelSpec)
    +}
    +
    +var (
  • mut sync.Mutex
  • version int
    +)
    +
    +func GetLabel() string {

it's not just new-app right? "osc create -f myconfiglist.json" also needs
labels applied.


Reply to this email directly or view it on GitHub:
https://github.com/openshift/origin/pull/1537/files#r27611732

@0xmichalis
Copy link
Contributor Author

I had made some comments but force-pushed in the meantime and now they are lost. @smarterclayton ptal. Is the way I am creating aliases what you were suggesting?

@0xmichalis
Copy link
Contributor Author

Setting up a label in the template object has no affect to its derivatives

[vagrant@openshiftdev sample-app]$ openshift cli process -f application-template-stibuild.json -l name=hello-world | openshift cli create -f -
services/frontend
routes/route-edge
imageStreams/origin-ruby-sample
imageStreams/ruby-20-centos7
buildConfigs/ruby-sample-build
deploymentConfigs/frontend
services/database
deploymentConfigs/database
[vagrant@openshiftdev sample-app]$ openshift cli delete all -l name=hello-world
No resources found
[vagrant@openshiftdev sample-app]$ openshift cli describe services frontend
Name:           frontend
Labels:         template=application-template-stibuild
Selector:       name=frontend
IP:         172.30.97.116
Port:           5432
Endpoints:      <none>
Session Affinity:   None
No events.

@0xmichalis
Copy link
Contributor Author

[test]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1773/)

@0xmichalis
Copy link
Contributor Author

re[test]

@bparees
Copy link
Contributor

bparees commented Apr 9, 2015

lgtm.

@0xmichalis
Copy link
Contributor Author

@bparees what should we do with osc process? Setting up labels on template objects doesn't work as expected. Should we drop labeling via it altogether?

@bparees
Copy link
Contributor

bparees commented Apr 9, 2015

@Kargakis remind me, what about it doesn't work as expected?

@0xmichalis
Copy link
Contributor Author

@Kargakis remind me, what about it doesn't work as expected?

See this

@bparees
Copy link
Contributor

bparees commented Apr 9, 2015

@Kargakis why not just added it to the "labels" field of the Template object prior to processing?

// Optional: Labels is a set of labels that are applied to every
// object during the Template to Config transformation
Labels map[string]string json:"labels,omitempty"

In anycase i'm not sure why your existing code isn't working, seems like a bug somewhere.

@0xmichalis
Copy link
Contributor Author

@Kargakis why not just added it to the "labels" field of the Template object prior to processing?

// Optional: Labels is a set of labels that are applied to every
// object during the Template to Config transformation
Labels map[string]string json:"labels,omitempty"

In anycase i'm not sure why your existing code isn't working, seems like a bug somewhere.

Thanks for your feedback. I'll take a closer look tomorrow.

@0xmichalis
Copy link
Contributor Author

@bparees the issue about setting up labels in the Template to Config process is fixed now:)
I'll separate my commits to UPSTREAM and non-UPSTREAM, and this is ready for merging.
Except one last thing, the PR on Kubernetes is still not in...

@0xmichalis 0xmichalis changed the title [WIP] Provide easy delete of resources for new-app and generate Provide easy delete of resources for new-app and generate Apr 10, 2015
@bparees
Copy link
Contributor

bparees commented Apr 10, 2015

lgtm. [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1530/) (Image: devenv-fedora_1250)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 70c2279

openshift-bot pushed a commit that referenced this pull request Apr 10, 2015
@openshift-bot openshift-bot merged commit b64476f into openshift:master Apr 10, 2015
@0xmichalis 0xmichalis deleted the delete-all-by-label branch April 10, 2015 15:09
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Nov 19, 2017
…service-catalog/' changes from 3064247d05..d969acde90

d969acde90 Add additional service to ups-broker to fix e2e (openshift#1583)
1bcd53b684 origin build: add origin tooling
bb3e4a1 Chart changes for 0.1.3 (openshift#1573)
1d463c3 less etcd logs during integration test (openshift#1572)
dcdb82d Fixing coverage tool. It had double 'contrib' on script path. (openshift#1568)
b636203 make binding poll function clone binding (openshift#1550)
e8e5baa Do not block instance spec changes unless there is an on-going operation (openshift#1536)
4f47ce8 Embed etcd in the integration tests directly. (openshift#1570)
d02ac34 Make logging in admission controllers consistent with controller-manager (openshift#1519)
31ae521 Check if file permissions allow go install (openshift#1566)
52e64db Clear out plan ref when plan changed using k8s names (openshift#1553)
4b49594 Allow deprovision after change to non-existent plan (openshift#1557)
c6e446e Consolidating logic for creating in-progress properties. (openshift#1511)
fd3a6d7 Adding UnbindStatus to ServiceBindings (openshift#1544)
b471bd3 Add tracer bullet integration test that shows dynamic response from fake broker. (openshift#1538)
c8d5610 update comments on NewStorage (openshift#1548)
35082df Update resources in walkthrough (openshift#1510)
f86b8aa Fix manual hack of glide.lock file from openshift#1517. (openshift#1543)
02a5ff6 Add an additional plan to ups-broker (openshift#1537)
4309a0e add alpha asynchronous binding operation support (openshift#1512)
617c823 Grant controller abilit to update service/plan status (openshift#1532)
281ca9c Moving a duplicated block of code to an independent function. (openshift#1509)
da5e9fa Use Event Builder to help construct expected error messages for controller_instance_test. (openshift#1507)
48c522d Updating helm install documentation (openshift#1525)
b89d59e Adding an independent test for originating_identity (openshift#1498)
6eb8a16 Apply Event Message Builder controller_broker unit tests (openshift#1497)
411831c Fixing missing pretty logging on controller_binding. (openshift#1520)
REVERT: 3064247d05 origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: d969acde904f95538892ccd570c8c4ca447280bd
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Nov 20, 2017
…service-catalog/' changes from 3064247d05..d969acde90

d969acde90 Add additional service to ups-broker to fix e2e (openshift#1583)
1bcd53b684 origin build: add origin tooling
bb3e4a1 Chart changes for 0.1.3 (openshift#1573)
1d463c3 less etcd logs during integration test (openshift#1572)
dcdb82d Fixing coverage tool. It had double 'contrib' on script path. (openshift#1568)
b636203 make binding poll function clone binding (openshift#1550)
e8e5baa Do not block instance spec changes unless there is an on-going operation (openshift#1536)
4f47ce8 Embed etcd in the integration tests directly. (openshift#1570)
d02ac34 Make logging in admission controllers consistent with controller-manager (openshift#1519)
31ae521 Check if file permissions allow go install (openshift#1566)
52e64db Clear out plan ref when plan changed using k8s names (openshift#1553)
4b49594 Allow deprovision after change to non-existent plan (openshift#1557)
c6e446e Consolidating logic for creating in-progress properties. (openshift#1511)
fd3a6d7 Adding UnbindStatus to ServiceBindings (openshift#1544)
b471bd3 Add tracer bullet integration test that shows dynamic response from fake broker. (openshift#1538)
c8d5610 update comments on NewStorage (openshift#1548)
35082df Update resources in walkthrough (openshift#1510)
f86b8aa Fix manual hack of glide.lock file from openshift#1517. (openshift#1543)
02a5ff6 Add an additional plan to ups-broker (openshift#1537)
4309a0e add alpha asynchronous binding operation support (openshift#1512)
617c823 Grant controller abilit to update service/plan status (openshift#1532)
281ca9c Moving a duplicated block of code to an independent function. (openshift#1509)
da5e9fa Use Event Builder to help construct expected error messages for controller_instance_test. (openshift#1507)
48c522d Updating helm install documentation (openshift#1525)
b89d59e Adding an independent test for originating_identity (openshift#1498)
6eb8a16 Apply Event Message Builder controller_broker unit tests (openshift#1497)
411831c Fixing missing pretty logging on controller_binding. (openshift#1520)
REVERT: 3064247d05 origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: d969acde904f95538892ccd570c8c4ca447280bd
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Dec 15, 2017
…service-catalog/' changes from 3064247d05..d969acde90

d969acde90 Add additional service to ups-broker to fix e2e (openshift#1583)
1bcd53b684 origin build: add origin tooling
bb3e4a1 Chart changes for 0.1.3 (openshift#1573)
1d463c3 less etcd logs during integration test (openshift#1572)
dcdb82d Fixing coverage tool. It had double 'contrib' on script path. (openshift#1568)
b636203 make binding poll function clone binding (openshift#1550)
e8e5baa Do not block instance spec changes unless there is an on-going operation (openshift#1536)
4f47ce8 Embed etcd in the integration tests directly. (openshift#1570)
d02ac34 Make logging in admission controllers consistent with controller-manager (openshift#1519)
31ae521 Check if file permissions allow go install (openshift#1566)
52e64db Clear out plan ref when plan changed using k8s names (openshift#1553)
4b49594 Allow deprovision after change to non-existent plan (openshift#1557)
c6e446e Consolidating logic for creating in-progress properties. (openshift#1511)
fd3a6d7 Adding UnbindStatus to ServiceBindings (openshift#1544)
b471bd3 Add tracer bullet integration test that shows dynamic response from fake broker. (openshift#1538)
c8d5610 update comments on NewStorage (openshift#1548)
35082df Update resources in walkthrough (openshift#1510)
f86b8aa Fix manual hack of glide.lock file from openshift#1517. (openshift#1543)
02a5ff6 Add an additional plan to ups-broker (openshift#1537)
4309a0e add alpha asynchronous binding operation support (openshift#1512)
617c823 Grant controller abilit to update service/plan status (openshift#1532)
281ca9c Moving a duplicated block of code to an independent function. (openshift#1509)
da5e9fa Use Event Builder to help construct expected error messages for controller_instance_test. (openshift#1507)
48c522d Updating helm install documentation (openshift#1525)
b89d59e Adding an independent test for originating_identity (openshift#1498)
6eb8a16 Apply Event Message Builder controller_broker unit tests (openshift#1497)
411831c Fixing missing pretty logging on controller_binding. (openshift#1520)
REVERT: 3064247d05 origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: d969acde904f95538892ccd570c8c4ca447280bd
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Feb 1, 2018
* Add an additional plan to ups-broker

* Make second plan from ups-broker not free
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants