Skip to content

Commit

Permalink
omitempty the containers field in v2 api (#86)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
  • Loading branch information
ArnobKumarSaha authored Dec 7, 2023
1 parent d292645 commit 891779a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ on:
push:
branches:
- master

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:

jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:

- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: '1.20'
go-version: '1.21'
id: go

- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
BASEIMAGE_PROD ?= gcr.io/distroless/static-debian11
BASEIMAGE_DBG ?= debian:bullseye

GO_VERSION ?= 1.20
GO_VERSION ?= 1.21
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)

OUTBIN = bin/$(OS)_$(ARCH)/$(BIN)
Expand Down
3 changes: 1 addition & 2 deletions api/v2/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions api/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ type PodSpec struct {
// +patchMergeKey=name
// +patchStrategy=merge
InitContainers []core.Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// List of containers belonging to the pod.
// List of sidecar containers belonging to the pod.
// Containers cannot currently be added or removed.
// There must be at least one container in a Pod.
// Cannot be updated.
// +patchMergeKey=name
// +patchStrategy=merge
Containers []core.Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
Containers []core.Container `json:"containers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing
// pod to perform user-initiated actions such as debugging. This list cannot be specified when
// creating a pod, and it cannot be modified by updating the pod spec. In order to add an
Expand Down

0 comments on commit 891779a

Please sign in to comment.