mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 12:16:47 +00:00
Updates from PR comments:
- moved Vagrantfile to contrib dir - gave secret request type more thought Signed-off-by: Andrew Cornies <acornies@gmail.com>
This commit is contained in:
parent
a9238f5631
commit
b49dded3b3
10
Vagrantfile → contrib/Vagrantfile
vendored
10
Vagrantfile → contrib/Vagrantfile
vendored
@ -23,16 +23,16 @@ Vagrant.configure("2") do |config|
|
||||
# within the machine from a port on the host machine. In the example below,
|
||||
# accessing "localhost:8080" will access port 80 on the guest machine.
|
||||
# NOTE: This will enable public access to the opened port
|
||||
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
||||
# config.vm.network "forwarded_port", guest: 8080, host: 8080
|
||||
|
||||
# Create a forwarded port mapping which allows access to a specific port
|
||||
# within the machine from a port on the host machine and only allow access
|
||||
# via 127.0.0.1 to disable public access
|
||||
config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1"
|
||||
# config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1"
|
||||
|
||||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
||||
config.vm.network "private_network", ip: "192.168.50.2"
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
# Bridged networks make the machine appear as another physical device on
|
||||
@ -43,7 +43,7 @@ Vagrant.configure("2") do |config|
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
config.vm.synced_folder "./", "/vagrant"
|
||||
config.vm.synced_folder "../", "/vagrant"
|
||||
|
||||
# Provider-specific configuration so you can fine-tune various
|
||||
# backing providers for Vagrant. These expose provider-specific options.
|
||||
@ -71,7 +71,7 @@ Vagrant.configure("2") do |config|
|
||||
config.vm.provision "docker"
|
||||
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
docker swarm init
|
||||
docker swarm init --advertise-addr 192.168.50.2
|
||||
cd /vagrant
|
||||
sh deploy_stack.sh
|
||||
SHELL
|
@ -91,7 +91,19 @@ type DeleteFunctionRequest struct {
|
||||
FunctionName string `json:"functionName"`
|
||||
}
|
||||
|
||||
// SecretRequest create, update a secret
|
||||
type SecretRequest struct {
|
||||
Secrets *map[string]string `json:"secrets"`
|
||||
// CreateSecretRequest create a secret w/ annotations
|
||||
type CreateSecretRequest struct {
|
||||
Secret Secret `json:"secret"`
|
||||
}
|
||||
|
||||
// DeleteSecretRequest remote a secret by name
|
||||
type DeleteSecretRequest struct {
|
||||
SecretName string `json:"secretName"`
|
||||
}
|
||||
|
||||
// Secret schema use Value only in write-only http verbs
|
||||
type Secret struct {
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"` // write-only
|
||||
Annotations *map[string]string `json:"annotations"`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user