Skip to content

Commit

Permalink
Updates api deployment configs
Browse files Browse the repository at this point in the history
- Moves hub config data into the api ConfigMap
  and updates category format in the config file
  and in the configMap
- Updates api deployment to mount the configMap data

Signed-off-by: Shiv Verma <[email protected]>
  • Loading branch information
pratap0007 authored and tekton-robot committed Nov 13, 2022
1 parent d0cc96e commit b53f924
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 29 deletions.
40 changes: 20 additions & 20 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@
# limitations under the License.
---
categories:
- name: Automation
- name: Build Tools
- name: CLI
- name: Cloud
- name: Code Quality
- name: Continuous Integration
- name: Deployment
- name: Developer Tools
- name: Image Build
- name: Integration & Delivery
- name: Git
- name: Kubernetes
- name: Messaging
- name: Monitoring
- name: Networking
- name: Openshift
- name: Publishing
- name: Security
- name: Storage
- name: Testing
- Automation
- Build Tools
- CLI
- Cloud
- Code Quality
- Continuous Integration
- Deployment
- Developer Tools
- Image Build
- Integration & Delivery
- Git
- Kubernetes
- Messaging
- Monitoring
- Networking
- Openshift
- Publishing
- Security
- Storage
- Testing

catalogs:
- name: tekton
Expand Down
42 changes: 40 additions & 2 deletions config/02-api/21-api-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,43 @@ metadata:
labels:
app: tekton-hub-api
data:
CONFIG_FILE_URL: https://raw.githubusercontent.com/tektoncd/hub/main/config.yaml
CATALOG_REFRESH_INTERVAL: 30m
CATEGORIES: |
- Automation
- Build Tools
- CLI
- Cloud
- Code Quality
- Continuous Integration
- Deployment
- Developer Tools
- Image Build
- Integration & Delivery
- Git
- Kubernetes
- Messaging
- Monitoring
- Networking
- Openshift
- Publishing
- Security
- Storage
- Testing
CATALOGS: |
- name: tekton
org: tektoncd
type: community
provider: github
url: https://github.com/tektoncd/catalog
revision: main
SCOPES: |
- name: agent:create
users: [vinamra28, piyush-garg, pratap0007, puneetpunamiya, sm43, sthaha, vdemeester]
- name: catalog:refresh
users: [vinamra28, piyush-garg, pratap0007, puneetpunamiya, sm43, sthaha, vdemeester]
- name: config:refresh
users: [vinamra28, piyush-garg, pratap0007, puneetpunamiya, sm43, sthaha, vdemeester]
DEFAULT: |
scopes:
- rating:read
- rating:write
CATALOG_REFRESH_INTERVAL: 30m
25 changes: 18 additions & 7 deletions config/02-api/22-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ spec:
- name: catalog-source
persistentVolumeClaim:
claimName: tekton-hub-api
- name: tekton-hub-config
configMap:
name: tekton-hub-api
items:
- key: CATEGORIES
path: 'categories'
- key: CATALOGS
path: 'catalogs'
- key: SCOPES
path: 'scopes'
- key: CATALOG_REFRESH_INTERVAL
path: 'catalog_refresh_interval'
- key: DEFAULT
path: 'default'
- name: ssh-creds
secret:
secretName: tekton-hub-api-ssh-crds
Expand All @@ -50,9 +64,11 @@ spec:
memory: 500Mi
volumeMounts:
- name: catalog-source
mountPath: "/tmp/catalog"
mountPath: '/tmp/catalog'
- name: ssh-creds
mountPath: "/home/hub/.ssh"
mountPath: '/home/hub/.ssh'
- name: tekton-hub-config
mountPath: '/tmp/config'
ports:
- containerPort: 8000
- containerPort: 4200
Expand Down Expand Up @@ -102,11 +118,6 @@ spec:
secretKeyRef:
name: tekton-hub-db
key: POSTGRES_PASSWORD
- name: CONFIG_FILE_URL
valueFrom:
configMapKeyRef:
name: tekton-hub-api
key: CONFIG_FILE_URL
- name: CATALOG_REFRESH_INTERVAL
valueFrom:
configMapKeyRef:
Expand Down

0 comments on commit b53f924

Please sign in to comment.