airshipctl/pkg/document/constants.go
Matt McEuen e52ed80363 Update Kustomize integration to api/v0.3.1
This updates the Kustomize dependency for airshipctl to
api/v0.3.1, which is the oldest version which will support the
Replacement Transformer plugin.

Some changes were needed to accomodate the fact that various apis
that airshipctl was relying on were moved to kustomize-insternal
packages, namely:
- Integrated with the krusty.Kustomizer to drive kustomization
- Removed the custom plugin loader which leveraged the Unknown type
- Worked around NoFieldError becoming private, inc. removing a test

As a follow on we'll need to re-integrate plugin functionality somehow.

Also, in this release Kustomize has implemented support for the
"config.kubernetes.io/local-config" annotation, which we'd planned
to use to to avoid deploying some documents to the Kubernetes API.
It turns out the semantics are different than we anticipated;
Kustomize also fails to return these docs via document *selection*.
Therefore, this change reverts to an earlier approach which uses
a custom airshipit.org/deploy-k8s label.

Change-Id: I7022e12464ea7b6a3ca8609f99f3699bf8da0edd
2020-04-13 10:06:41 -05:00

34 lines
1.2 KiB
Go

/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package document
// Label Selectors
const (
BaseAirshipSelector = "airshipit.org"
EphemeralHostSelector = BaseAirshipSelector + "/ephemeral-node in (True, true)"
EphemeralUserDataSelector = BaseAirshipSelector + "/ephemeral-user-data in (True, true)"
InitInfraSelector = BaseAirshipSelector + "/phase = initinfra"
// Please note that by default every document in the manifest is to be deployed to kubernetes cluster.
// so this selector simply checks that deploy-k8s label is not equal to false or False (string)
DeployToK8sSelector = "airshipit.org/deploy-k8s notin (False, false)"
)
// Kinds
const (
SecretKind = "Secret"
BareMetalHostKind = "BareMetalHost"
)