parents option is optional and expects the names of other profiles which should be applied before this profile.
The profiles are applied in the order they are specified. It is also possible to apply profiles from distant
The kind of profile inheritance that the
parents option provides can help to reduce redundancy when multiple profiles need to change the config in a similar way.
A parent profile is applied before the profile that defines the parent. A parent profile can have parents of its own.
Example: Defining a Parent Profile
production profile is active, the
patches statements configured in
staging would be applied first because of the
parents statement in line 16. After applying the
staging profile, DevSpace would additionally apply the currently active
production profile. In this example, the
production profile is based on the
staging profile and the only difference is that the
production profile adds another container to the
backend deployment which is using the image
Example: Defining multiple Parent Profiles
It is also possible to load a profile from a different source with the option
profiles.*.parents.*.source that can define profiles that lie in a different
Example: Define a profile from a different devspace.yaml
source the same options can be specified as for loading dependencies.
Apply Multiple Profiles with Flags
It is possible to apply multiple profiles in a single command with the
--profile-parent flag. This flag can take one or multiple profiles that will be applied before the actual profile in the order that they are specified.
--profile flag is given the last specfied
--profile-parent will be last profile that is applied to the configuration.