Skip to content

Update proto definitions to include image_pull_secrets

Safwan Ahmed requested to merge saf-add-private-registry-config-support into master

Issue: Agent: Add config to support for private contai... (gitlab-org/gitlab#474987 - closed)

What does this MR do and why?

This MR adds support for image_pull_secrets in the remote_development agent config. It does this to allow workspaces to be able to access cluster secrets that are required to pull images from private repositories.

Testing steps

I exploratory tested by:

  • Running my branch version of KAS and the agent
  • modifying the remote-development config to include the new definitions and update a used field like max_hours_before_termination_limit like so:
remote_development:
  enabled: true
  dns_zone: workspaces.localdev.me
  default_max_hours_before_termination: 94
  max_hours_before_termination_limit: 400 #changed this from 100 -> 400
  network_policy:
    enabled: true
    # if your GDK is configured on a public IP, you don't need to set the `egress` key in this section.
    egress:
    - allow: '0.0.0.0/0'
      except:
      - '10.0.0.0/8'
      - '172.16.0.0/12'
      - '192.168.0.0/16'
    # if your GDK is configured on a different private IP, use that in the line below.
    - allow: '172.16.123.1/32'
  image_pull_secrets: # included this
    - name: example-image-pull-secrets
      namespace: default
    - name: example-image-pull-secrets-two
      namespace: default-two

# for debugging locally to increase log verbosity
observability:
  logging:
    level: debug
    grpc_level: warn
  • I then checked the active record model in rails for the remote_development_agent_config above. Result of updating the config above: value did indeed change from 100 -> 400 (it makes sense that image_pull_secrets is not in the DB yet as we have not added support to persist that field on the rails side yet)
Edited by Safwan Ahmed

Merge request reports

Loading