Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
37c7c52
feat: add CRD for prediction
matisiekpl May 3, 2025
a1d6718
feat: add proteinconformationprediction controller
matisiekpl May 3, 2025
e4171a3
feat: added input placing
matisiekpl May 3, 2025
dda44ef
feat: add model weights to protein conformation prediction
matisiekpl May 3, 2025
c51a1d8
feat: enhance job and PVC labels for protein conformation prediction
matisiekpl May 3, 2025
5396700
feat: enable all datasets in proteindatabase sample configuration
matisiekpl May 3, 2025
abb4f37
fix: sc
matisiekpl May 3, 2025
274e474
feat: add gpu nodes
matisiekpl May 3, 2025
b19a9d6
fix: cmd
matisiekpl May 3, 2025
3244ab0
fix: cmd
matisiekpl May 3, 2025
0b8d100
fix: protein input type
matisiekpl May 3, 2025
eecd9ce
feat: add uploading artifacts phase to protein conformation prediction
matisiekpl May 3, 2025
a557623
Merge branch 'feat/predictions' of github.com:kubefold/operator into …
matisiekpl May 3, 2025
a9281d6
fix: phone number
matisiekpl May 3, 2025
1efd044
feat: add environment variables for input and output paths in upload …
matisiekpl May 3, 2025
f5c9fea
Merge branch 'feat/predictions' of github.com:kubefold/operator into …
matisiekpl May 3, 2025
90d3872
feat: update S3 destination structure to include bucket and region fi…
matisiekpl May 3, 2025
95414ff
fix: update S3 region for protein conformation prediction configuration
matisiekpl May 3, 2025
c4a2b14
fix: add support for optional prediction inputs in job workflow
matisiekpl May 3, 2025
7f03f7e
feat: add region to notify
matisiekpl May 3, 2025
fdee571
fix: sms message
matisiekpl May 3, 2025
644309a
Merge branch 'feat/predictions' of github.com:kubefold/operator into …
matisiekpl May 3, 2025
44166ff
feat: add IAM policies for S3 and SNS access in EKS cluster configura…
matisiekpl May 3, 2025
16d88e9
fix: prepare fold input
matisiekpl May 3, 2025
7994a2c
fix: add sequence beginning
matisiekpl May 3, 2025
36ec14e
feat: enhance protein conformation prediction model with volume and s…
matisiekpl May 4, 2025
d86c532
fix: linter version
matisiekpl May 4, 2025
1f85827
chore: update golangci-lint-action to version 7
matisiekpl May 4, 2025
cc68d0e
chore: update golangci-lint configuration and enhance deepcopy method…
matisiekpl May 4, 2025
ab9cf11
fix: lint errors
matisiekpl May 4, 2025
96244f6
feat: add docker publish
matisiekpl May 4, 2025
5dc63ad
feat: expand ProteinConformationPrediction spec with detailed job and…
matisiekpl May 4, 2025
92fa1c9
fix: dockerfile
matisiekpl May 4, 2025
8f4ea7e
chore: remove deprecated E2E test workflow and add volume storage cla…
matisiekpl May 4, 2025
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
92 changes: 92 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
tags: [ 'v*.*.*' ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
with:
cosign-release: 'v2.2.4'

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
go-version-file: go.mod

- name: Run linter
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.63.4
version: v2.1.5
35 changes: 0 additions & 35 deletions .github/workflows/test-e2e.yml

This file was deleted.

56 changes: 30 additions & 26 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
version: "2"
run:
timeout: 5m
allow-parallel-runners: true

issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
# restore some of the defaults
# (fill in the rest as needed)
exclude-rules:
- path: "api/*"
linters:
- lll
- path: "internal/*"
linters:
- dupl
- lll
linters:
disable-all: true
default: none
enable:
- copyloopvar
- dupl
- errcheck
- copyloopvar
- ginkgolinter
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
Expand All @@ -36,12 +18,34 @@ linters:
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
settings:
revive:
rules:
- name: comment-spacings
exclusions:
generated: lax
rules:
- name: comment-spacings
- linters:
- lll
path: api/*
- linters:
- dupl
- lll
path: internal/*
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM docker.io/golang:1.23 AS builder
FROM docker.io/golang:1.24.2 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
9 changes: 9 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ resources:
kind: ProteinDatabase
path: github.com/kubefold/operator/api/v1
version: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: kubefold.io
group: data
kind: ProteinConformationPrediction
path: github.com/kubefold/operator/api/v1
version: v1
version: "3"
105 changes: 105 additions & 0 deletions api/v1/proteinconformationprediction_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
package v1

import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type ProteinConformationPredictionProtein struct {
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Sequence string `json:"sequence"`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
ID []string `json:"id"`
}

type ProteinConformationPredictionModelWeights struct {
HTTP string `json:"http"`
}

type ProteinConformationPredictionModelVolume struct {
// +optional
StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"`
// +optional
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
}

type ProteinConformationPredictionModel struct {
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Seeds []int `json:"seeds,omitempty"`
Weights ProteinConformationPredictionModelWeights `json:"weights"`
Volume ProteinConformationPredictionModelVolume `json:"volume,omitempty"`
}

type ProteinConformationPredictionDestinationS3 struct {
Bucket string `json:"bucket"`
Region string `json:"region"`
}

type ProteinConformationPredictionDestination struct {
S3 ProteinConformationPredictionDestinationS3 `json:"s3"`
}

type ProteinConformationPredictionNotifications struct {
SMS []string `json:"sms,omitempty"`
Region string `json:"region"`
}

type ProteinConformationPredictionJob struct {
SearchNodeSelector v1.NodeSelector `json:"searchNodeSelector,omitempty"`
PredictionNodeSelector v1.NodeSelector `json:"predictionNodeSelector,omitempty"`
}

type ProteinConformationPredictionSpec struct {
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Protein ProteinConformationPredictionProtein `json:"protein"`
Model ProteinConformationPredictionModel `json:"model,omitempty"`
Destination ProteinConformationPredictionDestination `json:"destination"`
Notifications ProteinConformationPredictionNotifications `json:"notify,omitempty"`
Job ProteinConformationPredictionJob `json:"job,omitempty"`
Database string `json:"database"`
StorageClass string `json:"storageClass,omitempty"`
}

type ProteinConformationPredictionStatusPhase string

const (
ProteinConformationPredictionStatusPhaseNotStarted ProteinConformationPredictionStatusPhase = "NotStarted"
ProteinConformationPredictionStatusPhaseAligning ProteinConformationPredictionStatusPhase = "Aligning"
ProteinConformationPredictionStatusPhasePredicting ProteinConformationPredictionStatusPhase = "Predicting"
ProteinConformationPredictionStatusPhaseUploadingArtifacts ProteinConformationPredictionStatusPhase = "UploadingArtifacts"
ProteinConformationPredictionStatusPhaseCompleted ProteinConformationPredictionStatusPhase = "Completed"
ProteinConformationPredictionStatusPhaseFailed ProteinConformationPredictionStatusPhase = "Failed"
)

type ProteinConformationPredictionStatus struct {
Phase ProteinConformationPredictionStatusPhase `json:"phase,omitempty"`
SequencePrefix string `json:"sequencePrefix,omitempty"`
Error string `json:"error,omitempty"`
RetryCount int32 `json:"retryCount,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="Sequence",type=string,JSONPath=`.status.sequencePrefix`
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

type ProteinConformationPrediction struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ProteinConformationPredictionSpec `json:"spec,omitempty"`
Status ProteinConformationPredictionStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

type ProteinConformationPredictionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ProteinConformationPrediction `json:"items"`
}

func init() {
SchemeBuilder.Register(&ProteinConformationPrediction{}, &ProteinConformationPredictionList{})
}
Loading