Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docker/Dockerfile-versioned
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG DOCKER_VERSION=VERSION
RUN apt-get -y install \
docker-ce=${DOCKER_VERSION} \
docker-ce-cli=${DOCKER_VERSION} \
docker-compose docker-compose-plugin && \
docker-compose-plugin && \
apt-get clean

ENTRYPOINT ["/usr/bin/docker"]
10 changes: 10 additions & 0 deletions gke-deploy/core/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,16 @@ func ObjectKind(obj *Object) string {
return obj.GetObjectKind().GroupVersionKind().Kind
}

// ObjectGroupVersionKind returns the group/kind format for kubectl commands (e.g., "middleware.traefik.io" or just "pod").
// For resources with a group, returns "kind.group". For core API resources, returns just "kind".
func ObjectGroupVersionKind(obj *Object) string {
gvk := obj.GetObjectKind().GroupVersionKind()
if gvk.Group == "" {
return gvk.Kind
}
return strings.ToLower(gvk.Kind) + "." + gvk.Group
}

// ObjectName returns the name of an object.
func ObjectName(obj *Object) (string, error) {
accessor, err := meta.Accessor(obj)
Expand Down
17 changes: 9 additions & 8 deletions gke-deploy/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,13 @@ func (d *Deployer) Apply(ctx context.Context, clusterName, clusterLocation, clus
}
if !exists {
fmt.Fprintf(os.Stderr, "\nWARNING: It is recommended that namespaces be created by an administrator. Creating namespace %q because it does not exist.\n\n", nsName)
objString, err := resource.EncodeToYAMLString(obj)
if err != nil {
return fmt.Errorf("failed to encode obj to string")
}
if err := cluster.ApplyConfigFromString(ctx, objString, "", d.Clients.Kubectl); err != nil {
return fmt.Errorf("failed to apply Namespace configuration file with name %q to cluster: %v", nsName, err)
}
}
objString, err := resource.EncodeToYAMLString(obj)
if err != nil {
return fmt.Errorf("failed to encode obj to string")
}
if err := cluster.ApplyConfigFromString(ctx, objString, "", d.Clients.Kubectl); err != nil {
return fmt.Errorf("failed to apply Namespace configuration file with name %q to cluster: %v", nsName, err)
}
} else {
// Delete namespace from list of objects to be deployed because it has already been deployed we do not want it to show up in the deployment summary.
Expand Down Expand Up @@ -471,6 +471,7 @@ func (d *Deployer) Apply(ctx context.Context, clusterName, clusterLocation, clus

for _, obj := range objs {
kind := resource.ObjectKind(obj)
gvk := resource.ObjectGroupVersionKind(obj)
name, err := resource.ObjectName(obj)
if err != nil {
return fmt.Errorf("failed to get name of object: %v", err)
Expand All @@ -485,7 +486,7 @@ func (d *Deployer) Apply(ctx context.Context, clusterName, clusterLocation, clus
} else {
objNamespace = namespace
}
deployedObj, err := cluster.GetDeployedObject(ctx, kind, name, objNamespace, d.Clients.Kubectl)
deployedObj, err := cluster.GetDeployedObject(ctx, gvk, name, objNamespace, d.Clients.Kubectl)
if err != nil {
return fmt.Errorf("failed to get configuration of deployed object with kind %q and name %q: %v", kind, name, err)
}
Expand Down
8 changes: 8 additions & 0 deletions go/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Tool builder: `gcr.io/cloud-builders/go`

## ⚠️ DEPRECATED

**This builder is deprecated.** Please migrate to the official [`golang`](https://hub.docker.com/_/golang) image instead.

The `gcr.io/cloud-builders/go` image is no longer actively maintained and does not support current Go versions with security updates. The official `golang` image is actively maintained by the Docker community and provides up-to-date Go tooling and versions.

---

The `gcr.io/cloud-builders/go` image is maintained by the Cloud Build team, but
it may not support the most recent features or versions of Go. We also do not
provide historical pinned versions of Go.
Expand Down
2 changes: 1 addition & 1 deletion mvn/Dockerfile.appengine
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG MAVEN_VERSION=latest
FROM gcr.io/${PROJECT_ID}/mvn:${MAVEN_VERSION}

# install python
RUN apt-get update -y && apt-get install python3 -y
RUN apt-get update -y && apt-get install python3 python -y

# install cloud sdk into appengine-maven-plugin cache
RUN set -eux; \
Expand Down