Skip to content

Commit

Permalink
Introduce inclusive naming check and update existing language (#641)
Browse files Browse the repository at this point in the history
We are following the Inclusive Naming Initiative's guidance as that is what the
CNCF supports.
  • Loading branch information
aaronshurley authored Nov 21, 2022
1 parent 25403bf commit 122eb75
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 18 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/inclusive-language-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Check inclusive language

on:
pull_request:
types: ['opened', 'reopened']

jobs:
check-inclusive-language:
uses: vmware-tanzu/carvel-release-scripts/.github/workflows/inclusive-language-check.yml@main
3 changes: 3 additions & 0 deletions .wokeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# out of our control
vendor/
examples/resource-ordering/README.md
4 changes: 2 additions & 2 deletions examples/cf-for-k8s-v0.2.0-custom/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10777,7 +10777,7 @@ data:
require_client_certificate: true


# Manual 'whitebox' mode
# Manual 'open-box' mode
- name: "local.15019"
address:
socket_address:
Expand Down Expand Up @@ -14144,7 +14144,7 @@ data:
url: https://uaa.cf.cppforlife.io/authenticate
limitedFunctionality:
enabled: false
whitelist:
whitelist: # wokeignore:rule=whitelist
endpoints:
- /oauth/authorize/**
- /oauth/token/**
Expand Down
2 changes: 1 addition & 1 deletion examples/gitops/guestbook/all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
spec:
containers:
- name: replica
image: gcr.io/google_samples/gb-redisslave:v1
image: gcr.io/google_samples/gb-redisslave:v1 # wokeignore:rule=slave
resources:
requests:
cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion examples/istio-v1.4.0/istio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7283,7 +7283,7 @@ data:
filename: /etc/certs/key.pem
# Manual 'whitebox' mode
# Manual 'open-box' mode
- name: "local.15019"
address:
socket_address:
Expand Down
2 changes: 1 addition & 1 deletion pkg/kapp/clusterapply/applying_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (c *ApplyingChanges) Apply(allChanges []*ctldgraph.Change) ([]WaitingChange
}

func (c *ApplyingChanges) Complete() error {
// Sanity check that we applied all changes
// Confidence check that we applied all changes
if c.numTotal != c.numApplied() {
return fmt.Errorf("Internal inconsistency: did not apply all changes: %d != %d",
c.numTotal, c.numApplied())
Expand Down
6 changes: 3 additions & 3 deletions pkg/kapp/diffgraph/assets/cf-for-k8s.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was generated from github.com/cloudfoundry/cf-for-k8s@bb1b88a0c22eb265378258b0f0a65eead00b94de
# with bunch of dummy secrets. It's used as a complex test fixture for testing ordering.
# with bunch of placeholder secrets. It's used as a complex test fixture for testing ordering.

apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -10484,7 +10484,7 @@ data:
require_client_certificate: true


# Manual 'whitebox' mode
# Manual 'open-box' mode
- name: "local.15019"
address:
socket_address:
Expand Down Expand Up @@ -13851,7 +13851,7 @@ data:
url: https://uaa.cf.cppforlife.io/authenticate
limitedFunctionality:
enabled: false
whitelist:
whitelist: # wokeignore:rule=whitelist
endpoints:
- /oauth/authorize/**
- /oauth/token/**
Expand Down
20 changes: 10 additions & 10 deletions test/e2e/ignore_failing_api_services_flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ func TestIgnoreFailingAPIServices(t *testing.T) {
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1.dummykapptest.com
name: v1.samplekapptest.com
annotations:
kapp.k14s.io/disable-default-change-group-and-rules: ""
kapp.k14s.io/change-group: "apiservice"
spec:
group: dummykapptest.com
group: samplekapptest.com
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
service:
Expand All @@ -38,12 +38,12 @@ spec:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: foo.dummykapptest.com
name: foo.samplekapptest.com
annotations:
kapp.k14s.io/disable-default-change-group-and-rules: ""
kapp.k14s.io/change-rule: "upsert after upserting apiservice"
spec:
group: dummykapptest.com
group: samplekapptest.com
versions:
- name: v1
served: true
Expand Down Expand Up @@ -77,7 +77,7 @@ metadata:

yaml3 := `
---
apiVersion: dummykapptest.com/v1
apiVersion: samplekapptest.com/v1
kind: Foo
metadata:
name: test-uses-failing-api-service
Expand Down Expand Up @@ -129,7 +129,7 @@ metadata:
AllowError: true, IntoNs: true, StdinReader: strings.NewReader(yaml3)})
require.Errorf(t, err, "Expected error when deploying with failing api service")

require.Contains(t, err.Error(), "unable to retrieve the complete list of server APIs: dummykapptest.com/v1: the server is currently unable to handle the request",
require.Contains(t, err.Error(), "unable to retrieve the complete list of server APIs: samplekapptest.com/v1: the server is currently unable to handle the request",
"Expected api retrieval error")
})

Expand All @@ -140,7 +140,7 @@ metadata:
AllowError: true, IntoNs: true, StdinReader: strings.NewReader(yaml3)})
require.Errorf(t, err, "Expected error when deploying with failing api service")

require.Contains(t, err.Error(), "Expected to find kind 'dummykapptest.com/v1/Foo', but did not", "Expected CRD retrieval error")
require.Contains(t, err.Error(), "Expected to find kind 'samplekapptest.com/v1/Foo', but did not", "Expected CRD retrieval error")
})

logger.Section("delete app that does not use api service", func() {
Expand All @@ -162,9 +162,9 @@ func TestIgnoreFailingGroupVersion(t *testing.T) {
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: foo.dummykapptest.com
name: foo.samplekapptest.com
spec:
group: dummykapptest.com
group: samplekapptest.com
versions:
# v1 is available and used for internal storage
- name: v1
Expand Down Expand Up @@ -225,7 +225,7 @@ metadata:

yaml3 := `
---
apiVersion: dummykapptest.com/v2
apiVersion: samplekapptest.com/v2
kind: Foo
metadata:
name: test-uses-failing-group-version
Expand Down

0 comments on commit 122eb75

Please sign in to comment.