Skip to content

feat: k8s support#18

Open
vgpopov wants to merge 6 commits intomainfrom
MILAB-5082-k8s-support
Open

feat: k8s support#18
vgpopov wants to merge 6 commits intomainfrom
MILAB-5082-k8s-support

Conversation

@vgpopov
Copy link
Copy Markdown
Collaborator

@vgpopov vgpopov commented Jan 12, 2026

No description provided.

@notion-workspace
Copy link
Copy Markdown

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @vgpopov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Helm chart for platforma by introducing native Kubernetes support for managing shared storage, particularly for work and packages directories. It refactors the persistence configuration to be more generic and less coupled to Google Batch, enabling broader Kubernetes deployments. The changes involve updating Helm templates, schema definitions, and default values to support this new architecture, ensuring a more flexible and Kubernetes-idiomatic approach to persistent storage.

Highlights

  • Refactored Persistence Configuration: Decoupled shared storage for work and packages directories from Google Batch-specific settings, moving to a more generic persistence.workDir configuration within the Helm chart.
  • Introduced Kubernetes-Specific Arguments: Added new command-line arguments (--k8s-pvc-name, --k8s-work-dir-name, --k8s-storage-location) to the main application container, enabling Kubernetes-native handling of persistent volumes.
  • Consolidated PVC Management: Replaced the pvc-google-batch.yaml template with a new pvc-workstorage.yaml template, centralizing the creation of PersistentVolumeClaims for shared work directories under the persistence.workDir configuration.
  • Updated Helm Chart Schema and Defaults: Modified values.schema.json and values.yaml to reflect the new persistence.workDir structure, remove googleBatch.volumes, and introduce a new k8s.enabled flag for Kubernetes-specific features.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Kubernetes support by refactoring how persistent volumes, especially for work and packages directories, are managed. It removes Google Batch-specific volume configurations and introduces a more generalized approach using persistence.workDir for shared storage. The changes include updates to Helm templates, values, and the schema definition. However, there are critical syntax errors in the newly added pvc-workstorage.yaml that need immediate attention, and an inconsistency in the docker schema definition.

Comment on lines 292 to +295
{{- if .Values.docker.enabled }}
{{- $dockerResources := fromYaml (include "platforma.dockerResources" .) }}
- "--runner-enable-docker"
- "--runner-local-cpu={{ include "platforma.parseCpuToWholeCpus" $dockerResources.limits.cpu }}"
- "--runner-local-ram={{ $dockerResources.limits.memory }}"
{{- end }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The --runner-local-cpu and --runner-local-ram arguments are no longer being passed when docker.enabled is true. This removes the ability to configure CPU and RAM limits for the Docker runner via these arguments. Please confirm if this removal is intentional, or if these parameters are now configured through a different mechanism for Kubernetes support.

Comment on lines 12 to +18
"s3": {
"type": "object",
"additionalProperties": true,
"properties": {
"enabled": { "type": "boolean" }
"enabled": {
"type": "boolean"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The docker section has been removed from the values.schema.json. However, the docker configuration is still present in values.yaml and used in deployment-docker.yaml. Removing it from the schema will prevent proper validation of docker related values. Please ensure that the docker schema is retained if these values are still intended to be configurable.

Comment on lines 79 to 82
{{- if .Values.persistence.packagesDir.enabled -}}
{{- $_ := set $allPvcs "packages" .Values.persistence.packagesDir -}}
{{- end -}}
{{- end -}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The packagesDir configuration was removed from this block, implying it's now handled as a subdirectory of workDir. While this is reflected in deployment.yaml, the comment on line 70 only mentions workDir being handled separately. Consider updating the comment to clarify that packagesDir is also now managed as part of workDir's shared storage, or explicitly state its new handling.

For example, you could update the comment to: "Note: workDir and packagesDir are handled separately in deployment.yaml as they use shared NFS storage."

Copy link
Copy Markdown
Member

@mike-ainsel mike-ainsel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# If your app needs to run as non-root
deployment:
  podSecurityContext:
    runAsUser: 1000
    runAsGroup: 1000
    fsGroup: 1000  # Won't affect Filestore, but good for other volumes

# Then on Filestore, ensure files are owned by UID 1000
# or use a Job/initContainer to fix permissions 

If you need to change ownership on Filestore, use an init container running as root:

initContainers:
  - name: fix-permissions
    image: busybox
    command: ['sh', '-c', 'chown -R 1000:1000 /data']
    securityContext:
      runAsUser: 0  # Run as root to change ownership
    volumeMounts:
      - name: filestore-volume
        mountPath: /data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants