garethr / garethr-kubernetes

Puppet types and provider for managing Pods, ReplicationControllers, Services and more in Kubernetes
http://garethr.github.io/garethr-kubernetes
Apache License 2.0
28 stars 28 forks source link

Invalid parameter stringData(:stringData) #27

Closed olblak closed 7 years ago

olblak commented 7 years ago

Hi, When I try to create k8s secrets with this resource type

kubernetes_secret { 'datadog': ensure => 'present', data => { 'apiKey' => 'base64_encoded_value' }, type => 'Opaque', metadata => { 'name' => 'datadog', },
}

I got this message

Error: Invalid parameter stringData(:stringData) Error: /Stage[main]/Main/Kubernetes_secret[app]/ensure: change from absent to present failed: Invalid parameter stringData(:stringData)

And if I try to convert the source configuraton file. puppet kubernetes convert datadog.yaml --verbose --debug

I got Debug: Runtime environment: puppet_version=4.9.0, ruby_version=2.1.9, run_mode=user, default_encoding=UTF-8 Error: undefined method `each' for nil:NilClass Error: Try 'puppet help kubernetes convert' for usage

masterzen commented 7 years ago

I proposed a fix in this PR garethr/puppet-swagger-generator#9. You'll need to clone this project and generate the Puppet types and providers then overwrites the ones in this repo. Note that this also fixes #28.

olblak commented 7 years ago

Cool, thanks I will have a look

masterzen commented 7 years ago

@olblak the PR has been merged, so you just need to get the latest HEAD of this repository.

garethr commented 7 years ago

Thanks @masterzen