Skip to content
Merged
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 src/services/gcp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN dep ensure
RUN ./tmp/build/build.sh

FROM alpine:3.7
ENV CLOUD_SDK_VERSION 330.0.0
ENV CLOUD_SDK_VERSION 408.0.0

ENV PATH /google-cloud-sdk/bin:$PATH

Expand Down
4 changes: 3 additions & 1 deletion src/services/gcp/infrabox-service-gcp/templates/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: gkeclusters.gcp.service.infrabox.net
spec:
group: gcp.service.infrabox.net
versions:
versions:
- name: v1alpha1
served: true
storage: true
Expand Down Expand Up @@ -50,6 +50,8 @@ spec:
type: string
clusterCidr:
type: string
enableManagedPrometheus:
type: boolean
status:
x-kubernetes-preserve-unknown-fields: true
names:
Expand Down
1 change: 1 addition & 0 deletions src/services/gcp/pkg/apis/gcp/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type GKEClusterSpec struct {
Zone string `json:"zone"`
ServiceCidr string `json:"serviceCidr,omitempty"`
ClusterCidr string `json:"clusterCidr,omitempty"`
EnableManagedPrometheus bool `json:"enableManagedPrometheus,omitempty"`
}

type GKEClusterStatus struct {
Expand Down
5 changes: 4 additions & 1 deletion src/services/gcp/pkg/stub/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ func createCluster(cr *v1alpha1.GKECluster, log *logrus.Entry) (*v1alpha1.GKEClu
args = append(args, "--enable-private-nodes")
args = append(args, "--master-ipv4-cidr", finalCIDR)
args = append(args, "--enable-master-authorized-networks")
if !cr.Spec.EnableManagedPrometheus {
args = append(args, "--no-enable-managed-prometheus")
}
master_authorized_networks := os.Getenv("ALLOW_IPS")
if master_authorized_networks == "" {
master_authorized_networks = "0.0.0.0/0"
Expand Down Expand Up @@ -1241,7 +1244,7 @@ func updateClusterFirewall(cluster *RemoteCluster, log *logrus.Entry) error {
err = fmt.Errorf("failed to update firewall rule for cluster %s: %v", cluster.Name, err)
log.Error(err)
return err
}
}
return nil
}
log.Warningf("MasterIpv4CidrBlock fetching failed for cluster %s", cluster.Name)
Expand Down