Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #175 from IBM/dev
Browse files Browse the repository at this point in the history
Merge dev to master for GA 1.1.0
  • Loading branch information
shay-berman authored Mar 25, 2018
2 parents 541e095 + e34c7d4 commit 666f817
Show file tree
Hide file tree
Showing 22 changed files with 11,244 additions and 5,109 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.Flex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ RUN glide up --strip-vendor
RUN CGO_ENABLED=1 GOOS=linux go build -tags netgo -v -a --ldflags '-w -linkmode external -extldflags "-static"' -installsuffix cgo -o ubiquity-k8s-flex cmd/flex/main/cli.go


FROM alpine:latest
RUN apk --no-cache add ca-certificates
FROM alpine:3.7
RUN apk --no-cache add ca-certificates=20171114-r0
RUN apk --update add logrotate
ENV UBIQUITY_PLUGIN_VERIFY_CA=/var/lib/ubiquity/ssl/public/ubiquity-trusted-ca.crt
WORKDIR /root/
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.Provisioner
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ RUN glide up --strip-vendor
RUN CGO_ENABLED=1 GOOS=linux go build -tags netgo -v -a --ldflags '-w -linkmode external -extldflags "-static"' -installsuffix cgo -o ubiquity-k8s-provisioner cmd/provisioner/main/main.go


FROM alpine:latest
RUN apk --no-cache add ca-certificates
FROM alpine:3.7
RUN apk --no-cache add ca-certificates=20171114-r0
ENV UBIQUITY_PLUGIN_VERIFY_CA=/var/lib/ubiquity/ssl/public/ubiquity-trusted-ca.crt
WORKDIR /root/
COPY --from=0 /go/src/github.com/IBM/ubiquity-k8s/ubiquity-k8s-provisioner .
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Ubiquity Kubernetes Persistent Storage
[![Build Status](https://travis-ci.org/IBM/ubiquity-k8s.svg?branch=master)](https://travis-ci.org/IBM/ubiquity-k8s)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/IBM/ubiquity-k8s)](https://goreportcard.com/report/github.com/IBM/ubiquity-k8s)

This project includes components for managing [Kubernetes persistent storage](https://kubernetes.io/docs/concepts/storage/persistent-volumes), using [Ubiquity](https://github.com/IBM/ubiquity) service.
- Ubiquity Dynamic Provisioner for creating and deleting persistent volumes
- Ubiquity FlexVolume Driver CLI for attaching and detaching persistent volumes

Currently, the following storage systems use Ubiquity:
* IBM block storage.

The IBM block storage is supported for Kubernetes via IBM Spectrum Control Base Edition (SCBE) version 3.3.0 and later. Ubiquity communicates with the IBM storage systems through SCBE. SCBE creates a storage profile (for example, gold, silver or bronze) and makes it available for Kubernetes. For details about supported storage systems, refer to the latest SCBE release notes.
The IBM block storage is supported for Kubernetes via IBM Spectrum Connect (3.4.0), previously known as IBM Spectrum Control Base Edition (3.3.0). Ubiquity communicates with the IBM storage systems through Spectrum Connect. Spectrum Connect creates a storage profile (for example, gold, silver or bronze) and makes it available for Kubernetes. For details about supported storage systems, refer to the latest Spectrum Connect release notes.

The IBM official solution for Kubernetes, based on the Ubiquity project, is referred to as IBM Storage Enabler for Containers. You can download the installation package and its documentation from [IBM Fix Central](https://www-945.ibm.com/support/fixcentral/swg/selectFixes?parent=Software%2Bdefined%2Bstorage&product=ibm/StorageSoftware/IBM+Spectrum+Control&release=All&platform=Linux&function=all). For details on the IBM Storage Enabler for Containers, see the relevant sections in the SCBE user guide.
The IBM official solution for Kubernetes, based on the Ubiquity project, is referred to as IBM Storage Enabler for Containers. You can download the installation package and its documentation from [IBM Fix Central](https://www.ibm.com/support/fixcentral/swg/selectFixes?parent=Software%2Bdefined%2Bstorage&product=ibm/StorageSoftware/IBM+Spectrum+Connect&release=All&platform=Linux&function=all). For details on the IBM Storage Enabler for Containers, see the relevant sections in the Spectrum Connect user guide.

* IBM Spectrum Scale, for testing only.

Expand Down
37 changes: 4 additions & 33 deletions cmd/flex/main/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,40 +71,11 @@ type GetVolumeNameCommand struct {
}

func (g *GetVolumeNameCommand) Execute(args []string) error {
if len(args) < 1 {

response := k8sresources.FlexVolumeResponse{
Status: "Failure",
Message: fmt.Sprintf("Not enough arguments to getVolumeName call out"),
}
return printResponse(response)
}
getVolumeNameRequestOpts := make(map[string]string)
err := json.Unmarshal([]byte(args[0]), &getVolumeNameRequestOpts)
if err != nil {
response := k8sresources.FlexVolumeResponse{
Status: "Failure",
Message: fmt.Sprintf("Failed to read args in get volumeName %#v", err),
}
return printResponse(response)
}
config, err := readConfig(*configFile)
if err != nil {
response := k8sresources.FlexVolumeResponse{
Status: "Failure",
Message: fmt.Sprintf("Failed to read config in get volumeName %#v", err),
}
return printResponse(response)
}
defer logs.InitFileLogger(logs.GetLogLevelFromString(config.LogLevel), path.Join(config.LogPath, k8sresources.UbiquityFlexLogFileName))()
controller, err := createController(config)

if err != nil {
panic(fmt.Sprintf("backend %s not found", config))
// This GetVolumeName action in FlexVolume CLI is not relevant, we can just return not supported without logging anything.
response := k8sresources.FlexVolumeResponse{
Status: "Not supported",
}
getVolumeNameRequest := k8sresources.FlexVolumeGetVolumeNameRequest{Opts: getVolumeNameRequestOpts}
getVolumeNameResponse := controller.GetVolumeName(getVolumeNameRequest)
return printResponse(getVolumeNameResponse)
return printResponse(response)
}

//AttachCommand attaches a volume to a node
Expand Down
Loading

0 comments on commit 666f817

Please sign in to comment.