Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lib): names generated using non-FIPS compliant algorithm #392

Merged
merged 20 commits into from Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/java/hello/package.json
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"cdk8s-cli": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/java/web-service/package.json
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"cdk8s-cli": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/python/crd/package.json
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"cdk8s-cli": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/python/hello/package.json
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"cdk8s-cli": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/python/web-service/package.json
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"cdk8s-cli": "0.0.0"
Expand Down
Expand Up @@ -6,7 +6,7 @@ Array [
"apiVersion": "elasticsearch.k8s.elastic.co/v1",
"kind": "Elasticsearch",
"metadata": Object {
"name": "test-chart-elasticsearch-5921e846",
"name": "test-chart-elasticsearch-c819bb71",
},
"spec": Object {
"http": Object {
Expand Down Expand Up @@ -46,19 +46,19 @@ Array [
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": Object {
"name": "test-chart-deployment-e606f14e",
"name": "test-chart-deployment-c8cfd183",
},
"spec": Object {
"replicas": 1,
"selector": Object {
"matchLabels": Object {
"cdk8s.deployment": "test-chart-Deployment-98e15317",
"cdk8s.deployment": "test-chart-Deployment-c8550d6d",
},
},
"template": Object {
"metadata": Object {
"labels": Object {
"cdk8s.deployment": "test-chart-Deployment-98e15317",
"cdk8s.deployment": "test-chart-Deployment-c8550d6d",
},
},
"spec": Object {
Expand All @@ -76,14 +76,14 @@ Array [
},
Object {
"name": "ELASTIC_ENDPOINT",
"value": "http://test-chart-elasticsearch-5921e846-es-http:9200",
"value": "http://test-chart-elasticsearch-c819bb71-es-http:9200",
},
Object {
"name": "ELASTIC_PASSWORD",
"valueFrom": Object {
"secretKeyRef": Object {
"key": "elastic",
"name": "test-chart-elasticsearch-5921e846-es-elastic-user",
"name": "test-chart-elasticsearch-c819bb71-es-elastic-user",
},
},
},
Expand All @@ -99,7 +99,7 @@ Array [
"volumeMounts": Array [
Object {
"mountPath": "/root",
"name": "configmap-test-chart-config-c3f7d3c0",
"name": "configmap-test-chart-config-c873bd48",
},
],
"workingDir": "/root",
Expand All @@ -108,9 +108,9 @@ Array [
"volumes": Array [
Object {
"configMap": Object {
"name": "test-chart-config-c3f7d3c0",
"name": "test-chart-config-c873bd48",
},
"name": "configmap-test-chart-config-c3f7d3c0",
"name": "configmap-test-chart-config-c873bd48",
},
],
},
Expand All @@ -121,7 +121,7 @@ Array [
"apiVersion": "v1",
"kind": "Service",
"metadata": Object {
"name": "test-chart-deployment-service-7f4c5401",
"name": "test-chart-deployment-service-c835a1d2",
},
"spec": Object {
"externalIPs": Array [],
Expand All @@ -132,7 +132,7 @@ Array [
},
],
"selector": Object {
"cdk8s.deployment": "test-chart-Deployment-98e15317",
"cdk8s.deployment": "test-chart-Deployment-c8550d6d",
},
"type": "ClusterIP",
},
Expand Down Expand Up @@ -210,7 +210,7 @@ function doSearch(uri, callback) {
},
"kind": "ConfigMap",
"metadata": Object {
"name": "test-chart-config-c3f7d3c0",
"name": "test-chart-config-c873bd48",
},
},
]
Expand Down
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"cdk8s": "0.0.0",
"cdk8s-plus-17": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"@types/jest": "^26.0.8",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/cdk8s-plus-ingress/package.json
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"cdk8s": "0.0.0",
"cdk8s-plus-17": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"@types/node": "^14.0.27",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/crd/package.json
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"@types/jest": "^25.1.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/hello/package.json
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"@types/jest": "^25.1.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/include-dashboard/package.json
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"@types/jest": "^25.1.2",
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/podinfo/lib/deployment.ts
@@ -1,4 +1,4 @@
import { Construct, Node } from 'constructs';
import { Construct } from 'constructs';
import { ApiObject, Names } from 'cdk8s';
import { KubeDeployment, Affinity, Container, IntOrString } from '../imports/k8s';
import { Autoscaler, AutoscalingOptions } from './autoscaler';
Expand Down Expand Up @@ -90,7 +90,7 @@ export class Deployment extends Construct implements ISelector {
// labels

this.selector = {
deploymentId: Names.toLabelValue(Node.of(this).path),
deploymentId: Names.toLabelValue(this),
...options.labels
};

Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/podinfo/package.json
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"@types/jest": "^25.1.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/web-service/package.json
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"cdk8s": "0.0.0",
"constructs": "3.0.4"
"constructs": "3.2.34"
},
"devDependencies": {
"@types/jest": "^25.1.2",
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/web-service/web-service.ts
@@ -1,4 +1,4 @@
import { Construct, Node } from 'constructs';
import { Construct } from 'constructs';
import { Names } from 'cdk8s';
import { KubeDeployment, KubeService, IntOrString } from './imports/k8s';

Expand Down Expand Up @@ -31,7 +31,7 @@ export class WebService extends Construct {

const port = options.port || 80;
const containerPort = options.containerPort || 8080;
const label = { app: Names.toLabelValue(Node.of(this).path) };
const label = { app: Names.toLabelValue(this) };
const replicas = options.replicas ?? 1;

new KubeService(this, 'service', {
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk8s-cli/package.json
Expand Up @@ -53,7 +53,7 @@
"@types/node": "^10.17.0",
"cdk8s": "0.0.0",
"codemaker": "^1.14.1",
"constructs": "3.0.4",
"constructs": "3.2.34",
"fs-extra": "^8.1.0",
"jsii-pacmak": "^1.14.1",
"jsii-srcmak": "^0.1.36",
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk8s-plus-17/API.md
Expand Up @@ -627,7 +627,7 @@ addRules(...rules: IngressV1Beta1Rule[]): void

#### protected onValidate()🔹 <a id="cdk8s-plus-17-ingressv1beta1-onvalidate"></a>

Validate the current construct.
(deprecated) Validate the current construct.

This method can be implemented by derived constructs in order to perform
validation logic. It is called on all constructs before synthesis.
Expand Down
10 changes: 5 additions & 5 deletions packages/cdk8s-plus-17/package.json
Expand Up @@ -38,16 +38,16 @@
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"cdk8s": "^0.0.0",
"constructs": "3.0.4",
"constructs": "3.2.34",
"eslint": "^6.8.0",
"eslint-import-resolver-node": "^0.3.3",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-import": "^2.20.2",
"jest": "^26.4.2",
"jsii": "^1.9.0",
"jsii-diff": "^1.9.0",
"jsii": "^1.14.1",
"jsii-diff": "^1.14.1",
"jsii-docgen": "^1.3.2",
"jsii-pacmak": "^1.9.0",
"jsii-pacmak": "^1.14.1",
"json-schema": "^0.2.5",
"projen": "^0.3.168",
"standard-version": "^9.0.0",
Expand All @@ -56,7 +56,7 @@
},
"peerDependencies": {
"cdk8s": "^0.0.0",
"constructs": "^3.0.4"
"constructs": "^3.2.34"
},
"dependencies": {
"minimatch": "^3.0.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/cdk8s-plus-17/src/deployment.ts
@@ -1,5 +1,5 @@
import { ApiObject, ApiObjectMetadataDefinition, Lazy, Names } from 'cdk8s';
import { Construct, Node } from 'constructs';
import { Construct } from 'constructs';
import { Resource, ResourceProps } from './base';
import { Container, ContainerProps } from './container';
import * as k8s from './imports/k8s';
Expand Down Expand Up @@ -124,7 +124,7 @@ export class Deployment extends Resource implements IPodTemplate {

if (props.defaultSelector ?? true) {
const selector = 'cdk8s.deployment';
const matcher = Names.toLabelValue(Node.of(this).path);
const matcher = Names.toLabelValue(this);
this.podMetadata.addLabel(selector, matcher);
this.selectByLabel(selector, matcher);
}
Expand Down
Expand Up @@ -9,7 +9,7 @@ Array [
},
"kind": "ConfigMap",
"metadata": Object {
"name": "test-my-config-map-91419662",
"name": "test-my-config-map-c8eaefa4",
},
},
]
Expand All @@ -25,7 +25,7 @@ Array [
},
"kind": "ConfigMap",
"metadata": Object {
"name": "test-my-config-map-91419662",
"name": "test-my-config-map-c8eaefa4",
},
},
]
Expand All @@ -41,7 +41,7 @@ Array [
},
"kind": "ConfigMap",
"metadata": Object {
"name": "test-my-config-map-91419662",
"name": "test-my-config-map-c8eaefa4",
},
},
]
Expand All @@ -56,7 +56,7 @@ Array [
},
"kind": "ConfigMap",
"metadata": Object {
"name": "test-my-config-map-91419662",
"name": "test-my-config-map-c8eaefa4",
},
},
]
Expand All @@ -72,7 +72,7 @@ Array [
},
"kind": "ConfigMap",
"metadata": Object {
"name": "test-my-config-map-91419662",
"name": "test-my-config-map-c8eaefa4",
},
},
]
Expand Down
10 changes: 5 additions & 5 deletions packages/cdk8s-plus-17/test/config-map.test.ts
Expand Up @@ -25,7 +25,7 @@ test('minimal', () => {
apiVersion: 'v1',
kind: 'ConfigMap',
metadata: {
name: 'test-my-config-map-91419662',
name: 'test-my-config-map-c8eaefa4',
},
},
]);
Expand Down Expand Up @@ -53,7 +53,7 @@ test('with data', () => {
key2: 'bar',
},
metadata: {
name: 'test-my-config-map-91419662',
name: 'test-my-config-map-c8eaefa4',
},
},
]);
Expand Down Expand Up @@ -81,7 +81,7 @@ test('with binaryData', () => {
key2: 'bar',
},
metadata: {
name: 'test-my-config-map-91419662',
name: 'test-my-config-map-c8eaefa4',
},
},
]);
Expand Down Expand Up @@ -115,7 +115,7 @@ test('with binaryData and data', () => {
key2: 'bar',
},
metadata: {
name: 'test-my-config-map-91419662',
name: 'test-my-config-map-c8eaefa4',
},
},
]);
Expand Down Expand Up @@ -174,7 +174,7 @@ test('addData()/addBinaryDataq() can be used to add data', () => {
},
kind: 'ConfigMap',
metadata: {
name: 'test-my-config-map-91419662',
name: 'test-my-config-map-c8eaefa4',
},
},
]);
Expand Down