Skip to content

Commit

Permalink
Added support for changing config via API
Browse files Browse the repository at this point in the history
closes #268, closes #698

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
  • Loading branch information
eusebiu-constantin-petu-dbk committed Aug 25, 2022
1 parent f9f388f commit ef23662
Show file tree
Hide file tree
Showing 33 changed files with 1,826 additions and 922 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TESTDATA := $(TOP_LEVEL)/test/data
OS ?= linux
ARCH ?= amd64
BENCH_OUTPUT ?= stdout
EXTENSIONS ?= sync,search,scrub,metrics,ui_base,lint
EXTENSIONS ?= sync,search,scrub,metrics,ui_base,lint,config
comma:= ,
hyphen:= -
extended-name:=
Expand Down
3 changes: 3 additions & 0 deletions examples/config-allextensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"level": "debug"
},
"extensions": {
"sysconfig": {
"enable": true
},
"metrics": {},
"sync": {
"credentialsFile": "./examples/sync-auth-filepath.json",
Expand Down
46 changes: 24 additions & 22 deletions examples/config-anonymous-authz.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@
"port": "8080",
"realm": "zot",
"accessControl": {
"**": {
"anonymousPolicy": [
"read",
"create"
]
},
"tmp/**": {
"anonymousPolicy": [
"read",
"create",
"update"
]
},
"infra/**": {
"anonymousPolicy": [
"read"
]
},
"repos2/repo": {
"anonymousPolicy": [
"read"
]
"repositories": {
"**": {
"anonymousPolicy": [
"read",
"create"
]
},
"tmp/**": {
"anonymousPolicy": [
"read",
"create",
"update"
]
},
"infra/**": {
"anonymousPolicy": [
"read"
]
},
"repos2/repo": {
"anonymousPolicy": [
"read"
]
}
}
}
},
Expand Down
36 changes: 36 additions & 0 deletions examples/config-cfg-extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"distspecversion": "1.0.1-dev",
"extensions": {
"sysconfig": {
"enable": true
}
},
"http": {
"accesscontrol": {
"adminpolicy": {
"actions": [
"read",
"create",
"update",
"delete"
],
"users": [
"sebi"
]
}
},
"address": "127.0.0.1",
"auth": {
"htpasswd": {
"path": "/home/peusebiu/htpasswd"
}
},
"port": "5000"
},
"log": {
"level": "debug"
},
"storage": {
"rootdirectory": "/tmp/zot"
}
}
36 changes: 36 additions & 0 deletions examples/config-cfg-extension.json.bkp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"distspecversion": "1.0.1-dev",
"extensions": {
"sysconfig": {
"enable": true
}
},
"http": {
"accesscontrol": {
"adminpolicy": {
"actions": [
"read",
"create",
"update",
"delete"
],
"users": [
"sebi"
]
}
},
"address": "127.0.0.1",
"auth": {
"htpasswd": {
"path": "/home/peusebiu/htpasswd"
}
},
"port": "5000"
},
"log": {
"level": "debug"
},
"storage": {
"rootdirectory": "/tmp/zot"
}
}
21 changes: 21 additions & 0 deletions examples/config-cve.json.bkp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"distspecversion": "1.0.1-dev",
"extensions": {
"search": {
"cve": {
"updateinterval": "24h"
},
"enable": true
}
},
"http": {
"address": "127.0.0.1",
"port": "8080"
},
"log": {
"level": "debug"
},
"storage": {
"rootdirectory": "/tmp/zot"
}
}
Loading

0 comments on commit ef23662

Please sign in to comment.