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

[NOTE] API "DELETE /chartrepo/{repo}/charts/{name}" not work as expect #43

Open
moooofly opened this issue Feb 3, 2019 · 0 comments
Open
Labels
bug Something isn't working note markdown some conclusions v1.6.0-66709daa

Comments

@moooofly
Copy link
Owner

moooofly commented Feb 3, 2019

make a test by swagger UI, and get

  • upload nginx-ldapauth-proxy v0.1.2

image

  • get from CLI success
[#60#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$./harborctl chartrepo chart get -c charts -n nginx-ldapauth-proxy
==> GET https://localhost/api/chartrepo/charts/charts/nginx-ldapauth-proxy
<==
<== Rsp Status: 200 OK
<== Rsp Body: [{"name":"nginx-ldapauth-proxy","sources":["https://github.com/dweomer/dockerfiles-nginx-auth-ldap","https://github.com/kvspb/nginx-auth-ldap"],"version":"0.1.2","description":"nginx proxy with ldapauth","maintainers":[{"name":"rendhalver","email":"pete.brown@powerhrg.com"},{"name":"jar361","email":"jrodgers@powerhrg.com"}],"icon":"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png","apiVersion":"v1","appVersion":"1.13.5","urls":["charts/nginx-ldapauth-proxy-0.1.2.tgz"],"created":"2019-02-03T13:28:44.794Z","digest":"454951c98af50cd81146baa4be64fa1e6dd5c52b389fe958248f69ead04441f0"}]
[#61#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$
[#61#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$
[#61#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$
[#61#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$./harborctl chartrepo chart get -c charts -n nginx-ldapauth-proxy -v 0.1.2
==> GET https://localhost/api/chartrepo/charts/charts/nginx-ldapauth-proxy/0.1.2
<==
<== Rsp Status: 200 OK
<== Rsp Body: {"metadata":{"name":"nginx-ldapauth-proxy","sources":["https://github.com/dweomer/dockerfiles-nginx-auth-ldap","https://github.com/kvspb/nginx-auth-ldap"],"version":"0.1.2","description":"nginx proxy with ldapauth","maintainers":[{"name":"rendhalver","email":"pete.brown@powerhrg.com"},{"name":"jar361","email":"jrodgers@powerhrg.com"}],"icon":"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png","apiVersion":"v1","appVersion":"1.13.5","urls":["charts/nginx-ldapauth-proxy-0.1.2.tgz"],"created":"2019-02-03T13:19:18.85Z","digest":"454951c98af50cd81146baa4be64fa1e6dd5c52b389fe958248f69ead04441f0"},"dependencies":[],"values":{"image.pullPolicy":"IfNotPresent","image.repository":"dweomer/nginx-auth-ldap","image.tag":"1.13.5-on-alpine-3.5","ingress.annotations":null,"ingress.enabled":false,"ingress.hosts":["ldapauth-service.local"],"ingress.tls":null,"proxy.authName":"Auth Required","proxy.host":"kubernetes.default.svc.cluster.local","proxy.ldapBindDN":"cn=auth,dc=example,dc=com","proxy.ldapDN":"dc=example,dc=com","proxy.ldapFilter":"objectClass=organizationalPerson","proxy.ldapGroup":"memberUid","proxy.ldapHost":"","proxy.ldapPort":389,"proxy.port":443,"proxy.requires":[{"filter":"cn=secret,ou=groups,dc=example,dc=com","name":"authGroup"}],"replicaCount":1,"secrets.ldapBindPassword":"","service.externalPort":443,"service.internalPort":80,"service.name":"nginx-ldapauth","service.type":"ClusterIP","tolerations":[]},"files":{"values.yaml":"# Default values for nginx-ldapauth-proxy.\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates.\nreplicaCount: 1\nimage:\n  repository: dweomer/nginx-auth-ldap\n  tag: 1.13.5-on-alpine-3.5\n  pullPolicy: IfNotPresent\n  # pullSecrets:\n   # - docker-secret\nservice:\n  name: nginx-ldapauth\n  type: ClusterIP\n  externalPort: 443\n  internalPort: 80\nproxy:\n  port: 443\n  host: \"kubernetes.default.svc.cluster.local\"\n  authName: \"Auth Required\"\n  ldapHost: \"\"\n  ldapPort: 389\n  ldapGroup: \"memberUid\"\n  ldapDN: \"dc=example,dc=com\"\n  ldapFilter: \"objectClass=organizationalPerson\"\n  ldapBindDN: \"cn=auth,dc=example,dc=com\"\n  requires:\n    - name: \"authGroup\"\n      filter: \"cn=secret,ou=groups,dc=example,dc=com\"\nsecrets:\n  ldapBindPassword: \"\"\n\ningress:\n  enabled: false\n  # Used to create an Ingress record.\n  hosts:\n    - ldapauth-service.local\n  annotations:\n    # kubernetes.io/ingress.class: nginx\n    # kubernetes.io/tls-acme: \"true\"\n  tls:\n    # Secrets must be manually created in the namespace.\n    # - secretName: chart-example-tls\n    #   hosts:\n    #     - chart-example.local\nresources: {}\n  # We usually recommend not to specify default resources and to leave this as a conscious\n  # choice for the user. This also increases chances charts run on environments with little\n  # resources, such as Minikube. If you do want to specify resources, uncomment the following\n  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.\n  # limits:\n  #  cpu: 100m\n  #  memory: 128Mi\n  # requests:\n  #  cpu: 100m\n  #  memory: 128Mi\n\nnodeSelector: {}\n\ntolerations: []\n\naffinity: {}\n"},"security":{"signature":{"signed":false,"prov_file":""}}}
[#62#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$
  • delete from swagger UI failed

image

image

  • delete from CLI failed
[#62#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$./harborctl chartrepo chart delete -c charts -n nginx-ldapauth-proxy
==> DELETE https://localhost/api/chartrepo/charts/charts/nginx-ldapauth-proxy
<==
<== Rsp Status: 404 Not Found
<== Rsp Body: <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>404 - Page Not Found</title>
<style>

*{
	maring: 0;
	padding: 0;
}

...
  • but with version specified can work
[#63#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$./harborctl chartrepo chart delete -c charts -n nginx-ldapauth-proxy -v 0.1.2
==> DELETE https://localhost/api/chartrepo/charts/charts/nginx-ldapauth-proxy/0.1.2
<==
<== Rsp Status: 200 OK
<== Rsp Body: {"deleted":true}
[#64#root@ubuntu-1604 /go/src/github.com/moooofly/harborctl]$

Conclusions

  • DELETE /chartrepo/{repo}/charts/{name} not working as expect
  • DELETE /chartrepo/{repo}/charts/{name}/{version} working well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working note markdown some conclusions v1.6.0-66709daa
Projects
None yet
Development

No branches or pull requests

1 participant