Project secrets into knative CRD
This commit projects secrets into the Knative CRD YAML, however it appears that the CRD validator for the Service object will now allow multiple volumes to be mounted into the same directory which breaks compatiability with OpenFaaS on Kubernetes. A separate directory is used for each secret with the key so that "aws" will be mounted at /var/openfaas/secrets/aws/name. Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
@@ -25,11 +25,28 @@ type ServingSpecRunLatestConfigurationRevisionTemplate struct {
|
||||
|
||||
type ServingSpecRunLatestConfigurationRevisionTemplateSpec struct {
|
||||
Container ServingSpecRunLatestConfigurationRevisionTemplateSpecContainer `yaml:"container"`
|
||||
Volumes []Volume `yaml:"volumes,omitempty"`
|
||||
}
|
||||
|
||||
type ServingSpecRunLatestConfigurationRevisionTemplateSpecContainer struct {
|
||||
Image string `yaml:"image"`
|
||||
Env []EnvPair `yaml:"env,omitempty"`
|
||||
Image string `yaml:"image"`
|
||||
Env []EnvPair `yaml:"env,omitempty"`
|
||||
VolumeMounts []VolumeMount `yaml:"volumeMounts,omitempty"`
|
||||
}
|
||||
|
||||
type VolumeMount struct {
|
||||
Name string `yaml:"name"`
|
||||
MountPath string `yaml:"mountPath"`
|
||||
ReadOnly bool `yaml:"readOnly"`
|
||||
}
|
||||
|
||||
type Volume struct {
|
||||
Name string `yaml:"name"`
|
||||
Secret Secret `yaml:"secret"`
|
||||
}
|
||||
|
||||
type Secret struct {
|
||||
SecretName string `yaml:"secretName"`
|
||||
}
|
||||
|
||||
type EnvPair struct {
|
||||
|
||||
Reference in New Issue
Block a user