Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added warning after PVC creation #519

Merged
merged 1 commit into from
Apr 18, 2017
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
7 changes: 5 additions & 2 deletions pkg/transformer/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ type Kubernetes struct {
// used when undeploying resources from kubernetes
const TIMEOUT = 300

//default size of Persistent Volume Claim
const PVCRequestSize = "100Mi"

// list of all unsupported keys for this transformer
// Keys are names of variables in kobject struct.
// this is map to make searching for keys easier
Expand Down Expand Up @@ -242,7 +245,7 @@ func (k *Kubernetes) initIngress(name string, service kobject.ServiceConfig, por

// CreatePVC initializes PersistentVolumeClaim
func (k *Kubernetes) CreatePVC(name string, mode string) (*api.PersistentVolumeClaim, error) {
size, err := resource.ParseQuantity("100Mi")
size, err := resource.ParseQuantity(PVCRequestSize)
if err != nil {
return nil, errors.Wrap(err, "resource.ParseQuantity failed, Error parsing size")
}
Expand Down Expand Up @@ -671,7 +674,7 @@ func (k *Kubernetes) Deploy(komposeObject kobject.KomposeObject, opt kobject.Con
if err != nil {
return err
}
log.Infof("Successfully created PersistentVolumeClaim: %s", t.Name)
log.Infof("Successfully created PersistentVolumeClaim: %s of size %s. If your cluster has dynamic storage provisioning, you don't have to do anything. Otherwise you have to create PersistentVolume to make PVC work", t.Name, PVCRequestSize)
case *extensions.Ingress:
_, err := client.Ingress(namespace).Create(t)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/transformer/openshift/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func (o *OpenShift) Deploy(komposeObject kobject.KomposeObject, opt kobject.Conv
if err != nil {
return err
}
log.Infof("Successfully created PersistentVolumeClaim: %s", t.Name)
log.Infof("Successfully created PersistentVolumeClaim: %s of size %s. If your cluster has dynamic storage provisioning, you don't have to do anything. Otherwise you have to create PersistentVolume to make PVC work", t.Name, kubernetes.PVCRequestSize)
case *routeapi.Route:
_, err := oclient.Routes(namespace).Create(t)
if err != nil {
Expand Down