diff --git a/README.md b/README.md index 3b9c8d06..09948b5f 100644 --- a/README.md +++ b/README.md @@ -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) | --- diff --git a/charts/akash-hostname-operator/Chart.yaml b/charts/akash-hostname-operator/Chart.yaml index 854b25ce..f0d63fb5 100644 --- a/charts/akash-hostname-operator/Chart.yaml +++ b/charts/akash-hostname-operator/Chart.yaml @@ -17,7 +17,7 @@ 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 @@ -25,4 +25,4 @@ version: 8.0.0 # 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 diff --git a/charts/akash-hostname-operator/templates/cluster-role.yaml b/charts/akash-hostname-operator/templates/cluster-role.yaml index 2f7a4327..1143b6f6 100644 --- a/charts/akash-hostname-operator/templates/cluster-role.yaml +++ b/charts/akash-hostname-operator/templates/cluster-role.yaml @@ -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 \ No newline at end of file diff --git a/charts/akash-hostname-operator/templates/config-map.yaml b/charts/akash-hostname-operator/templates/config-map.yaml deleted file mode 100644 index 5984b4f0..00000000 --- a/charts/akash-hostname-operator/templates/config-map.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: akash-{{ include "akash-hostname-operator.fullname" . }}-boot - namespace: {{ .Release.Namespace }} -data: - run.sh: | - #!/bin/sh - exec provider-services hostname-operator --listen 0.0.0.0:8188 diff --git a/charts/akash-hostname-operator/templates/config.yaml b/charts/akash-hostname-operator/templates/config.yaml new file mode 100644 index 00000000..365b0074 --- /dev/null +++ b/charts/akash-hostname-operator/templates/config.yaml @@ -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" \ No newline at end of file diff --git a/charts/akash-hostname-operator/templates/deployment.yaml b/charts/akash-hostname-operator/templates/deployment.yaml index 6668d103..54ecc4b4 100644 --- a/charts/akash-hostname-operator/templates/deployment.yaml +++ b/charts/akash-hostname-operator/templates/deployment.yaml @@ -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 \ No newline at end of file diff --git a/charts/akash-hostname-operator/templates/ingress.yaml b/charts/akash-hostname-operator/templates/ingress.yaml index caaf6508..67071a1c 100644 --- a/charts/akash-hostname-operator/templates/ingress.yaml +++ b/charts/akash-hostname-operator/templates/ingress.yaml @@ -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 \ No newline at end of file diff --git a/charts/akash-hostname-operator/templates/rbac.yaml b/charts/akash-hostname-operator/templates/rbac.yaml index bdfe21e6..73269b2a 100644 --- a/charts/akash-hostname-operator/templates/rbac.yaml +++ b/charts/akash-hostname-operator/templates/rbac.yaml @@ -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 \ No newline at end of file diff --git a/charts/akash-hostname-operator/templates/service.yaml b/charts/akash-hostname-operator/templates/service.yaml index 9795a261..b79feb5b 100644 --- a/charts/akash-hostname-operator/templates/service.yaml +++ b/charts/akash-hostname-operator/templates/service.yaml @@ -1,28 +1,20 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "akash-hostname-operator.fullname" . }} - labels: - {{- include "akash-hostname-operator.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - name: status - selector: - {{- include "akash-hostname-operator.selectorLabels" . | nindent 4 }} --- -## Backwards compatability fix. Remove once 0.16.5 is released. apiVersion: v1 kind: Service metadata: - name: hostname-operator + 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: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - name: status selector: - {{- include "akash-hostname-operator.selectorLabels" . | nindent 4 }} + app.kubernetes.io/name: hostname + app.kubernetes.io/instance: hostname-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider + ports: + - name: rest + port: 8080 + targetPort: rest \ No newline at end of file diff --git a/charts/akash-hostname-operator/templates/serviceaccount.yaml b/charts/akash-hostname-operator/templates/serviceaccount.yaml index 1b214a1d..8a3ebcd0 100644 --- a/charts/akash-hostname-operator/templates/serviceaccount.yaml +++ b/charts/akash-hostname-operator/templates/serviceaccount.yaml @@ -1,12 +1,10 @@ -{{- if .Values.serviceAccount.create -}} +--- apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "akash-hostname-operator.serviceAccountName" . }} + name: operator-hostname labels: - {{- include "akash-hostname-operator.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} + app.kubernetes.io/name: hostname + app.kubernetes.io/instance: hostname-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider \ No newline at end of file diff --git a/charts/akash-inventory-operator/Chart.yaml b/charts/akash-inventory-operator/Chart.yaml index b8a7a9ad..94ca9643 100644 --- a/charts/akash-inventory-operator/Chart.yaml +++ b/charts/akash-inventory-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: akash-inventory-operator -description: An operator required for persistent storage (optional) +description: An operator required for persistent storage (required) # A chart can be either an 'application' or a 'library' chart. # @@ -17,11 +17,11 @@ 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.1 +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. # # Refs https://github.com/akash-network/provider/releases -appVersion: 0.4.8 +appVersion: 0.5.3-rc1 diff --git a/charts/akash-inventory-operator/templates/clusterrole.yaml b/charts/akash-inventory-operator/templates/clusterrole.yaml index d6c34ba9..a241dc45 100644 --- a/charts/akash-inventory-operator/templates/clusterrole.yaml +++ b/charts/akash-inventory-operator/templates/clusterrole.yaml @@ -1,32 +1,60 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: akash-inventory-operator + name: akash-operator-inventory labels: akash.network: "true" - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider rules: - apiGroups: - '' resources: - namespaces - nodes - - pods - events + - services - persistentvolumes - persistentvolumeclaims verbs: - get - list - watch + - apiGroups: + - '' + resources: + - nodes + verbs: + - patch + - apiGroups: + - '' + resources: + - pods + verbs: + - create + - delete + - get + - list + - watch - apiGroups: - '' resources: - pods/exec verbs: - create + - delete + - get + - list + - watch + - apiGroups: + - '' + resources: + - pods/proxy + verbs: + - get - apiGroups: - storage.k8s.io resources: @@ -62,3 +90,31 @@ rules: - get - list - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: akash-operator-inventory-hardware-discovery + labels: + akash.network: "true" + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-hardware-discovery + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider +rules: + - apiGroups: + - '' + resources: + - nodes + verbs: + - get + - list + - watch + - apiGroups: + - '' + resources: + - pods + verbs: + - get + - list + - watch \ No newline at end of file diff --git a/charts/akash-inventory-operator/templates/clusterrolebinding.yaml b/charts/akash-inventory-operator/templates/clusterrolebinding.yaml index eb930407..d8a0e7e6 100644 --- a/charts/akash-inventory-operator/templates/clusterrolebinding.yaml +++ b/charts/akash-inventory-operator/templates/clusterrolebinding.yaml @@ -1,17 +1,38 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: akash-inventory-operator + name: operator-inventory labels: akash.network: "true" - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: akash-inventory-operator + name: akash-operator-inventory subjects: - kind: ServiceAccount - name: akash-inventory-operator + name: operator-inventory namespace: akash-services +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: operator-inventory-hardware-discovery + labels: + akash.network: "true" + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-hardware-discovery + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: akash-operator-inventory-hardware-discovery +subjects: + - kind: ServiceAccount + name: operator-inventory-hardware-discovery + namespace: akash-services \ No newline at end of file diff --git a/charts/akash-inventory-operator/templates/config.yaml b/charts/akash-inventory-operator/templates/config.yaml new file mode 100644 index 00000000..b1629251 --- /dev/null +++ b/charts/akash-inventory-operator/templates/config.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: operator-inventory + namespace: akash-services +data: + config.yaml: | + version: v1 + cluster_storage: +{{- range .Values.inventoryConfig.cluster_storage }} + - {{ . }} +{{- end }} + exclude: + nodes: [] + node_storage: [] diff --git a/charts/akash-inventory-operator/templates/deployment.yaml b/charts/akash-inventory-operator/templates/deployment.yaml index b01b732e..68373bfc 100644 --- a/charts/akash-inventory-operator/templates/deployment.yaml +++ b/charts/akash-inventory-operator/templates/deployment.yaml @@ -1,35 +1,53 @@ +--- apiVersion: apps/v1 kind: Deployment metadata: - name: akash-inventory-operator + name: operator-inventory namespace: akash-services labels: akash.network: "true" - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider spec: selector: matchLabels: - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider replicas: 1 revisionHistoryLimit: 1 template: metadata: labels: - app: akash-inventory-operator - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider spec: - serviceAccountName: akash-inventory-operator + serviceAccountName: operator-inventory + terminationGracePeriodSeconds: 30 containers: - - name: akash-inventory-operator + - name: operator-inventory image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - command: ["provider-services", "operator", "inventory"] + args: + - "provider-services" + - "operator" + - "inventory" imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: AP_CONFIG + value: /akash/config.yaml + - name: AP_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: AP_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: limits: cpu: 500m @@ -39,5 +57,15 @@ spec: memory: 128Mi ports: - containerPort: 8080 - name: api + name: rest protocol: TCP + - containerPort: 8081 + name: grpc + protocol: TCP + volumeMounts: + - name: config + mountPath: /akash + volumes: + - name: config + configMap: + name: operator-inventory \ No newline at end of file diff --git a/charts/akash-inventory-operator/templates/service.yaml b/charts/akash-inventory-operator/templates/service.yaml index 4ced3cf4..0b4b95d7 100644 --- a/charts/akash-inventory-operator/templates/service.yaml +++ b/charts/akash-inventory-operator/templates/service.yaml @@ -1,44 +1,28 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - akash.network: "true" - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory - app.kubernetes.io/component: operator - name: akash-inventory-operator - namespace: akash-services -spec: - type: ClusterIP - ports: - - name: api - port: 8080 - targetPort: api - appProtocol: http - selector: - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory - app.kubernetes.io/component: operator --- -## Backwards compatability fix. Remove once 0.16.5 is released. apiVersion: v1 kind: Service metadata: labels: akash.network: "true" - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator - name: inventory-operator + app.kubernetes.io/part-of: provider + name: operator-inventory namespace: akash-services spec: type: ClusterIP ports: - - name: api + - name: rest port: 8080 - targetPort: api + targetPort: rest appProtocol: http + - name: grpc + port: 8081 + targetPort: grpc + appProtocol: tcp selector: - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider \ No newline at end of file diff --git a/charts/akash-inventory-operator/templates/serviceaccount.yaml b/charts/akash-inventory-operator/templates/serviceaccount.yaml index f550ef89..83fc308a 100644 --- a/charts/akash-inventory-operator/templates/serviceaccount.yaml +++ b/charts/akash-inventory-operator/templates/serviceaccount.yaml @@ -1,11 +1,25 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: - name: akash-inventory-operator + name: operator-inventory namespace: akash-services labels: akash.network: "true" - app.kubernetes.io/name: akash - app.kubernetes.io/instance: inventory + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-service app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider automountServiceAccountToken: true +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: operator-inventory-hardware-discovery + namespace: akash-services + labels: + akash.network: "true" + app.kubernetes.io/name: inventory + app.kubernetes.io/instance: inventory-hardware-discovery + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider \ No newline at end of file diff --git a/charts/akash-inventory-operator/values.yaml b/charts/akash-inventory-operator/values.yaml index e7686256..a250c59e 100644 --- a/charts/akash-inventory-operator/values.yaml +++ b/charts/akash-inventory-operator/values.yaml @@ -5,3 +5,13 @@ image: repository: ghcr.io/akash-network/provider pullPolicy: IfNotPresent + +inventoryConfig: + # Allow users to specify cluster storage options + cluster_storage: + - default + - beta2 + exclude: + nodes: [] + node_storage: [] + diff --git a/charts/akash-ip-operator/Chart.yaml b/charts/akash-ip-operator/Chart.yaml index 8e8d75ff..d32c94ce 100644 --- a/charts/akash-ip-operator/Chart.yaml +++ b/charts/akash-ip-operator/Chart.yaml @@ -17,7 +17,7 @@ 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 @@ -25,4 +25,4 @@ version: 8.0.0 # 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 diff --git a/charts/akash-ip-operator/templates/clusterrole.yaml b/charts/akash-ip-operator/templates/clusterrole.yaml index 54aaeee1..0117046c 100644 --- a/charts/akash-ip-operator/templates/clusterrole.yaml +++ b/charts/akash-ip-operator/templates/clusterrole.yaml @@ -1,35 +1,57 @@ -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"] ---- -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"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: akash-ip-op-watch-configmaps -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list", "watch"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: akash-ip-op-get-namespaces + name: akash-operator-ip + labels: + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider rules: - - apiGroups: [""] - resources: ["namespaces"] - verbs: ["get"] + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - create + - update + - delete + - deletecollection + - watch + - apiGroups: + - "" + resources: + - services/proxy + verbs: + - get + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - akash.network + resources: + - providerleasedips + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - apiGroups: + - "" + resources: + - pods + verbs: + - get \ No newline at end of file diff --git a/charts/akash-ip-operator/templates/config.yaml b/charts/akash-ip-operator/templates/config.yaml new file mode 100644 index 00000000..a3112aa5 --- /dev/null +++ b/charts/akash-ip-operator/templates/config.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: operator-ip + namespace: akash-services +data: + provider-address: {{ .Values.provider_address | default "" | quote }} + 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" diff --git a/charts/akash-ip-operator/templates/deployment.yaml b/charts/akash-ip-operator/templates/deployment.yaml index 48d13676..8cfc830c 100644 --- a/charts/akash-ip-operator/templates/deployment.yaml +++ b/charts/akash-ip-operator/templates/deployment.yaml @@ -1,42 +1,86 @@ +--- apiVersion: apps/v1 kind: Deployment metadata: - name: akash-ip-operator + name: operator-ip namespace: akash-services labels: - akash.network/component: akash-ip-operator + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider spec: selector: matchLabels: - app: akash-ip-operator + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider replicas: 1 + revisionHistoryLimit: 1 template: metadata: labels: - app: akash-ip-operator - akash.network/component: akash-ip-operator + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider spec: - serviceAccountName: akash-ip-operator + serviceAccountName: operator-ip containers: - - name: akash-ip-operator - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - args: ["provider-services", "ip-operator", "--provider", "{{ .Values.provider_address }}"] - imagePullPolicy: IfNotPresent - ports: - - name: api - containerPort: 8086 - env: - - name: AP_K8S_MANIFEST_NS - value: "lease" - - name: AP_PRUNE_INTERVAL - value: "600s" - - name: AP_IGNORE_LIST_ENTRY_LIMIT - value: "131072" - - name: AP_WEB_REFRESH_INTERVAL - value: "5s" - - name: AP_RETRY_DELAY - value: "3s" - - name: AP_LIST_AGE_LIMIT - value: "2613600s" - - name: AP_EVENT_FAILURE_LIMIT - value: "3" + - name: operator-ip + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: IfNotPresent + args: ["provider-services", "operator", "ip"] + ports: + - name: rest + containerPort: 8080 + env: + - name: AP_K8S_MANIFEST_NS + valueFrom: + configMapKeyRef: + name: operator-ip + key: k8s-manifest-ns + - name: AP_PRUNE_INTERVAL + valueFrom: + configMapKeyRef: + name: operator-ip + key: prune-interval + - name: AP_IGNORE_LIST_ENTRY_LIMIT + valueFrom: + configMapKeyRef: + name: operator-ip + key: ignore-list-entry-limit + - name: AP_WEB_REFRESH_INTERVAL + valueFrom: + configMapKeyRef: + name: operator-ip + key: web-refresh-interval + - name: AP_RETRY_DELAY + valueFrom: + configMapKeyRef: + name: operator-ip + key: retry-delay + - name: AP_IGNORE_LIST_AGE_LIMIT + valueFrom: + configMapKeyRef: + name: operator-ip + key: ignore-list-age-limit + - name: AP_EVENT_FAILURE_LIMIT + valueFrom: + configMapKeyRef: + name: operator-ip + key: event-failure-limit + - name: AP_PROVIDER + valueFrom: + configMapKeyRef: + name: operator-ip + key: provider-address + - name: AP_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: AP_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace \ No newline at end of file diff --git a/charts/akash-ip-operator/templates/rbac.yaml b/charts/akash-ip-operator/templates/rbac.yaml index 4d509bf8..c913ff96 100644 --- a/charts/akash-ip-operator/templates/rbac.yaml +++ b/charts/akash-ip-operator/templates/rbac.yaml @@ -1,51 +1,18 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: akash-ip-operator-manage-service -subjects: - - kind: ServiceAccount - name: akash-ip-operator - namespace: akash-services -roleRef: - kind: ClusterRole - name: akash-ip-op-manage-service - apiGroup: rbac.authorization.k8s.io ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: akash-ip-operator-watch-providerleasedip -subjects: - - kind: ServiceAccount - name: akash-ip-operator - namespace: akash-services -roleRef: - kind: ClusterRole - name: akash-ip-op-watch-providerleasedip - apiGroup: rbac.authorization.k8s.io ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: akash-ip-operator-watch-configmaps -subjects: - - kind: ServiceAccount - name: akash-ip-operator - namespace: akash-services -roleRef: - kind: ClusterRole - name: akash-ip-op-watch-configmaps - apiGroup: rbac.authorization.k8s.io --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: akash-ip-operator-get-namespaces + name: akash-operator-ip + labels: + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider subjects: - kind: ServiceAccount - name: akash-ip-operator + name: operator-ip namespace: akash-services roleRef: kind: ClusterRole - name: akash-ip-op-get-namespaces - apiGroup: rbac.authorization.k8s.io + name: akash-operator-ip + apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/charts/akash-ip-operator/templates/service.yaml b/charts/akash-ip-operator/templates/service.yaml index 2ffb4f4f..2a814ef0 100644 --- a/charts/akash-ip-operator/templates/service.yaml +++ b/charts/akash-ip-operator/templates/service.yaml @@ -1,11 +1,21 @@ +--- apiVersion: v1 kind: Service metadata: - name: akash-ip-operator + name: operator-ip namespace: akash-services + labels: + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider spec: selector: - akash.network/component: akash-ip-operator + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider ports: - - name: api - port: 8086 + - name: rest + port: 8080 + targetPort: rest \ No newline at end of file diff --git a/charts/akash-ip-operator/templates/serviceaccount.yaml b/charts/akash-ip-operator/templates/serviceaccount.yaml index 0dab5636..9cca437a 100644 --- a/charts/akash-ip-operator/templates/serviceaccount.yaml +++ b/charts/akash-ip-operator/templates/serviceaccount.yaml @@ -1,5 +1,11 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: - name: akash-ip-operator + name: operator-ip namespace: akash-services + labels: + app.kubernetes.io/name: ip + app.kubernetes.io/instance: ip-service + app.kubernetes.io/component: operator + app.kubernetes.io/part-of: provider \ No newline at end of file diff --git a/charts/akash-provider/Chart.yaml b/charts/akash-provider/Chart.yaml index e8076c7a..b711373c 100644 --- a/charts/akash-provider/Chart.yaml +++ b/charts/akash-provider/Chart.yaml @@ -17,11 +17,11 @@ 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.3 +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. # # Refs https://github.com/akash-network/provider/releases -appVersion: 0.4.8 +appVersion: 0.5.3-rc1 diff --git a/charts/akash-provider/templates/service.yaml b/charts/akash-provider/templates/service.yaml index 7f222d8b..c19ad130 100644 --- a/charts/akash-provider/templates/service.yaml +++ b/charts/akash-provider/templates/service.yaml @@ -16,6 +16,10 @@ spec: protocol: TCP port: 8443 targetPort: api + - name: grpc + protocol: TCP + port: 8444 + targetPort: grpc selector: app: {{ include "provider.fullname" . }} {{- include "provider.selectorLabels" . | nindent 4 }} diff --git a/charts/akash-provider/templates/statefulset.yaml b/charts/akash-provider/templates/statefulset.yaml index d4db613a..6369754d 100644 --- a/charts/akash-provider/templates/statefulset.yaml +++ b/charts/akash-provider/templates/statefulset.yaml @@ -257,6 +257,9 @@ spec: - name: api containerPort: 8443 protocol: TCP + - name: grpc + containerPort: 8444 + protocol: TCP volumeMounts: - name: boot