Skip to content

Commit

Permalink
Merge pull request #2539 from FabianKramm/main
Browse files Browse the repository at this point in the history
feat: add localRegistry.buildKitImage
  • Loading branch information
FabianKramm committed Feb 9, 2023
2 parents 361607c + 3d830c3 commit bb0474b
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 12 deletions.
12 changes: 12 additions & 0 deletions devspace-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,10 @@
"type": "string",
"description": "ServiceAccount the service account to use for the kaniko pod"
},
"generateName": {
"type": "string",
"description": "GenerateName is the optional prefix that will be set to the generateName field of the build pod"
},
"annotations": {
"patternProperties": {
".*": {
Expand Down Expand Up @@ -1178,6 +1182,10 @@
"type": "string",
"description": "KubectlBinaryPath is the optional path where to find the kubectl binary"
},
"inlineManifest": {
"type": "string",
"description": "InlineManists is a block containing the manifest to deploy"
},
"kustomize": {
"type": "boolean",
"description": "Kustomize can be used to enable kustomize instead of kubectl",
Expand Down Expand Up @@ -1219,6 +1227,10 @@
"type": "string",
"description": "Image of the local registry. Default is `registry:2.8.1`"
},
"buildKitImage": {
"type": "string",
"description": "BuildKitImage of the buildkit sidecar. Default is `moby/buildkit:master-rootless`"
},
"port": {
"type": "integer",
"description": "Port that the registry image listens on. Default is `5000`"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

### `disabled` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">boolean</span> <span className="config-field-default">false</span> <span className="config-field-enum"></span> {#dependencies-disabled}

Disabled excludes this dependency from variable resolution and pipeline runs

</summary>



</details>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import PartialVars from "./vars.mdx"
import PartialOverwriteVars from "./overwriteVars.mdx"
import PartialIgnoreDependencies from "./ignoreDependencies.mdx"
import PartialNamespace from "./namespace.mdx"
import PartialProfiles from "./profiles.mdx"

<div className="group" data-group="execution">
<div className="group-name">Execution</div>
Expand All @@ -14,6 +13,5 @@ import PartialProfiles from "./profiles.mdx"
<PartialOverwriteVars />
<PartialIgnoreDependencies />
<PartialNamespace />
<PartialProfiles />

</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

import PartialDisabled from "./dependencies/disabled.mdx"
import PartialGrouppath from "./dependencies/group_path.mdx"
import PartialGroupgit from "./dependencies/group_git.mdx"
import PartialGroupexecution from "./dependencies/group_execution.mdx"

<PartialDisabled />


<PartialGrouppath />


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

#### `inlineManifest` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#deployments-kubectl-inlineManifest}

InlineManifests is a block containing the manifest to deploy

</summary>



</details>
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@

import PartialManifests from "./kubectl/manifests.mdx"
import PartialInlineManifests from "./kubectl/inline_manifests.mdx"
import PartialApplyArgs from "./kubectl/applyArgs.mdx"
import PartialCreateArgs from "./kubectl/createArgs.mdx"
import PartialKubectlBinaryPath from "./kubectl/kubectlBinaryPath.mdx"
import PartialInlineManifest from "./kubectl/inlineManifest.mdx"
import PartialGroupkustomize from "./kubectl/group_kustomize.mdx"

<PartialManifests />


<PartialInlineManifests />


<PartialApplyArgs />


Expand All @@ -21,4 +18,7 @@ import PartialGroupkustomize from "./kubectl/group_kustomize.mdx"
<PartialKubectlBinaryPath />


<PartialInlineManifest />


<PartialGroupkustomize />
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#### `generateName` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#images-kaniko-generateName}

GenerateName will be used as the generateName field of the build pod
GenerateName is the optional prefix that will be set to the generateName field of the build pod

</summary>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

### `buildKitImage` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#localRegistry-buildKitImage}

BuildKitImage of the buildkit sidecar. Default is `moby/buildkit:master-rootless`

</summary>



</details>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PartialEnabled from "./localRegistry/enabled.mdx"
import PartialNamespace from "./localRegistry/namespace.mdx"
import PartialName from "./localRegistry/name.mdx"
import PartialImage from "./localRegistry/image.mdx"
import PartialBuildKitImage from "./localRegistry/buildKitImage.mdx"
import PartialPort from "./localRegistry/port.mdx"
import PartialPersistencereference from "./localRegistry/persistence_reference.mdx"

Expand All @@ -18,6 +19,9 @@ import PartialPersistencereference from "./localRegistry/persistence_reference.m
<PartialImage />


<PartialBuildKitImage />


<PartialPort />


Expand Down
16 changes: 12 additions & 4 deletions docs/schemas/config-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,10 @@
"type": "string",
"description": "ServiceAccount the service account to use for the kaniko pod"
},
"generateName": {
"type": "string",
"description": "GenerateName is the optional prefix that will be set to the generateName field of the build pod"
},
"annotations": {
"patternProperties": {
".*": {
Expand Down Expand Up @@ -1168,10 +1172,6 @@
"type": "array",
"description": "Manifests is a list of files or folders that will be deployed by DevSpace using kubectl\nor kustomize"
},
"inlineManifest": {
"type": "string",
"description": "InlineManifest is a block containing the yaml that will be deployed by DevSpace using kubectl"
},
"applyArgs": {
"items": {
"type": "string"
Expand All @@ -1190,6 +1190,10 @@
"type": "string",
"description": "KubectlBinaryPath is the optional path where to find the kubectl binary"
},
"inlineManifest": {
"type": "string",
"description": "InlineManists is a block containing the manifest to deploy"
},
"kustomize": {
"type": "boolean",
"description": "Kustomize can be used to enable kustomize instead of kubectl",
Expand Down Expand Up @@ -1231,6 +1235,10 @@
"type": "string",
"description": "Image of the local registry. Default is `registry:2.8.1`"
},
"buildKitImage": {
"type": "string",
"description": "BuildKitImage of the buildkit sidecar. Default is `moby/buildkit:master-rootless`"
},
"port": {
"type": "integer",
"description": "Port that the registry image listens on. Default is `5000`"
Expand Down
9 changes: 9 additions & 0 deletions pkg/devspace/build/localregistry/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ func (o Options) WithImage(image string) Options {
return newOptions
}

func (o Options) WithBuildKitImage(image string) Options {
newOptions := o
if image != "" {
newOptions.BuildKitImage = image
}
return newOptions
}

func (o Options) WithPort(port *int) Options {
newOptions := o
if port != nil {
Expand Down Expand Up @@ -103,6 +111,7 @@ func (o Options) WithLocalRegistryConfig(config *latest.LocalRegistryConfig) Opt
WithName(config.Name).
WithNamespace(config.Namespace).
WithImage(config.Image).
WithBuildKitImage(config.BuildKitImage).
WithPort(config.Port)

if config.Persistence != nil && config.Persistence.Enabled != nil && *config.Persistence.Enabled {
Expand Down
5 changes: 4 additions & 1 deletion pkg/devspace/config/versions/latest/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ type LocalRegistryConfig struct {
// Image of the local registry. Default is `registry:2.8.1`
Image string `yaml:"image,omitempty" json:"image,omitempty"`

// BuildKitImage of the buildkit sidecar. Default is `moby/buildkit:master-rootless`
BuildKitImage string `yaml:"buildKitImage,omitempty" json:"buildKitImage,omitempty"`

// Port that the registry image listens on. Default is `5000`
Port *int `yaml:"port,omitempty" json:"port,omitempty"`

Expand Down Expand Up @@ -868,7 +871,7 @@ type KubectlConfig struct {
// KubectlBinaryPath is the optional path where to find the kubectl binary
KubectlBinaryPath string `yaml:"kubectlBinaryPath,omitempty" json:"kubectlBinaryPath,omitempty"`

// InlineManists is a block containing the manifest to deploy
// InlineManifests is a block containing the manifest to deploy
InlineManifest string `yaml:"inlineManifest,omitempty" json:"inlineManifest,omitempty"`
// Kustomize can be used to enable kustomize instead of kubectl
Kustomize *bool `yaml:"kustomize,omitempty" json:"kustomize,omitempty" jsonschema_extras:"group=kustomize,group_name=Kustomize"`
Expand Down

0 comments on commit bb0474b

Please sign in to comment.