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

feat(inventory): load pcidb at startup #177

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
tini \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# default port for provider API
Expand Down
3 changes: 2 additions & 1 deletion _docs/kustomize/akash-node/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -17,7 +18,7 @@ spec:
- name: akash-node
image: ghcr.io/akash-network/node:stable
imagePullPolicy: IfNotPresent
command: [ "/bin/sh" , "/boot/run.sh" ]
command: ["/bin/sh", "/boot/run.sh"]
env:

##
Expand Down
1 change: 1 addition & 0 deletions _docs/kustomize/akash-node/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down
1 change: 1 addition & 0 deletions _docs/kustomize/akash-node/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: akash-services
Expand Down
1 change: 1 addition & 0 deletions _docs/kustomize/akash-node/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
87 changes: 44 additions & 43 deletions _docs/kustomize/akash-operator-hostname/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -18,46 +19,46 @@ spec:
spec:
serviceAccountName: akash-operator
containers:
- name: akash-hostname-operator
image: ghcr.io/akash-network/provider:stable
imagePullPolicy: IfNotPresent
args: ["provider-services", "hostname-operator"]
ports:
- name: status
containerPort: 8085
env:
- name: AP_K8S_MANIFEST_NS
valueFrom:
configMapKeyRef:
name: akash-provider-config
key: k8s-manifest-ns
- name: AP_PRUNE_INTERVAL
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: prune-interval
- name: AP_IGNORE_LIST_ENTRY_LIMIT
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: ignore-list-entry-limit
- name: AP_WEB_REFRESH_INTERVAL
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: web-refresh-interval
- name: AP_RETRY_DELAY
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: retry-delay
- name: AP_IGNORE_LIST_AGE_LIMIT
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: ignore-list-age-limit
- name: AP_EVENT_FAILURE_LIMIT
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: event-failure-limit
- name: akash-hostname-operator
image: ghcr.io/akash-network/provider:stable
imagePullPolicy: IfNotPresent
args: ["provider-services", "hostname-operator"]
ports:
- name: status
containerPort: 8085
env:
- name: AP_K8S_MANIFEST_NS
valueFrom:
configMapKeyRef:
name: akash-provider-config
key: k8s-manifest-ns
- name: AP_PRUNE_INTERVAL
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: prune-interval
- name: AP_IGNORE_LIST_ENTRY_LIMIT
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: ignore-list-entry-limit
- name: AP_WEB_REFRESH_INTERVAL
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: web-refresh-interval
- name: AP_RETRY_DELAY
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: retry-delay
- name: AP_IGNORE_LIST_AGE_LIMIT
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: ignore-list-age-limit
- name: AP_EVENT_FAILURE_LIMIT
valueFrom:
configMapKeyRef:
name: akash-hostname-operator-config
key: event-failure-limit
15 changes: 8 additions & 7 deletions _docs/kustomize/akash-operator-hostname/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand All @@ -12,10 +13,10 @@ spec:
- host: akash-hostname-operator.localhost
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: akash-hostname-operator
port:
name: status
- path: /
pathType: Prefix
backend:
service:
name: akash-hostname-operator
port:
name: status
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: akash-services
Expand Down
1 change: 1 addition & 0 deletions _docs/kustomize/akash-operator-hostname/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down
1 change: 1 addition & 0 deletions _docs/kustomize/akash-operator-hostname/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
13 changes: 13 additions & 0 deletions _docs/kustomize/akash-operator-inventory/cluster-roles.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -74,6 +75,18 @@ rules:
- get
- list
- watch
- apiGroups:
- ''
resources:
- configmaps
verbs:
- create
- update
- patch
- delete
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
2 changes: 2 additions & 0 deletions _docs/kustomize/akash-operator-inventory/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ spec:
initialDelaySeconds: 5
periodSeconds: 5
env:
- name: PCIDB_ENABLE_NETWORK_FETCH
value: "1"
- name: AP_POD_NAME
valueFrom:
fieldRef:
Expand Down
1 change: 1 addition & 0 deletions _docs/kustomize/akash-operator-inventory/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: akash-services
Expand Down
1 change: 1 addition & 0 deletions _docs/kustomize/akash-operator-inventory/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
Expand Down
47 changes: 35 additions & 12 deletions _docs/kustomize/akash-operator-ip/cluster_role.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,58 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: akash-ip-op-manage-service
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "list", "create", "update", "delete", "deletecollection", "watch"]
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- create
- update
- delete
- deletecollection
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: akash-ip-op-watch-providerleasedip
rules:
- apiGroups: ["akash.network"]
resources: ["providerleasedips"]
verbs: ["get", "list", "watch"]
- apiGroups:
- akash.network
resources:
- providerleasedips
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: akash-ip-op-watch-configmaps
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: akash-ip-op-get-namespaces
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
Loading
Loading