mirror of
				https://github.com/docker/compose.git
				synced 2025-11-03 21:25:21 +01:00 
			
		
		
		
	Remove inline secrets option
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
		
							parent
							
								
									5efebd43c1
								
							
						
					
					
						commit
						4d6a0bb00d
					
				@ -49,7 +49,6 @@ const (
 | 
				
			|||||||
	volumeDriveroptsShareNameKey   = "share_name"
 | 
						volumeDriveroptsShareNameKey   = "share_name"
 | 
				
			||||||
	volumeDriveroptsAccountNameKey = "storage_account_name"
 | 
						volumeDriveroptsAccountNameKey = "storage_account_name"
 | 
				
			||||||
	volumeReadOnly                 = "read_only"
 | 
						volumeReadOnly                 = "read_only"
 | 
				
			||||||
	secretInlineMark               = "inline:"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ToContainerGroup converts a compose project into a ACI container group
 | 
					// ToContainerGroup converts a compose project into a ACI container group
 | 
				
			||||||
@ -190,16 +189,10 @@ type projectAciHelper types.Project
 | 
				
			|||||||
func (p projectAciHelper) getAciSecretVolumes() ([]containerinstance.Volume, error) {
 | 
					func (p projectAciHelper) getAciSecretVolumes() ([]containerinstance.Volume, error) {
 | 
				
			||||||
	var secretVolumes []containerinstance.Volume
 | 
						var secretVolumes []containerinstance.Volume
 | 
				
			||||||
	for secretName, filepathToRead := range p.Secrets {
 | 
						for secretName, filepathToRead := range p.Secrets {
 | 
				
			||||||
		var data []byte
 | 
							data, err := ioutil.ReadFile(filepathToRead.File)
 | 
				
			||||||
		if strings.HasPrefix(filepathToRead.File, secretInlineMark) {
 | 
					 | 
				
			||||||
			data = []byte(filepathToRead.File[len(secretInlineMark):])
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			var err error
 | 
					 | 
				
			||||||
			data, err = ioutil.ReadFile(filepathToRead.File)
 | 
					 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return secretVolumes, err
 | 
								return secretVolumes, err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		if len(data) == 0 {
 | 
							if len(data) == 0 {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user