-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
565 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.vscode/ | ||
.vscode/ | ||
dryrun.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 |
---|---|---|
|
@@ -8,4 +8,4 @@ kind: ConfigMap | |
metadata: | ||
name: wandb-launch-configmap | ||
namespace: {{ .Values.namespace }} | ||
... | ||
... | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bcsherma
Contributor
|
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,10 @@ | ||
apiVersion: v2 | ||
name: operator | ||
description: A Helm chart for Weights & Biases operator | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "1.0.0" | ||
maintainers: | ||
- name: wandb | ||
email: [email protected] | ||
url: https://wandb.com |
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,18 @@ | ||
# Weights & Biases Operator | ||
|
||
# Operator | ||
|
||
## Install | ||
|
||
``` | ||
helm repo add wandb https://wandb.github.io/helm-charts | ||
helm upgrade --install operator wandb/operator | ||
``` | ||
|
||
## Install from source | ||
|
||
``` | ||
git clone https://github.com/wandb/helm-charts.git | ||
cd helm-charts | ||
helm upgrade --namespace=wandb --create-namespace --install operator . | ||
``` |
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,59 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: weightsandbiases.apps.wandb.com | ||
spec: | ||
group: apps.wandb.com | ||
names: | ||
kind: WeightsAndBiases | ||
listKind: WeightsAndBiasesList | ||
plural: weightsandbiases | ||
shortNames: | ||
- wandb | ||
singular: weightsandbiases | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: WeightsAndBiases is the Schema for the weightsandbiases API | ||
properties: | ||
apiVersion: | ||
description: | ||
"APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" | ||
type: string | ||
kind: | ||
description: | ||
"Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: WeightsAndBiasesSpec defines the desired state of WeightsAndBiases | ||
properties: | ||
config: | ||
description: Unstructured values for rendering CDK8s Config. | ||
type: object | ||
license: | ||
type: string | ||
version: | ||
type: string | ||
type: object | ||
status: | ||
description: WeightsAndBiasesStatus defines the observed state of WeightsAndBiases | ||
properties: | ||
phase: | ||
type: string | ||
version: | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "operator.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "operator.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "operator.labels" -}} | ||
helm.sh/chart: {{ include "operator.chart" . }} | ||
{{ include "operator.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "operator.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "operator.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the manager service account to use | ||
*/}} | ||
{{- define "manager.serviceAccount.name" -}} | ||
{{- if .Values.manager.serviceAccount.create }} | ||
{{- $name := printf "%s-%s" (include "name" .) "manager" }} | ||
{{- default $name .Values.manager.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.manager.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
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,66 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
name: {{ include "name" . }}-controller-manager | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
control-plane: controller-manager | ||
template: | ||
metadata: | ||
annotations: {{- toYaml .Values.podAnnotations | nindent 8 }} | ||
labels: | ||
control-plane: controller-manager | ||
spec: | ||
securityContext: | ||
seccompProfile: | ||
type: RuntimeDefault | ||
containers: | ||
- name: manager | ||
command: | ||
- /manager | ||
args: | ||
- --leader-elect | ||
{{- if .Values.manager.debug.enabled }} | ||
- --zap-devel=true | ||
{{- end }} | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
{{- if .Values.image.pullPolicy }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} | ||
{{- end }} | ||
env: | ||
{{- if .Values.extraEnv }} | ||
{{- toYaml .Values.extraEnvs | nindent 8 }} | ||
{{- end }} | ||
- name: WANDB_MANAGER_SERVICE_ACCOUNT | ||
value: {{ include "manager.serviceAccount.name" . }} | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8081 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
readinessProbe: | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
resources: {{- toYaml .Values.resources | nindent 10 }} | ||
- args: | ||
- --secure-listen-address=0.0.0.0:8443 | ||
- --upstream=http://127.0.0.1:8080/ | ||
- --logtostderr=true | ||
- --v=10 | ||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 | ||
name: kube-rbac-proxy | ||
ports: | ||
- containerPort: 8443 | ||
name: https | ||
protocol: TCP | ||
serviceAccountName: {{ include "manager.serviceAccount.name" . }} | ||
terminationGracePeriodSeconds: 10 |
38 changes: 38 additions & 0 deletions
38
charts/operator/templates/manager/leader-election-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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# permissions to do leader election. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ include "name" . }}-leader-election-role | ||
namespace: {{ .Release.Namespace }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- patch |
13 changes: 13 additions & 0 deletions
13
charts/operator/templates/manager/leader-election-rolebinding.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ include "name" . }}-leader-election-rolebinding | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ include "name" . }}-leader-election-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "manager.serviceAccount.name" . }} | ||
namespace: {{ .Release.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "name" . }}-metrics-reader | ||
rules: | ||
- nonResourceURLs: | ||
- /metrics | ||
verbs: | ||
- get |
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,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
name: {{ include "name" . }}-controller-manager-metrics-service | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ports: | ||
- name: https | ||
port: 8443 | ||
protocol: TCP | ||
targetPort: https | ||
selector: | ||
control-plane: controller-manager |
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,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "name" . }}-proxy-role | ||
rules: | ||
- apiGroups: | ||
- authentication.k8s.io | ||
resources: | ||
- tokenreviews | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- authorization.k8s.io | ||
resources: | ||
- subjectaccessreviews | ||
verbs: | ||
- create |
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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "name" . }}-proxy-rolebinding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ include "name" . }}-proxy-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "manager.serviceAccount.name" . }} | ||
namespace: {{ .Release.Namespace }} |
Oops, something went wrong.
@jsbroks this is what triggered the agent release. If you remove this from the branch and rerun the workflow I think it will work. Should have realized this sooner