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: feature discovery updates for inventory chart #245

Merged
merged 29 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
46ae709
feat: feature discovery updates for inventory chart
Jan 24, 2024
3b38955
feat: update of chart labels
chainzero Jan 25, 2024
1b43bf1
Update config.yaml
chainzero Jan 29, 2024
ae74c2d
Update config.yaml
chainzero Jan 29, 2024
81d25e2
Update values.yaml
chainzero Jan 29, 2024
1b058e3
Update config.yaml
chainzero Jan 29, 2024
b31bdfd
Update config.yaml
chainzero Jan 29, 2024
597f5a2
Update config.yaml
chainzero Jan 29, 2024
7be6588
feat: adding port 8444 to inventory operator service
chainzero Jan 30, 2024
7c4bfd0
Update daemonset.yaml
chainzero Jan 30, 2024
a4f420f
feat: update of inventory operator values.yaml with storage classes
chainzero Jan 30, 2024
47fd9dc
feat: remove daemon-set from inventory operator chart
chainzero Feb 1, 2024
0a5b3fa
refactor(operator/inventory): deploy hw discovery from operator
chainzero Feb 2, 2024
5d5e981
feat: update inventory operator chart to accept image tag
chainzero Feb 4, 2024
3258d58
feat: update ip and hostname operators with new labels, selectors, an…
chainzero Feb 12, 2024
6063bcd
Update values.yaml
chainzero Feb 6, 2024
05458c0
feat: remove liveness and readiness probes from inventory operator
chainzero Feb 12, 2024
6b70f7b
feat: update hostname operator configmap to operator-hostname
chainzero Feb 12, 2024
57a9f56
feat: update hostname operator configmap namespace
chainzero Feb 12, 2024
f7ac05c
feat: reconfigure configmap for hostname operator
chainzero Feb 12, 2024
cf6ac2f
feat: add targetport to ip and hostname operator services
chainzero Feb 13, 2024
265d313
feat: add configmap for ip-operator
chainzero Feb 19, 2024
ccc701f
feat: add provider-address to ip operator configmap
chainzero Feb 19, 2024
107a518
feat: updating inventory operator targetportname to rest
chainzero Feb 22, 2024
d5a0361
feat: updating feature-discovery branch with main updates
chainzero Feb 28, 2024
bbd8b14
feat: update readme to state inventory operator is required
chainzero Feb 23, 2024
f48256e
feat: update inventory operator with simplied role bindings
chainzero Feb 24, 2024
abe1451
feat: update provider and operator versions to 0.5.3-rc1
chainzero Feb 28, 2024
4ee41d9
feat: update inventory operator as a required component
chainzero Feb 28, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please refer to the https://docs.akash.network for Helm-Chart based installation
| akash-node | Installs an Akash RPC node (required) |
| akash-provider | Installs an Akash provider (required) |
| akash-hostname-operator | An operator to map Ingress objects to Akash deployments (required) |
| akash-inventory-operator | An operator required for persistent storage (optional) |
| akash-inventory-operator | An operator for inventory discovery, labeling, and reporting (required)|
| akash-ip-operator | An operator required for ip marketplace (optional) |

---
Expand Down
4 changes: 2 additions & 2 deletions charts/akash-hostname-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ type: application
# Versions are expected to follow Semantic Versioning (https://semver.org/)

# Major version bit highlights the mainnet release (e.g. mainnet4 = 4.x.x, mainnet5 = 5.x.x, ...)
version: 8.0.0
version: 9.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
#
# Refs https://github.com/akash-network/provider/releases
appVersion: 0.4.8
appVersion: 0.5.3-rc1
70 changes: 40 additions & 30 deletions charts/akash-hostname-operator/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: manage-ingress
rules:
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "list", "create", "update", "delete", "deletecollection", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: watch-providerhosts
rules:
- apiGroups: ["akash.network"]
resources: ["providerhosts"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: watch-manifests
rules:
- apiGroups: ["akash.network"]
resources: ["providerhosts", "manifests"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: get-namespaces
name: akash-operator-hostname
labels:
app.kubernetes.io/name: hostname
app.kubernetes.io/instance: hostname-service
app.kubernetes.io/component: operator
app.kubernetes.io/part-of: provider
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- create
- update
- delete
- deletecollection
- watch
- apiGroups:
- ""
resources:
- namespaces
- services
verbs:
- get
- apiGroups:
- akash.network
resources:
- providerhosts
- manifests
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
9 changes: 0 additions & 9 deletions charts/akash-hostname-operator/templates/config-map.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions charts/akash-hostname-operator/templates/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: operator-hostname
namespace: akash-services
data:
k8s-manifest-ns: "lease"
prune-interval: "600s"
ignore-list-entry-limit: "131072"
web-refresh-interval: "5s"
retry-delay: "3s"
ignore-list-age-limit: "2613600s"
event-failure-limit: "3"
112 changes: 64 additions & 48 deletions charts/akash-hostname-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,80 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "akash-hostname-operator.fullname" . }}
name: operator-hostname
labels:
{{- include "akash-hostname-operator.labels" . | nindent 4 }}
app.kubernetes.io/name: hostname
app.kubernetes.io/instance: hostname-service
app.kubernetes.io/component: operator
app.kubernetes.io/part-of: provider
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "akash-hostname-operator.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: hostname
app.kubernetes.io/instance: hostname-service
app.kubernetes.io/component: operator
app.kubernetes.io/part-of: provider
replicas: 1
revisionHistoryLimit: 1
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "akash-hostname-operator.selectorLabels" . | nindent 8 }}
app.kubernetes.io/name: hostname
app.kubernetes.io/instance: hostname-service
app.kubernetes.io/component: operator
app.kubernetes.io/part-of: provider
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "akash-hostname-operator.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
serviceAccountName: operator-hostname
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
- name: operator-hostname
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/sh", "/boot/run.sh"]
args: ["provider-services", "operator", "hostname"]
ports:
- name: status
containerPort: 8085
- name: rest
containerPort: 8080
env:
- name: AKASH_K8S_MANIFEST_NS
value: lease
volumeMounts:
- name: boot
mountPath: /boot
readOnly: true
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: boot
configMap:
name: akash-{{ include "akash-hostname-operator.fullname" . }}-boot
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: AP_K8S_MANIFEST_NS
valueFrom:
configMapKeyRef:
name: operator-hostname
key: k8s-manifest-ns
- name: AP_PRUNE_INTERVAL
valueFrom:
configMapKeyRef:
name: operator-hostname
key: prune-interval
- name: AP_IGNORE_LIST_ENTRY_LIMIT
valueFrom:
configMapKeyRef:
name: operator-hostname
key: ignore-list-entry-limit
- name: AP_WEB_REFRESH_INTERVAL
valueFrom:
configMapKeyRef:
name: operator-hostname
key: web-refresh-interval
- name: AP_RETRY_DELAY
valueFrom:
configMapKeyRef:
name: operator-hostname
key: retry-delay
- name: AP_IGNORE_LIST_AGE_LIMIT
valueFrom:
configMapKeyRef:
name: operator-hostname
key: ignore-list-age-limit
- name: AP_EVENT_FAILURE_LIMIT
valueFrom:
configMapKeyRef:
name: operator-hostname
key: event-failure-limit
- name: AP_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: AP_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
61 changes: 11 additions & 50 deletions charts/akash-hostname-operator/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,22 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "hostname-operator.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
---
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "akash-hostname-operator.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
name: akash-hostname-operator
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
nginx.ingress.kubernetes.io/proxy-send-timeout: "60"
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"

spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
ingressClassName: "akash-ingress-class"
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
- host: akash-hostname-operator.localhost
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
- path: /
pathType: Prefix
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
name: akash-hostname-operator
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
name: status
53 changes: 10 additions & 43 deletions charts/akash-hostname-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,18 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: akash-operator-manage-hostnames
subjects:
- kind: ServiceAccount
name: {{ include "akash-hostname-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: manage-ingress
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: akash-operator-watch-providerhosts
subjects:
- kind: ServiceAccount
name: {{ include "akash-hostname-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: watch-providerhosts
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: akash-operator-watch-manifests
subjects:
- kind: ServiceAccount
name: {{ include "akash-hostname-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: watch-manifests
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: akash-operator-get-namespaces
name: akash-operator-hostname
labels:
app.kubernetes.io/name: hostname
app.kubernetes.io/instance: hostname-service
app.kubernetes.io/component: operator
app.kubernetes.io/part-of: provider
subjects:
- kind: ServiceAccount
name: {{ include "akash-hostname-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
name: operator-hostname
namespace: akash-services
roleRef:
kind: ClusterRole
name: get-namespaces
apiGroup: rbac.authorization.k8s.io
name: akash-operator-hostname
apiGroup: rbac.authorization.k8s.io
Loading
Loading