Net::Kubernetes::Role::ResourceCreator - Role to allow creation of resources from either objects or files.
version 0.15
Creates a new Net::Kubernetes::Resource (subtype determined by $BNJECT->{kind})
Create from file is really just a short cut around something like:
my $object = YAML::LoadFile(PATH_TO_FILE); $kube->create($object);
Builds a Kubernetes secret object with $name. $data is a hash reference whose keys will be keys int the created secret.
The value for each key should be either a filename (which will be slurped into the secret), or a hashref with the keys "type" and "value".
Valid types are "JSON", "YAML" or "String" (anything other that "JSON" or "YAML") will be assumed to be of type "String". If either "JSON" or "YAML" the "value" will be serialized out before placing in the secret.
Note that the keys must be valid DNS subdomains (underscore is not allowed) and must be lowercase.
my ($new_secret) = $kube->build_secret('donttell', { ssh-public-key => '/home/dave/.ssh/id_rsa.pub', super-secret-data => { type => 'JSON', value => { username => 'Dave', password => 'Imnottelling' }, } });
Dave Mueller <dave@perljedi.com>
This software is Copyright (c) 2015 by Dave Mueller.
This is free software, licensed under:
The MIT (X11) License
Please see those modules/websites for more information related to this module.
Net::Kubernetes
Net::Kubernetes::Role::ResourceFactory
To install Net::Kubernetes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Kubernetes
CPAN shell
perl -MCPAN -e shell install Net::Kubernetes
For more information on module installation, please visit the detailed CPAN module installation guide.