-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: feature discovery updates for inventory chart (#245)
* feat: feature discovery updates for inventory chart * feat: update of chart labels * Update config.yaml * Update config.yaml * Update values.yaml * Update config.yaml * Update config.yaml * Update config.yaml * feat: adding port 8444 to inventory operator service * Update daemonset.yaml * feat: update of inventory operator values.yaml with storage classes * feat: remove daemon-set from inventory operator chart * refactor(operator/inventory): deploy hw discovery from operator * feat: update inventory operator chart to accept image tag * feat: update ip and hostname operators with new labels, selectors, and command sets * Update values.yaml * feat: remove liveness and readiness probes from inventory operator * feat: update hostname operator configmap to operator-hostname * feat: update hostname operator configmap namespace * feat: reconfigure configmap for hostname operator * feat: add targetport to ip and hostname operator services * feat: add configmap for ip-operator * feat: add provider-address to ip operator configmap * feat: updating inventory operator targetportname to rest * feat: updating feature-discovery branch with main updates * feat: update readme to state inventory operator is required * feat: update inventory operator with simplied role bindings * feat: update provider and operator versions to 0.5.3-rc1 * feat: update inventory operator as a required component --------- Co-authored-by: chainzero <[email protected]>
- Loading branch information
Showing
28 changed files
with
523 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 40 additions & 30 deletions
70
charts/akash-hostname-operator/templates/cluster-role.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
112
charts/akash-hostname-operator/templates/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.